Hi,
I'm trying to make a very simple penalty kick game for Uzebox, i could do the map drawing but
i'm very troubled with the sprites, and if someone could help me
Since a penalty kick don't need many sprites (Player, Ball and for GK) , i'm trying to make the sprite biggest as possible
i've tried 7x5 sprite, and 4x4 sprite with no success? so what's the limitation for creating sprites in Uzebox?
Is there any MapSprite2 limitation?
Is there any MapSprite2 limitation?
Last edited by Gosma on Thu Mar 20, 2014 1:14 pm, edited 1 time in total.
Re: Is there any MapSprite2 limitation?
sorry forgot to mention... I'm using Video Mode 3 that looks (just looks ) easier!
Re: Is there any MapSprite2 limitation?
The mapping in mode 3 is limited on the number of RAM tiles used. As each RAM tile takes up 64 bytes, you can have ~38 of them at max. This depends on how much global variables you have and which stack size you need for function local variables.Gosma wrote:sorry forgot to mention... I'm using Video Mode 3 that looks (just looks ) easier!
How many RAM tiles are needed for a mapping depends on the coordinates. If a both X and Y coordinates are divideable by 8, you need one tile per 8x8 pixel block. If not, you may end up needing up to 4 tiles per 8x8 pixel block. The mapping function honors adjacent RAM tiles so it's not so problematic, but still, you may reach the limit very quick. My solution would be to limit the player position to x%8==0 before the ball is shot.
Re: Is there any MapSprite2 limitation?
Well My idea was using 32x32 pixel sprite for the player (from using 4 8x8 tiles, the term is 4x4 Mega sprite i think) but the Max i did was 24x24 (using 3 8x8 tiles = 3x3 Mega Sprite).Janka wrote:The mapping in mode 3 is limited on the number of RAM tiles used. As each RAM tile takes up 64 bytes, you can have ~38 of them at max. This depends on how much global variables you have and which stack size you need for function local variables.Gosma wrote:sorry forgot to mention... I'm using Video Mode 3 that looks (just looks ) easier!
How many RAM tiles are needed for a mapping depends on the coordinates. If a both X and Y coordinates are divideable by 8, you need one tile per 8x8 pixel block. If not, you may end up needing up to 4 tiles per 8x8 pixel block. The mapping function honors adjacent RAM tiles so it's not so problematic, but still, you may reach the limit very quick. My solution would be to limit the player position to x%8==0 before the ball is shot.
Re: Is there any MapSprite2 limitation?
That 3x3 player sprite would need 16 RAM tiles when not aligned at all. Have you properly configured the tiles count in the Makefile?
Re: Is there any MapSprite2 limitation?
You're right! I have forgotten this detail, I've changed -DMAX_SPRITES from 14 to 17 and now i can see the legs of my player!Janka wrote:That 3x3 player sprite would need 16 RAM tiles when not aligned at all. Have you properly configured the tiles count in the Makefile?
If you compare both screenshots 1st my player 16x16 and 2nd 32x32
Thanks a lot
- Attachments
-
- penalty_kick2.jpg (137.06 KiB) Viewed 7834 times
Re: Is there any MapSprite2 limitation?
Anyone could pls help me?
I've made one tileset in gconvert with 223 unique tiles, and one spriteset also in gconvert with 86
unique tiles, so when i put both tileset/spriteset to run in Uzebox looks like some tiles/sprites do not appear.
Is it a limitation? or i am missing something
Thanks for anyone who could help me.
I've made one tileset in gconvert with 223 unique tiles, and one spriteset also in gconvert with 86
unique tiles, so when i put both tileset/spriteset to run in Uzebox looks like some tiles/sprites do not appear.
Is it a limitation? or i am missing something
Thanks for anyone who could help me.
-
- Posts: 1445
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Is there any MapSprite2 limitation?
Video mode 3 has 8 bit index.
That would mean 255 or 256 total tiles. Including the ram tiles you have specced.
That would mean 255 or 256 total tiles. Including the ram tiles you have specced.
Re: Is there any MapSprite2 limitation?
(256 8bit index)-(223 unique map tiles)=33 max left for ram tiles. 223 tiles seems a bit steep for the scene you have there, my guess is you could optimize it and have more wiggle room and probably look just as good. Could you post your tileset in .png format?
Re: Is there any MapSprite2 limitation?
Can you identify what tiles are missing? Are they at the end of the tileset? What's is the symptom with sprites, they are not displayed at all or displays garbage or wrong tiles?