I was reviewing my ninja game's scrolling engine. I figure with some minor tweaks I could scroll both left and right. (I have it working with uncompressed data).
But I'm scratching my head at compressing the room data. When I was only scrolling right, I had a pointer to each room, and decompressed as I scrolled through the room, one vertical column of metatiles at a time, adjusting the pointer after 13 metatiles.
(On a side note, I was never happy with my hand edited compression system, either)
Now, if I scrolled both directions, a pointer to a room wouldn't work unless I uncompressed the entire room into a 208 byte (16x13 game area, HUD at top) RAM space first, which would use up more RAM than I'd prefer.
Another idea I had was to compress half (left vs right) a room, and only have to use 104 bytes. I would need a pointer to each half-room, which isn't too crazy.
Or I could decompress into the unused part of the stack, maybe. 208 bytes there should be ok.
Thoughts?
But I'm scratching my head at compressing the room data. When I was only scrolling right, I had a pointer to each room, and decompressed as I scrolled through the room, one vertical column of metatiles at a time, adjusting the pointer after 13 metatiles.
(On a side note, I was never happy with my hand edited compression system, either)
Now, if I scrolled both directions, a pointer to a room wouldn't work unless I uncompressed the entire room into a 208 byte (16x13 game area, HUD at top) RAM space first, which would use up more RAM than I'd prefer.
Another idea I had was to compress half (left vs right) a room, and only have to use 104 bytes. I would need a pointer to each half-room, which isn't too crazy.
Or I could decompress into the unused part of the stack, maybe. 208 bytes there should be ok.
Thoughts?