I've been playing around with AGD and found a little inconvenience about using larger sprites (e.g. 16x32) consisting of standard 16x16 smaller ones. It happens that they move a bit jerky or something.
So, is it possible to assemble larger sprites moving seamlessly in AGD?
Post by Jonathan Cauldwell on May 16, 2012 17:58:48 GMT
At present, this would be very difficult.
AGD is designed to manipulate 12 sprites around the screen at 25 FPS without flicker. To do this, it has to delete and redraw 6 sprites per frame so these sprites are organised into 2 lists, processed in alternate frames. However, to prevent tearing these sprites move around within and switch between the lists.
This means that sometimes the 2 sprites are moved in different frames. When this happens, one sprite will appear to be 2 pixels ahead of the other for half of the time.
I've looked at this before, and there are no easy options. Any solution requires reducing AGD's capabilities one way or another. I could have a look to see if there's a simple POKE you can apply to stop sprites changing positions in the lists, but bear in mind that runs a high risk of introducing tearing elsewhere.
Post by Jonathan Cauldwell on May 17, 2012 20:45:57 GMT
Assuming you're using version 3.0:
POKE 34882,201 switches off the sprite sorting POKE 34882,6 switches it back on again
There's another problem if you're going to attempt this, and that is that two adjacent sprites will end up being drawn in different frames - even sprites in one frame, odd sprites the next. So you need to make sure that a third sprite - whatever that may be - is created after the first half of your double sprite, and before the second one. That means positioning the first half, creating and positioning an unrelated sprite elsewhere, then creating the second half. If you don't want a third sprite on screen, you'll have to create a dummy blank sprite which automatically self-destructs in its event code.