As the document says, the VDP draws plane tiles in row-major order and sprites in column-major order. However, my immediate concern is, what is the recommended way to use the same tile set for both sprites and plane tiles?
Here is a concrete example. In my game (a fangame of the original Sega Swirl puzzle) I have a board that looks like this:
Initially I was going to use sprites so that swirl disappearing can be animated, however, I realized that this would permit a board size of no larger than 9x8 (72 swirls + cursor). So now I've decided to use a hybrid approach: render static swirls as tiles, and then use sprites of the same swirl graphic to perform animations. The obvious problem here is that tile data can only be loaded into VRAM one way or the other, unless you want to do duplicates. So depending on what you want to use the specific graphics for, it appears that's the way the tiles have to be loaded in. Since they are already loaded in as tiles, they won't display properly when drawn as sprites.
So the way I see things, I have several options here:
- For each graphic, define separate constants for sprite and plane graphics, the difference between each being row-major and column-major order. Load both sets of the same graphic in different places and use the appropriate locations in the appropriate settings.
- Load a single set of tiles into the VDP, but in differing orders. This would require a custom VDP_loadTiles method.
- Load tiles in column-major (sprite) order and use a custom method to display the tiles one 8x8 block at a time on the plane.