#18077 - Darmstadium - Sat Mar 20, 2004 2:59 am
In my crappy little game, I want a message to pop up in the middle of the screen that tells you that it is your turn once the other player is done. I tried to make a sprite that has a message on it along with two sprites that have picture of the numbers 1 and 2. So the message sprite would go in the middle and you see "Player GO!" and then I would try to put one of the sprite with the numbers in between Player and GO!, but it's priority wasn't high enough to go above the message sprite. So I made the number sprite have priority 1 and the number sprite have priority 0. But then both the sprites apeared behind my background. I tried making the background have priority 3, but that didn't do anything. Does anybody know what I'm trying to say? If anybody does, do they know how I can fix this? Or does anybody know a better way to display a message in the middle of the screen? Any way, I would be incredibly grateful for your help.
#18078 - johnny_north - Sat Mar 20, 2004 3:32 am
You have 11 characters for either message. I think the whole "Player X GO" can be fit into a 64x32 sprite. Create a bitmap for each of the 2 messages. I wouldn't bother trying creating a "Player GO", "1" and "2" bit maps or data chunks where you write in a "1" or "2" (this would just be a hassle and only a little memory savings - although if you're new, it might be a good exercise).
Now set up one OAM with an associated 64x32 size and shape. Just change the tiles out when you need one or the other message.
#18086 - poslundc - Sat Mar 20, 2004 4:12 am
Don't mess with the priority settings for something like this. Use OAM ordering to determine sprite-vs-sprite priorities.
OAM entries with a lower index display above OAM entries with higher ones.
Dan.
#18087 - Miked0801 - Sat Mar 20, 2004 4:27 am
Yep - beat me to it :)
#18108 - Darmstadium - Sat Mar 20, 2004 6:03 pm
huh...i never hear of that before. THanks a lot guys!!!!!!!!!!!!!!!!
#18129 - poslundc - Sun Mar 21, 2004 4:45 am
The Pern Project Tutorial - Day 3: Sprites covers it when explaining the priority field in OAM.
Dan.