
I think using native hardware coordinates would also mean that implementing a sprite update buffer (where you save sprite updates for the vertical blank period) becomes much more trivial + faster. In the sense it would not be needed for many sprites now. Since the X and Y values can now be *directly* taken from the bullet-list, alien-list etc with no need for duplication or pointers
Negatives (for Neo Thunder) :
- With the current version of NeoThunder, doing it this way, would mean i can no longer use ADDQ, SUBQ to quickly make a bounding box for a bullet in the player bullets VS Aliens collision detection routine (the most time intensive routine which is in inline assembler)
- I also won't be able to use the limit-check trick that works with unsigned numbers where you only need one limit check instead of 2.
However I think overall it would be much faster to do it this way because I would save a lot of time throughout the program
Neo Thunder is maybe unique in that every sprite is only 1 character in height and has no sticky bits set - so I can keep these lower bits permanently set and they won't affect comparisons etc. But even in games that don't have this advantage, it would be fast to just OR in the correct settings. (actually thinking about it more, some comparisons will work anyway so the OR is not needed for those)
I don't *need* to do this in order to get the game running smoothly, but it has made me think about the best way to store X and Y values for future projects. And it is always good to save time if possible
What do people think about doing it like this? Are there downsides that I am not seeing?
Thank you 👍