Limit on maximum number of sprites?

slinga

Established Member
Hey guys,

Is there a limit to the maximum number of sprites the saturn can handle? I'm following Rockin' B's method of displaying sprites, and after 35 nothing appears on the screen. Is there a maximum number\size limitation I'm exceeding? Thanks in advance.

Edit: My spr_data.c file has values store for around 41168 bits, which I think is way more than the saturn can handle.
 
Yes I think it's too big :

41168 bits ~ 5 Mo.

Two solutions :

- use paletted sprites ;

- if all sprites are not used all the time, load sprites dynamically from a binary file on the cd in sprite vram when you need it.

The first solution is simple (I can provide you code samples), whereas the second one is more powerful. They can be combinated.
 
Hmm...I'm not even up to the point where I can make use of paletted sprites. All the sprites I have right now our unique sprites. I plan on implementing paletted sprites later on, hopefully there isn't a huge difference.

I think the big thing killing me is that I'm using 32 bit colors for all my sprites whereas each sprite is only 16 colors at most. I'll look into converting all the *.c files to fewer colors.

If not I'm going to give your dynamic binary loading thing a shot.
 
My spr_data.c file has values store for around 41168 bits, which I think is way more than the saturn can handle.

Er...I'm not sure I understand this statement. I know the Saturn has memory restrictions, but does this mean it can't handle a source file with data that approaches 41K?
 
It's not the size of the source file I was referring to. In spr_data.c (or whatever file you define your sprites), you have list the sizes of the previous sprites you've used. So I'm using 40,000 pixels * 32 bits per pixel = a whole lot of bits. I think the saturn has less than 2 megs of usual memory.

Edit: Just to clarify, I have no clue what I'm doing, I'm flying blind :thumbs-up:
 
Well, that would be 40000 X 4Bytes = 160,000 or 160K, right? Is that too much data? I thought the Saturn had near 2 megs of RAM.

Flying blind is a good term. I like that term :)

Are you just defining the sizes of the sprites in this file, or are you really writing out the data pixel by pixel?
 
A bit of an update...

Seems like the issue I was having was due to the sprites themselves that I was trying to display. It wouldn't let me display a 8*1 pixel sprite, but 8*2 was fine. Now the sprites I need display fine in Giri Giri. On a real saturn none of my sprites display, but all of the text output is there. This is odd because in an earlier build (with fewer sprites) my sprites displayed correctly. I'll have to spend more time looking into, but I think it's a limit of some sort.
 
Originally posted by slinga@Thu, 2005-01-06 @ 03:43 PM

It wouldn't let me display a 8*1 pixel sprite, but 8*2 was fine.

Yes, all heights and widths combinations are not usable for sprites. Give a look at the sgl tutorial.

(oh, and my size calculation was wrong, in case you didn't notice...)
 
vreuzon: I removed my giant title logo and now everything displays fine on a real saturn. My bit definitions went from 40k to 15k (yes that one image was THAT huge). I still think there's some size limit I'm hitting. I'll check the docs for more info.
 
Where are you placing the logo? VRAM or LORAM? The only bottlenecks I remember was uploading stuff to VRAM every frame, or taking too mutch time to draw sprites. The first is in one of the Technical Buletins, the other is in the VDP1 register documentation, I belive. I haven't touched them in over a year so bear with me. ^^;
 
Back
Top