Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How do you delete everything but a drawfillrectangle?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
irishseacaptain




PostPosted: Tue Jun 14, 2011 11:18 am   Post subject: How do you delete everything but a drawfillrectangle?

What is it you are trying to achieve?
I'm attempting to clear everything BUT a drawn rectangle.


What is the problem you are having?
I do not know how to use "cls" and still keep an object on screen


Describe what you have tried to solve this problem
Lots of thought. I learned the language 3 days ago...


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

Turing:



drawfillbox (0,350, 100, 400, 12)
...
...
cls



Please specify what version of Turing you are using
4.1
Sponsor
Sponsor
Sponsor
sponsor
Nick




PostPosted: Tue Jun 14, 2011 11:21 am   Post subject: RE:How do you delete everything but a drawfillrectangle?

just clear your screen and redraw it
irishseacaptain




PostPosted: Tue Jun 14, 2011 12:00 pm   Post subject: Re: How do you delete everything but a drawfillrectangle?

Sorry, should have mentioned. I did, but since its in a game and it's refreshing constantly, it doesn't appear, it just blinks in some areas of where its supposed to be.
apython1992




PostPosted: Tue Jun 14, 2011 12:07 pm   Post subject: RE:How do you delete everything but a drawfillrectangle?

You want to be using double-buffering - essentially, all of the calculations that involve changing the scene in a game happen on a back buffer (one that doesn't get updated continuously), and then after all of the calculations and movement have been finished for that loop, you can draw the back buffer onto the front buffer, so that the scene is updated once and in unison. Take a look at View.Set("offscreenonly") and View.Update.
irishseacaptain




PostPosted: Wed Jun 22, 2011 1:01 pm   Post subject: Re: RE:How do you delete everything but a drawfillrectangle?

apython1992 @ Tue Jun 14, 2011 12:07 pm wrote:
You want to be using double-buffering - essentially, all of the calculations that involve changing the scene in a game happen on a back buffer (one that doesn't get updated continuously), and then after all of the calculations and movement have been finished for that loop, you can draw the back buffer onto the front buffer, so that the scene is updated once and in unison. Take a look at View.Set("offscreenonly") and View.Update.


Awesome, thanks, I'll take a look at that.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: