[stella] When to update sprites

Subject: [stella] When to update sprites
From: "Glenn Saunders" <cybpunks@xxxxxxxxxxx>
Date: Sun, 14 Oct 2001 13:24:55 -0700

I still expect the timing to get *very* close, because you want to
position all objects with single line precision. It might not be
possible without some compromises.

I had no idea until now how tricky this is going to be. With the Y register already used throughout for the scanline counter and the X register used to index the playfield graphics, it's going to be hard to do all the writes bunched up close together. That's a write to GRP0, GRP1, (on one of the two scanline pairs) and the horizontal motion and size registers for M0 and M1 that (depending on the Y position) could have to happen on the same scanline as the player writes.

Anyway this probably means going back to a solid line on the safezone for one thing. That's probably inevitable.

I also have to worry about putting in any conditional logic into the NOP area before the PF2 rewrite...

Note that only the pedestrians move across the entire screen. Well, not necessarily the ENTIRE screen. I can bound them in by 2 playfield pixels on the left or right maximum if necessary, just as long as I start them out behind the safezone. The cars are bounded between the two safezone (PF0) areas. So that gains me some time, doesn't it? If the sprites extend to within 2 playfield pixels of the edge, what is the safe cycle ranges to update? How much of a window on the right side of the line? If bounded by PF0 (cars) how much more time to I gain on the left and on the right??

In the end I might be able to do something really sneaky...

I could have different versions of the kernel that update at different spots depending on the X position of the objects in order to avoid stomping on the sprite while it's being drawn. If I evaluate the screen as two halves and have two different kernels depending on whether the sprite is on the left or right half, then that's 16 possible combinations if done for all 4 objects. The game is simple enough that even if I went that far it might still fit into 4K.

Do any other games do this kind of thing? I'm sure I can't be the first to think of this.

Also, Piero, is this tearing phenomenon what happened with the player's shots in Oystron? If that's the case, I can really sympathize now ;)

Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/

Current Thread