1. Flicking animations...

Gidday there...
I'm havign trouble at the moment with my animations flicking eack time I
redraw them, as below:

call(wait_retrace)
display_image(old, saved_screen)
saved_screen = save_image... --long like cut short
display_image(player[1..2], image)

saved_screen is the region of the screen before the player is displayed
on top of it. The reason it's flicking is bacause I redraw the old
screen ovetop of the player, then redraw the player's next animation
frame again, so the player is temporaraly (sp?) erased, causing a slight
flicker.

Can this be stopped? I'm usng vid modes 257 (640x480, 256) or 259
(800x600, 256)

thanks :)

Mike :)

PS: i'll give you the code if you think it'd help... it's 8.summink kb
compressed.

new topic     » topic index » view message » categorize

2. Re: Flicking animations...

On Sun, 14 Dec 1997, Mike Fowler wrote:
a bunch of stuff about stomping on his player image and having to draw it
again...

You're doing it wrong.  Use a virtual screen, update your player's
position in it and draw the change to the real screen in one update.
There are lots of ways to do it, the easiest way is to keep a copy of the
background in a sequence, then index into the sequence to "draw" the
player graphic into it, then cut the region of interest out of the
"virtual screen" and display_image it in the right place.  Unless your
player image is HUGE (like bigger than 30x30) you should be able to do it
plenty fast enough for games.  The OidZone Programmer's Reference has a
complete discussion of this technique with line by line source code
explanation.  There are also a number of graphics libraries available on
the offical Euphoria site which will take care of all of this for you.

Michael Packard
Lord Generic Productions
My new game, Runner! is coming along nicely. I'll post a screen shot
later tonite.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Flicking animations...

Use a virtual screen, draw everything to the v-screen, then blast it to the
monitor.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Flicking animations...

-> a bunch of stuff about stomping on his player image and having to
-> draw it again...
-> You're doing it wrong.  Use a virtual screen, update your player's
-> position in it and draw the change to the real screen in one update.
-> There are lots of ways to do it, the easiest way is to keep a copy of
-> the background in a sequence, then index into the sequence to "draw"
-> the player graphic into it, then cut the region of interest out of
-> the "virtual screen" and display_image it in the right place.  Unless
-> your player image is HUGE (like bigger than 30x30) you should be able
-> to do it plenty fast enough for games.

okay, ill give that a burl, but the player is bigger than 30x30 (40x72
to be exact... its a human walking, like the kings quest kinda thing)...

-> The OidZone Programmer's
-> Reference has a complete discussion of this technique with line by
-> line source code explanation.  There are also a number of graphics
-> libraries available on the offical Euphoria site which will take care
-> of all of this for you.

yeah i know the other graphic libraries will do it, but i'm trying to do
as much of it myself as I can, and use other's code as a last resort (so
far i'm only using the wait_retrace function in the MODEX.E file, and
given credit for it :)

thanks :)

Mike :)

new topic     » goto parent     » topic index » view message » categorize

5. Re: Flicking animations...

At 06:46 15/12/97 GMT, you wrote:

>okay, ill give that a burl, but the player is bigger than 30x30 (40x72
>to be exact... its a human walking, like the kings quest kinda thing)...

What you should be doing is have your current game area in the virtual screen,
then draw all nearby sprites (including PC) onto the virtual screen.
Then just copy the portion of the virtual you want shown to video memory,
perhaps with the PC at the center. This also takes care of sprite clipping.


The Reaper  (*sniff*, no more picture)   sad

Homepage:  http://www.angelfire.com/nj/reaperlair/

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu