#64515 - gs2phateon - Fri Dec 23, 2005 6:03 am
I've been having trouble with this for days now. I can draw one back ground, but not mutliple. Every tutorial on backgrounds has only done one, so I figured I'd try here. I can draw two backgrounds, but they always end up being the same. Any tips?
#64519 - gauauu - Fri Dec 23, 2005 6:28 am
What do you mean by "the same"....they use the same tile graphics, or they end up having the same map?
#64520 - gs2phateon - Fri Dec 23, 2005 6:32 am
Ok, they end up using the same map. I'm pretty sure that is because both my maps and tiles are stored at the same place, which is why I'm having this problem.
I've been reading up on this (again) just now, and it says to put the tiles at different character base blocks, and the maps at different screen base blocks. I tried that for both, but it isn't working.
#64521 - poslundc - Fri Dec 23, 2005 6:35 am
Are your REG_BGXCNT registers for the two backgrounds each pointing to the correct CBB and SBB?
Dan.
#64523 - gs2phateon - Fri Dec 23, 2005 6:49 am
Wow. Ok, I changed REGBG0CNT and REGBG1CNT, and that definitely helped. But it still doesn't look right...
This is what I have right now
Background 0-Tiles on CBB 0, Map on SBB 30
Background 1-Tiles on CBB 1, Map on SBB 31
I can see two disctinctively different backgrounds (thank you so much!), but there some corruption.
#64525 - gs2phateon - Fri Dec 23, 2005 6:59 am
I don't know if this helps, but I'm using mode 0.
Also, my background 1 is working just fine, but background 0 isn't.
#64527 - tepples - Fri Dec 23, 2005 7:12 am
How are your background priorities set? If you're using completely nontransparent tiles, then you'll only see the frontmost background.
How do your tiles and maps look in VisualBoyAdvance's tile viewer and map viewer?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#64528 - gs2phateon - Fri Dec 23, 2005 7:22 am
Most of tiles for both backgrounds are transparent. You're right, the front background is the one i can see clearly. Here's another point that might be worth bringing up. The background that isn't working is the one that i coded for first, meaning that something might have overlapped during the process. I've tried spacing out the CBBs and SBBs for the backgrounds as much as I could, and that didn't fix it. The only thing left I'm thinking is the palette memory. How should I space that out?
#64532 - tepples - Fri Dec 23, 2005 7:36 am
Are you using 16-color or 256-color tiles for your backgrounds? In general, you should use 16-color tiles unless you have a d*rn good reason not to.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#64533 - gs2phateon - Fri Dec 23, 2005 7:58 am
I was using 256 color tiles. I tried changing the maps so it used 16 color, but now both backgrounds don't look right. Why isn't it a good idea to use 256 colors?
#64534 - gs2phateon - Fri Dec 23, 2005 7:59 am
O wait, the new palette is still 256, I'll try and fix that.
#64535 - tepples - Fri Dec 23, 2005 8:07 am
Using 16-color tiles will let you cleanly use a separate palette for each background by changing the upper 4 bits of each map entry. It will also make the backgrounds take up much less space in your ROM. If most commercial games for Sega Genesis, Super NES, and GBA can get away with 16-color tiles...
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#64536 - gs2phateon - Fri Dec 23, 2005 8:17 am
That's pretty cool. I tried to make the backgrounds use 16 color tiles, and it worked for the background I wasn't having trouble with. Do the palettes have to be stored at different locations?
#64569 - tepples - Fri Dec 23, 2005 5:29 pm
You would store the 16-color palettes in BG_COLORS[0] through BG_COLORS[15], BG_COLORS[16] through BG_COLORS[31], BG_COLORS[32] through BG_COLORS[47], etc.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#64676 - gs2phateon - Sun Dec 25, 2005 2:15 am
Well, i got the backgrounds to work! It turns out that the progam wasn't accounting for enough tiles, which was it was so messed up. Anyways, it never would have worked without all the advice i got from everybody in this thread, and I learned a ton more about how the graphics work. So thanks everybody!
-gs2