I'm doing a clone of the game Columns and, when you score lines, it's not unusual for various parts of the BG to change. I've been trying several methods and it seems too much happens in vblank, although this occurs randomly.
My basic plan of attack was this:
-I have an array of 96. 16 rows, 6 columns (2 rows on the top and 1 extra on the bottom. The 2 on the top are used in detection for game over. The one on the bottom is just there for use with the attribute function)
-The array spots will hold a value 0-5 for one of the various blocks you've got. 7 is used for empty spaces (it was easier this way). 6 is reserved for whatever
-When you score something, it looks at the array and obviously "touching 3 of a kind tiles". Then I have it ORA those tiles with $10. So any three of a kind will now have $10 added to it as a sort of "marker".
-When going to the scoring function, it currently just looks at the tiles in the array and writes the BG tiles to use to another array (this is done outside of vblank)
-During vblank, I look at that secondary array, and use a loop to write approx. 36 tiles to the screen and up the indexes and such.
My question is: Is this logic good or is there far better logic I could use?
Best way to draw nearly a whole BG during vblank
Moderator: Moderators
Well, I don't know the game columns so it's hard to tell.
However, if you do repeated updates in a 1-frame interval, the player is likely not to notice it, so if your (ROM) code is fast enough you can do 4x4 lines or something like that to redraw half the whole screen in 4 frame, and this is barely noticeable to the user. If you use a lot of RAM as dwedit says, you could do 256 $2007 writes using $500 bytes of RAM, allowing to redraw 8 lines so the whole screen in 4 frames.
However, if you do repeated updates in a 1-frame interval, the player is likely not to notice it, so if your (ROM) code is fast enough you can do 4x4 lines or something like that to redraw half the whole screen in 4 frame, and this is barely noticeable to the user. If you use a lot of RAM as dwedit says, you could do 256 $2007 writes using $500 bytes of RAM, allowing to redraw 8 lines so the whole screen in 4 frames.
Useless, lumbering half-wits don't scare us.
- Hamtaro126
- Posts: 786
- Joined: Thu Jan 19, 2006 5:08 pm