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

Username:   Password: 
 RegisterRegister   
 Fickers in the Draw.Dot part
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
S_Grimm




PostPosted: Wed May 07, 2008 11:45 am   Post subject: Fickers in the Draw.Dot part

I recently decided that i have way to much spare time on my hands, so i'll work on a Tron Speedbike like game. Exept........the dot keeps flickering.
I'll post the code, if anyone can give me a hand.

Turing:

View.Set ("offscreenonly:600;600")
var x,y : int := 1
var keys : array char of boolean
var bike : boolean := true

procedure BIKE
if bike then
        Draw.FillOval (x, y, 5, 5, green)
        delay (10)
        end if   
end BIKE
loop
Input.KeyDown (keys)
if keys (KEY_UP_ARROW)then
y := y +1
cls
end if
if keys (KEY_DOWN_ARROW)then
y := y -1
cls
end if
if keys (KEY_LEFT_ARROW)then
x := x -1
cls
end if
if keys (KEY_RIGHT_ARROW)then
x := x +1
cls
end if
if (x = 600) then
x := x-1
cls
end if
if (x = 0) then
x := x+1
end if
if y = 600 then
y:= y-1
end if
if y = 0 then
y := y+1
end if
BIKE
View.Update
end loop

Sponsor
Sponsor
Sponsor
sponsor
Clayton




PostPosted: Wed May 07, 2008 12:50 pm   Post subject: RE:Fickers in the Draw.Dot part

What's wrong with your call to View.Set()?
Asherel




PostPosted: Wed May 07, 2008 1:18 pm   Post subject: RE:Fickers in the Draw.Dot part

Clayton is right, why are you adding a graphic range for it to check?

Get rid of it and then it should stop flickering. A common mistake that people have encountered before.
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  [ 3 Posts ]
Jump to:   


Style:  
Search: