plane game, flashing plane image help
Author |
Message |
biggmak
|
Posted: Sat Oct 18, 2003 11:23 pm Post subject: plane game, flashing plane image help |
|
|
Im having trouble with a game that im currently working on with a plane that shoots on coming planes with a birds eye view. So basically the problem is that I have 3 different pics for my plane, to make it look like the plane is actually flying, and I had the tail dragging behind my plane so I decided to cover it up with a background image, but that only makes things worse by making the planes image flash. Ive looked at the tutorials but im not sure how to apply what is there to my program. If anyone knows how to fix this problem I will appreciate it very much.
code: | loop
Input.KeyDown (chars)
if chars (KEY_UP_ARROW) then
y := y + 1
Pic.Draw (back, 0, 0, 0)
Pic.Draw (plane, x, y, picMerge)
delay (1)
y := y + 1
Pic.Draw (back, 0, 0, 0)
Pic.Draw (plane2, x, y, picMerge)
delay (1)
y := y + 1
Pic.Draw (back, 0, 0, 0)
Pic.Draw (plane3, x, y, picMerge)
delay (1)
end if
end loop |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: Sat Oct 18, 2003 11:31 pm Post subject: (No subject) |
|
|
you should read a tutorial on flicker-free animation (i think it's called "smooth animation" or something).
Basically the use of
there's a lot of posts on that around the forum. Basically you set your screen to code: |
View.Set("offscreenonly")
| mode and then call View.Update after drawing the WHOLE screen. This will remove flicker from your animations |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
biggmak
|
Posted: Sat Oct 18, 2003 11:55 pm Post subject: (No subject) |
|
|
i read the tutorial and from how my game is set up, which is different from the tutorial, viewset (offscreenonly) wont work, it just freezes the whole game. I tried changing the tutorial but all that showed up was the first picture of the character and the background, and also the character was moving very slow even after i changed the delay! |
|
|
|
|
 |
biggmak
|
Posted: Sat Oct 18, 2003 11:56 pm Post subject: (No subject) |
|
|
if you dont know how to fix it just say that you dont know |
|
|
|
|
 |
Tony

|
Posted: Sun Oct 19, 2003 12:13 am Post subject: (No subject) |
|
|
tony knows all
here's what I ment:
code: |
View.Set("offscreenonly")
loop
Input.KeyDown (chars)
if chars (KEY_UP_ARROW) then
y := y + 1
Pic.Draw (back, 0, 0, 0)
Pic.Draw (plane, x, y, picMerge)
View.Update
delay (1)
y := y + 1
Pic.Draw (back, 0, 0, 0)
Pic.Draw (plane2, x, y, picMerge)
View.Update
delay (1)
y := y + 1
Pic.Draw (back, 0, 0, 0)
Pic.Draw (plane3, x, y, picMerge)
View.Update
delay (1)
end if
end loop
|
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
biggmak
|
Posted: Sun Oct 19, 2003 1:54 pm Post subject: (No subject) |
|
|
i got it to work, its perfect, youre awsome!!!!!!!!!!!!!!! |
|
|
|
|
 |
Tony

|
|
|
|
 |
|
|