Login
Back to forumSee the full topicGo to last reply

Posted By

Mad
on 2018-06-13
10:56:23
 Re: Spikes game released!

I checked it, very very nice one! There are ways to get rid of some space used by the sprites, but some of them are only useful if you do have many sprites. I think you know them already so sorry for my attitude here.

One point is to have a 256 byte table with mask entries for every different sprite byte. So instead of the masks you only have a table which maps the sprite byte to a mask entry. I think Mike Dailly called this technique automasking. The drawback is, that you just can use 3 colors for the sprites. (the illegal lax instruction can do wonders here if you can't use ldx for some reason)

Another point is, instead of saving the shifted frames you shift every sprite byte by using two 256 byte tables (with the two neighboring bytes as input) and combine both shifted values with an ora to one single byte. I think this technique is more useful if you have many (really a lot of) sprites. In a very naive case you need 8 tables (2 * 4 * 256 bytes) for this.

Another point is to have an 256 byte table for the x flipping. You just flip every byte by lookuping a table with the corresponding x flipped byte. So you can get rid of the mirrored frames. You can even use the same memory like the source sprite for the flipped one, and can just flip this memory when needed.

I know you are done with the game and don't want to change anything at all, that are just some suggestions, which mostly apply to games where you do have many different sprites. Could be that the code would occupy a lot more space than your current approach.

As said, great game and fun to play. Nice to have people making games on such a flawless level!



Back to top


Copyright © Plus/4 World Team, 2001-2024