[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

animation skip problem



Ok, I wrote a shape compiler in Orca/C 1.3 that compiles rIcons into asm code
(derived from Jawaid Bayzer's Hemi.roids). Then I linked this code into a
skeleton C program that erases/draws the compiled icon wherever the mouse
pointer location is.

I've synced the draw code to erase and draw the shape only when $E0C019 is
low (in vertical blank). The erase/draw code sets the interrupt flag when
it is running and the draw code uses the same direct page technique used in
FTA's Bouncin' Ferno.

The problem is that every once in a while, the sprite skips.  Say I'm moving
the mouse slowly left and right, the sprite would move smoothly, but a few
times every few seconds, the sprite jumps a >5 pixel distance as it is moving
in a certain direction. This makes the animation look bad and unclean.

I think the problem is every once in a while my sync code has to wait more
than 1 tick before $E0C019 goes low and so the skipping occurs.  I've looked
through FTA's code and I can't figure out what they used to fix this problem.
They have wait_sync code lying around all over the place, but I don't know
which one is the right one and one that doesn't take 2 ticks in order to
sync.  I may think about trying to figure out scan line positions again.

Ok, now clear some space (um, a lot of space) for the GS<>IRC wizards or
Steve Chiang, or anybody with lots of animation experience. 8^)

thanx for reading this, and I thanx a lot more if you answer it...:)

Joseph
--
jlee@bonnie.ics.uci.edu      | "Why is the world so complicated?"
IRC: OrionPaks               | That's what make the world so exciting and fun.