#5041 - 00kevin - Fri Apr 18, 2003 3:22 am
Hi,
I have a few questions regarding some of the GBA modes and how to use them to create a scrolling background.
The game i'm creating requires a 4 directional scrolling screen. I have looked at the various modes, but i'm not sure what mode will produce the best fastest results. My game is action based so i need the screen to scroll at different speeds. How do the tile modes scroll the screen? can they scroll the background by only 1 pixel or are they limited by the size of the tile. Also are there any good examples of a fast scrolling screen that does jump pixels?
Some of the example i have seen so far are rather poor.
thanks
#5043 - darkcloud - Fri Apr 18, 2003 3:34 am
The amount a tile background can scroll by is not limited by the size of the tiles. The tiles just make up the "map". What you're really doing when you scroll a tile map is just moving the map around. It's not like its updating the tiles or anything. I'm probably not explaining it good. You can scroll the map 1 pixel at a time, to as many pixels at a time as you want. I'm not sure what examples there are of fast scrolling backgrounds, but you could easily write your own and mess around with how far you scroll the background each frame.
_________________
Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean ? It's a mystery, and that's why so is mankind.
#5044 - 00kevin - Fri Apr 18, 2003 3:37 am
thanks. so would mode 1 work for this?
#5045 - darkcloud - Fri Apr 18, 2003 3:43 am
Yea any of the tile modes will work. If you will be using rotational backgrounds, you need to use either mode 1 (2 rot bgs & 1 text bg) or 2 (2 rot bgs), but if you're just using text backgrounds, use mode 0 (4 text bgs).
_________________
Maybe in order to understand mankind, we have to look at the word itself: "Mankind". Basically, it's made up of two separate words - "mank" and "ind". What do these words mean ? It's a mystery, and that's why so is mankind.
#5046 - pollier - Fri Apr 18, 2003 3:49 am
Sounds to me like you want to use mode 0, probably. It doesn't really matter, there's hardly any speed difference (if any?) between rendering of modes 0-2.
The GBA has no problems with you scrolling your screen a single pixel or a hundred pixels. It just redraws the background every frame. To scroll the screen you set offsets in two x and y registers for each background. If you want to 'jump' pixels, just add higher values to the x or y map position every frame.
The only real question of the GBA's speed is how fast you can load in new map data (and maybe tile data) to fill in the edges. More likely than not, and if you code it properly, you'll have plenty of time.[/code]
_________________
(Works for me!)