Page 1 of 1

How many sprites?

Posted: Thu Aug 05, 2004 11:16 pm
by o_O
I am trying to make a game, I am using sprites which are 10x32. I was wondering how many of them could i use without running out of memory.
I have 7 different pics for moving left, 7 for moving right, 5 for up and 5 for down, that is all without masks. Is there enough emory for me to create the masks or will i have to cut down on the number of sprites. So far that is all for one character.

Posted: Fri Aug 06, 2004 12:41 am
by barok_unlogged
i'm guessing thousands. you have 64k of memory to use. in my rpg engine i have a double buffer, 4 maps, up to 10 sprite sets, 4 tilesets, all without running out of space, so i think you will have enough space.

truth be told, we don't know how much. use the command:

fre(-1) to find out how much free space you have.

Posted: Tue Aug 31, 2004 7:17 am
by Anonymous
Look, a 10x32 sprite takes up 10*32+4=324 bytes of memory, considered that 1 byte is one pixel (256 colormode).

Now, you have 65536 bytes to spend according to barok, so you can make 65536 / 324 = very much (around 200), before your memory is full. ;)

Posted: Tue Aug 31, 2004 12:45 pm
by Z!re
There are ways around that...


I'm using a 32MB world map, and over 2200 tiles, all of which are 64x64...

Not counting the sprites, which range from 32x32 to 128x128...


Only loading the needed psrites into memory is the trick.


Like... you don't need the LAVA tile, when you're in the smiths house, do you? (Unless there's lava in there, which i doubt)

Posted: Wed Sep 01, 2004 7:28 am
by Anonymous
We were talking about sprites in conv. mem. ;)

I use EMS (or XMS) too for storing sprites, and I'm also storing thousands of them in it easily ;)
Z!re wrote:Like... you don't need the LAVA tile, when you're in the smiths house, do you? (Unless there's lava in there, which i doubt)
lol :lol: I have lava in my house... (huh? do I? ;))
But, you're right. I only don't use it often for my games, I usually load tiles separately each level. Each level file contains a 'tileset' flag which indicates which tile packets to load. ;)