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.

Beginners > Trouble with tiles

#22979 - Op Ivy - Fri Jul 02, 2004 2:17 am

I've been working on a link-clone for about the last week or so. So far I have the sprites in, link, and enemy, and now I'm trying to add the tiles into the game. My problem isn't adding in the tiles, I followed along and am using one from Pern's site for the time being and when input in my code the tiles do in fact show up just fine. The thing is that it goes over my sprites, all but the main one, link. All enemy sprites get stuck underneath the tiles though. I can't really figure out what my problem could be, I have all the sprites set up the same, and written up the same, link and enemy. However, like I said link only shows up.

I'm really at a loss at what to do. If anyone has any ideas please let me know, I've went through perns site many times and tried messing around with the code for hours but nothing is working.

#22981 - tepples - Fri Jul 02, 2004 2:46 am

What are the priorities of your backgrounds and sprites set to?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#22982 - Op Ivy - Fri Jul 02, 2004 3:21 am

I've tried the sprites in all priorities, 0 to 9. However, link is on default and he shows up. I haven't changed priority on the bg though, didn't know you could actually. I'll be giving that a try then.

#22984 - poslundc - Fri Jul 02, 2004 3:53 am

Op Ivy wrote:
I've tried the sprites in all priorities, 0 to 9.


...

There are only four priority levels.

Dan.

#22985 - Op Ivy - Fri Jul 02, 2004 4:10 am

Ah well, I checked in even more just in case ;)

#22987 - Op Ivy - Fri Jul 02, 2004 4:19 am

Edit : Sorry I figured it out. Now I'm finally starting to get this ;)


Ok, I've tried setting the priority on the bg. With
#define BG_PRIORITY(x) x
in my header file, and then BG_PRIORITY(3); by itself in the code (unsure if thats how you're supposed to do it or not). Then I set the priority for my sprites all to 0 and they still are being buried below the tiles. Am I doing something wrong with the priorities? If you couldn't tell, I am quite a noob at this.. only been working on it for under a week and am rather confused here.

#22994 - col - Fri Jul 02, 2004 9:58 am

Op Ivy wrote:
Edit : Sorry I figured it out. Now I'm finally starting to get this ;)


Well, If you figured it out, you should be posting an explanation of what the solution was - then, if someone else has the same problem, they can find an answer without having to start another thread.

Think of it as your way of giving a bit back to the community - instead of just take take take ;)

cheers

Col
Quote:



Ok, I've tried setting the priority on the bg. With
#define BG_PRIORITY(x) x
in my header file, and then BG_PRIORITY(3); by itself in the code (unsure if thats how you're supposed to do it or not). Then I set the priority for my sprites all to 0 and they still are being buried below the tiles. Am I doing something wrong with the priorities? If you couldn't tell, I am quite a noob at this.. only been working on it for under a week and am rather confused here.