
-----------------------------------
biggmak
Sat Oct 18, 2003 11:23 pm

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. 

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

-----------------------------------
Tony
Sat Oct 18, 2003 11:31 pm


-----------------------------------
you should read a tutorial on flicker-free animation (i think it's called "smooth animation" or something).

Basically the use of View.Update

there's a lot of posts on that around the forum. Basically you set your screen to 
View.Set("offscreenonly")
 mode and then call View.Update after drawing the WHOLE screen. This will remove flicker from your animations

-----------------------------------
biggmak
Sat Oct 18, 2003 11:55 pm


-----------------------------------
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
Sat Oct 18, 2003 11:56 pm


-----------------------------------
if you dont know how to fix it just say that you dont know

-----------------------------------
Tony
Sun Oct 19, 2003 12:13 am


-----------------------------------
tony knows all  :lol:

here's what I ment:

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


-----------------------------------
biggmak
Sun Oct 19, 2003 1:54 pm


-----------------------------------
i got it to work, its perfect, youre awsome!!!!!!!!!!!!!!!

-----------------------------------
Tony
Sun Oct 19, 2003 2:17 pm


-----------------------------------
youre awsome
I know  :lol: thx
