#8225 - Domovoi - Fri Jul 04, 2003 9:25 pm
I'm reading up on tiled mode, and something strikes me as odd. It is claimed that you can use four backgrounds simultaneously... But since the first 64KB of video memory are used for both the character base blocks as the screen base blocks, how on earth are you going to use all four tiles? If you fill up all four character base blocks, you have no room left for your screen base blocks. I guess you could only fill the last character base block with 8KB of data, so that you have 8KB left for 4 * 2KB screen base blocks, but then you could, essentially, still use only 3.5 backgrounds at the same time, right?
Or am I missing something here?
#8227 - Touchstone - Fri Jul 04, 2003 10:23 pm
You are missing the fact that for each background you must select which char base to read the tiles from. You can have three backgrounds active and they all use char base 0 tiles. Besides, you don't have to fill up all four char base blocks. Stick your screen maps wherever they fit.
_________________
You can't beat our meat
#8228 - Domovoi - Fri Jul 04, 2003 11:18 pm
Touchstone wrote: |
You are missing the fact that for each background you must select which char base to read the tiles from. You can have three backgrounds active and they all use char base 0 tiles. |
Hmm... Okay, true. But you can't have four unique backgrounds, each using a different character base, and each character base filled up, right?
Touchstone wrote: |
Besides, you don't have to fill up all four char base blocks. Stick your screen maps wherever they fit. |
I realise that. But using four backgrounds means four different screen base blocks means four times 2KB is 8KB.... so when using four backgrounds, you can alway use at -max- 3.5 character base blocks, right? 'Cause there's no room for any more tile data.
#8232 - tepples - Sat Jul 05, 2003 1:44 am
Some things to remember when trying to use all four backgrounds:
Most games use 16-color tiles, which extends each tile data block to cover 512 unique tiles.
The tile space used by a background may straddle tile data block boundaries.
Your frontmost layer will usually contain a status display (score, health, etc), and those don't need a lot of unique tiles.
A status display layer won't scroll much if at all. If you don't scroll some of your backgrounds vertically, you can use rows 20-31 of their map space for tile data. This may give you slightly more than 3.5 tile data blocks to work with.
Advanced techniques
Several rows of a status display layer's map may be totally empty; you can use vcount interrupts to turn the layer entirely off for some scanlines and reclaim some tile space from those rows.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#8238 - peebrain - Sat Jul 05, 2003 2:48 am
Got any more advanced techniques? I love reading about creative ways to use shit like that :-P
~Sean <- nerd
_________________
http://www.pbwhere.com
#8242 - tepples - Sat Jul 05, 2003 6:14 am
Sonic Advance uses only two layers (just as all the Genesis games did because the Genesis only had two layers in its equivalent to GBA's mode 0), but you wouldn't immediately know it, as the back layer is done with a boatload of raster effects. Create a horizontal bar that parallax scrolls separately by waiting for the proper scanline (which can change depending on the height of the camera), changing the scroll position to the bar's graphic, and then changing it back to the rest of the layer after the beam is done. Sonic Advance's back layer is really complicated; you'll have to play the game in VBA to figure out how it was done.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.