multiple sprites
multiple sprites
I made a game and I only have on sprite and I want to put some more in my game. I used dmaCopy to copy the tiles and palette. I copied the palette to SPRITE_PALETTE. Where would I copy the other sprites' palettes?
Re: multiple sprites
Ideally, you want them to all use the same palette. If that's not an option, then you need to use extended palattes. You will run out of palettes very quickly if you use a different one for each sprite. There are only 16 available in extended palette mode.
Re: multiple sprites
If I'm not mistaken, you have to assign a location for each 16 color palette you allocate for your sprites. The first one would start at [0], but for example if you were to insert the third palette you would do something like SPRINT_PALETTE[3 * 16]. What I have seen done (and also personally do) is to use the sprites ID number as a multiplier: SPRITE_PALETTE[sprite1.id * 16].
Re: multiple sprites
Sure, you can use 4bpp sprites and have each sprite use one of the 16 rows in the main palette. I just make all my sprites the same 8bpp palette and not bother with having to choose a palette slot, which also doesn't limit me to 15 colors per sprite.
Who is online
Users browsing this forum: Ahrefs [Bot] and 7 guests