gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > Over 256 tiles on a rotational background

#97657 - Spaceface - Thu Aug 10, 2006 10:31 pm

Hey there,

I'm kind of stuck with this problem. And both google and the search failed to give me the information (forgive me if it's already on gbadev's forums).

Anyways, I've made this background for a game that is 240x160 in size, which results in a 30x20 = 600 tiles background. From what I'm reading is that a rotation background can at max consist of 256 tiles. Now when I started looking I stumbled upon this image, which (correct me if I'm wrong, cause I've got the feeling I am) looks like a background consisting of 30x20 tiles.

Is there any way I can achieve such a thing in mode 0 - 2 for my background?


Last edited by Spaceface on Thu Aug 10, 2006 10:35 pm; edited 1 time in total

#97659 - tepples - Thu Aug 10, 2006 10:34 pm

Spaceface wrote:
Anyways, I've made this background for a game that is 240x160 in size

The size of a single mode 4 plane.

Quote:
which results in a 30x20 = 600 tiles background. From what I'm reading is that a rotation background can at max consist of 256 tiles. Now when I started looking I stumbled upon this image, which (correct me if I'm wrong, cause I've got the feeling I am) looks like a background consisting of 30x20 tiles.

I don't think gbascreentc1.jpg is a rotation background.

Quote:
Is there any way I can achieve such a thing in mode 0 - 2 for my background?[/url]

Depends. Why do you need it to be a rotation background?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#97662 - Spaceface - Thu Aug 10, 2006 10:39 pm

I really don't actually. But since I need to place a tilemap in front of it I had the idea I had to use a background and was therefor forced to place one. The docs I learned from really only seemed to cover rotation backgrounds.

So do you advice to use a text background? If so, what is the max amount of tiles I can use there? Or am I able to place a tilemap in front of a background in mode 3-5? Cause I really don't know how they did it in that screenshot...

#97666 - tepples - Thu Aug 10, 2006 10:48 pm

GBA VRAM has enough room for 2,048 4-bit tiles or 1,024 8-bit tiles or a combination of both, minus what the maps use. I'd suggest using 4-bit tiles, with a separate 15-color palette for each "object" you want to put in the background, such as the sky or a tree trunk or a field of grass or leaves.

An 8-bit "text" background can use 600 tiles, but that doesn't leave much VRAM for stuff to put in front of it. A 4-bit "text" background, where each tile can choose from any of sixteen 15-color palettes, can also use 600 tiles, giving more room. I'd also suggest collapsing identical sky tiles into one tile and reusing it in the map. If you look closely, you'll see that some of the tiles in the field of grass are also identical.

Or you can do like the arcade game Pengo and make your entire front layer out of sprites.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#97671 - Spaceface - Thu Aug 10, 2006 11:06 pm

Ah yes you're completely right! I'll try to fumble with these functions!

Thanks tepples! You're the man, yet again =)

#97674 - Spaceface - Thu Aug 10, 2006 11:12 pm

Just outa curiousity, the given example in the screenshot could very well be a mode 3-5 background with sprites on top right? (just so I get the principles hehe)

#97684 - tepples - Fri Aug 11, 2006 12:00 am

Spaceface wrote:
Just outa curiousity, the given example in the screenshot could very well be a mode 3-5 background with sprites on top right? (just so I get the principles hehe)

Correct.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#98188 - gs2phateon - Sun Aug 13, 2006 11:41 pm

tepples wrote:
GBA VRAM has enough room for 2,048 4-bit tiles or 1,024 8-bit tiles or a combination of both, minus what the maps use. I'd suggest using 4-bit tiles, with a separate 15-color palette for each "object" you want to put in the background, such as the sky or a tree trunk or a field of grass or leaves.

An 8-bit "text" background can use 600 tiles, but that doesn't leave much VRAM for stuff to put in front of it. A 4-bit "text" background, where each tile can choose from any of sixteen 15-color palettes, can also use 600 tiles, giving more room. I'd also suggest collapsing identical sky tiles into one tile and reusing it in the map. If you look closely, you'll see that some of the tiles in the field of grass are also identical.

Or you can do like the arcade game Pengo and make your entire front layer out of sprites.


I've been searching for a while now how to make a large, detailed scrolling background, and using a 4-bit background as you described sounds like it might help. The problem is, every background tutorial I could find either uses 8-bit palettes (that's the only way I know how to make a background) or skips over it completely. Could you explain how to use this method, or at least show me a tutorial that covers it?

#108696 - Ant6n - Sat Nov 11, 2006 10:42 am

did you try the hardware specs?
http://nocash.emubase.de/gbatek.htm

edit: whoops, sorry, i didnt notice this post was already a year old...