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

Username:   Password: 
 RegisterRegister   
 help with flickering
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rsknights0




PostPosted: Tue Jan 08, 2008 4:26 pm   Post subject: help with flickering

code:

setscreen("graphics")
var c,x,y:int
loop
for dots:1..1000
drawfillbox(0,0,299,maxy,brightblue)
randint (x,300,maxx)
randint (y,50,maxy)
randint (c,41,44)
drawfilloval(x,y,5,5,c)
drawfillbox(0,50,maxx,0,brightgreen)
end for
end loop


here it is, its for the end of my program for my culminating program and i need help with stoping the flickering
Sponsor
Sponsor
Sponsor
sponsor
shakin cookie




PostPosted: Tue Jan 08, 2008 4:34 pm   Post subject: RE:help with flickering

try putting the command View.Update

that should get rid of the flickering.

It goes at the bottom, before the end if.
Sean




PostPosted: Tue Jan 08, 2008 4:35 pm   Post subject: Re: help with flickering

You can add to your setscreen with an offscreenonly then put in a View.Update or change your setscreen to a View.Set ("graphics, offscreenonly") and still add in the View.Update to the program near the end.
shakin cookie




PostPosted: Tue Jan 08, 2008 4:36 pm   Post subject: RE:help with flickering

in addition to that, instead of setscreen("graphics")

put setscreen("offscreenonly")

it will stop the flickering. =)
shakin cookie




PostPosted: Tue Jan 08, 2008 4:37 pm   Post subject: RE:help with flickering

Either way works
shakin cookie




PostPosted: Tue Jan 08, 2008 4:38 pm   Post subject: RE:help with flickering

i have a question, what is this that you are making?

it seems to have no purpose...
rsknights0




PostPosted: Tue Jan 08, 2008 4:40 pm   Post subject: Re: help with flickering

its some kind of an explosion for a shooter game its not done yet tho
shakin cookie




PostPosted: Tue Jan 08, 2008 4:42 pm   Post subject: RE:help with flickering

oh ok, btw did that help?
Sponsor
Sponsor
Sponsor
sponsor
Sean




PostPosted: Tue Jan 08, 2008 4:45 pm   Post subject: Re: help with flickering

Shakin beat me earlier by a minute, damn you!
rsknights0




PostPosted: Tue Jan 08, 2008 4:46 pm   Post subject: Re: help with flickering

yes thanks
shakin cookie




PostPosted: Tue Jan 08, 2008 4:48 pm   Post subject: RE:help with flickering

it's all in the wrist! =)
SIXAXIS




PostPosted: Fri Feb 01, 2008 8:58 pm   Post subject: Re: help with flickering

Turing:

setscreen ("graphics,offscreenonly")
var c, x, y : int
loop
    for dots : 1 .. 1000
        drawfillbox (0, 0, 299, maxy, brightblue)
        View.Update
        randint (x, 300, maxx)
        randint (y, 50, maxy)
        randint (c, 41, 44)
        drawfilloval (x, y, 5, 5, c)
        drawfillbox (0, 50, maxx, 0, brightgreen)
    end for
end loop


Is that what you wanted?
ericfourfour




PostPosted: Fri Feb 01, 2008 10:23 pm   Post subject: Re: help with flickering

Set your screen to offscreenonly.
Turing:
View.Set ("offscreenonly")


This implements what is called a backbuffer. It makes your program draw everything to the memory instead of the screen. When you want to take what was drawn in the memory and put it on the screen, you flip the backbuffer with this command:
Turing:


Call this as soon as you are done drawing a frame.
riveryu




PostPosted: Mon Feb 18, 2008 8:02 pm   Post subject: Re: help with flickering

ericfourfour wrote:

Set your screen to offscreenonly.
Turing:
View.Set ("offscreenonly")


This implements what is called a backbuffer. It makes your program draw everything to the memory instead of the screen. When you want to take what was drawn in the memory and put it on the screen, you flip the backbuffer with this command:
Turing:


Call this as soon as you are done drawing a frame.


So if you put both in, they cancel each other out and makes the computer do useless calculations?
CodeMonkey2000




PostPosted: Mon Feb 18, 2008 8:04 pm   Post subject: RE:help with flickering

I'm not sure what you are asking, so I'm just going to say no (a very confident no).
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 2  [ 16 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: