Sprite engine - how many sprites can YOU handle?

Game development specific discussions.
DaveUnit
Posts: 239
Joined: Apr 20, 2006 15:47
Location: Central MA

Sprite engine - how many sprites can YOU handle?

Post by DaveUnit »

I made a small sprite graphics engine and need to test it on you guys.

This is a graphics engine, it does not handle collision or anything like that, it is not meant to, a collision engine would be a seperate entity.
What it does do, however, is provide an easy way to create a complex sprite. One with several different animations. In this test it is a sprite with 4 animations, one for walking north, south, east. and west.
Tile maps are also supported which are made up of a modified sprite type.
It also supports instancing, so you can make copies of a sprite that have their own unique coordinates and such but share the same animation and graphics data.

I'm interested in knowing how it performs. It performs great on my machine but I have a rather fast computer:
pentium d 3.4 ghz
2 gb ram
ati radeon x1950 gfx card

Just follow the input prompts at the beginning of the program.

Use arrow keys to move around map.

Just post your specs, the settings you chose and the fps you got.

UPDATE 2/28:
- a bunch of small fixes and improvements
- needs a lot of cleanup now that things are close to being done

here's the link to the file:
http://www.mediafire.com/?cghitz03hfn - .zip - 174 kb

Thanks to all that test!
Last edited by DaveUnit on Feb 29, 2008 2:01, edited 7 times in total.
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Post by D.J.Peters »

Hello Dave
with my older AMD XP 2200 (1.8 GHz.) and NVIDIA ti4200 AGP 8x card ~1200 sprites=30FPS

Joshy

(By the way you will never have thausends of sprites on one screen
and the MMX blitter is realy fast. the problem you have to solve
is collision detection and background blitting (Z-order) and most
time consumed soft screen scrolling)
Sandstorm
Posts: 29
Joined: Dec 03, 2007 3:50

Reply

Post by Sandstorm »

Pentium 4 3.2
1gb RAM
Intel GMA950 Video Card (built in)

Even on the aging Pentium 4, I managed ~5400 sprites at 30fps.
the problem you have to solve is collision detection and background blitting (Z-order) and most time consumed soft screen scrolling
Keep us posted on your updates!
DaveUnit
Posts: 239
Joined: Apr 20, 2006 15:47
Location: Central MA

Post by DaveUnit »

@DJ Peters: I know I will never need that many. I just wanted to see how fast it was on lower end computers. No sense in making a game that runs great on my machine but barely runs on a computer with lower specs than mine would be a waste of time.

I've also done some basic collision detection before (not pixel perfect, I guess I could but I think it will be unnecessary for and rpg). if I wanted to make a side scrolling platformer, sure I'd want pixel perfect. The collision precision (lol) will be determined by my needs later so I'm not worrying about it now.

I've done z order blitting before also, just sort the sprites by their y value so a sprite further back won't overlap one in front of it.

What do you mean by soft screen scrolling? The way I achieve scrolling is by having a camera coordinate and then only what the user sees is drawn and then you just move the camera around and voila, scrolling effect.

Thanks for the input so far guys!
SSC
Posts: 319
Joined: May 29, 2005 4:47
Location: Around
Contact:

Post by SSC »

I can get away with ~11000 before I go under 30 fps

I have:
3.2 Intel Duel Core Duo
2gb pc 6400 DDR2
nVidia 8800GTX 768 mb video memory
aleofjax
Posts: 117
Joined: Oct 18, 2007 8:10

Post by aleofjax »

Wow do I need a new computer!

I had to go down to 700 before I could get 30fps!

p4 1.4
768 M RAM
RAEDON 9200
Win 2K Pro
Mlok
Posts: 123
Joined: Mar 08, 2006 1:07
Location: Czech Republic
Contact:

Post by Mlok »

4500 sprites -> 29 fps
AMD Sempron 2600+
nVidia 7600GS
512MB DDR 333
DaveUnit
Posts: 239
Joined: Apr 20, 2006 15:47
Location: Central MA

Post by DaveUnit »

@aleofjax: 700 should be okay. You might need to run at a lower res when maps are added, maybe 640x480 rather than 800x600. going into my code and changing GFX_WINDOWED to GFX_FULLSCREEN should yield an increase as well. also when maps are added not all of the tiles will be animated so there will be less updating to do every loop. Maybe I could even have it update only once every few loops for a small performance increase.

I'll try to make another test prog that asks how many sprites do you want to actually be animated, how many loops before each update, screen res, and fullscreen/windowed.

hopefully I can get it perform better on your machine aleofjax.

edit: MORE SETTINGS ADDED

@aleofjax: screw with the settings and try to get 1000 sprites on screen with at least 30 fps.
cha0s
Site Admin
Posts: 5319
Joined: May 27, 2005 6:42
Location: USA
Contact:

Post by cha0s »

I did like 3, 1, 700, 700, 1 and I got 30 fps

700 mhz, 256 ram
aleofjax
Posts: 117
Joined: Oct 18, 2007 8:10

Post by aleofjax »

Alright:

640 * 480
Fullscreen
1000 Sprites
1000 Animated
1 loop before update
------------------------
30 fps!
DaveUnit
Posts: 239
Joined: Apr 20, 2006 15:47
Location: Central MA

Post by DaveUnit »

@aleofjax: sweet!

@cha0s: that's pretty good since a map on that res would draw 13.3x7.5 tiles(99.975 totals) of 24x32 (the dimensions of the sprite). So even taking into account npcs and multi-layered tiles there will be no need to have anywhere near 700 sprites on screen at a time at that res.
elsairon
Posts: 207
Joined: Jul 02, 2005 14:51

Post by elsairon »

1.8 Ghz, 512MB Ram

30 FPS with 2700 Sprites
dodicat
Posts: 8240
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Sprite engine - how many sprites can YOU handle?

Post by dodicat »

DaveUnit wrote:I made a small sprite graphics engine and need to test it on you guys.

This is a graphics engine, it does not handle collision or anything like that, it is not meant to.
What it does do, however, is provide an easy way to create a complex sprite. One with several different animations. In this test it is a sprite with 4 animations, one for walking north, south, east. and west.
It also supports instancing, so you can make copies of a sprite that have their own unique coordinates and such but share the same animation and graphics data.

I'm interested in knowing how it performs. It performs great on my machine (takes ~5000 sprites to bring it below 30 frames) but I have a rather fast computer:
pentium d 3.4 ghz
2 gb ram
ati radeon x1950 gfx card

Just follow the input prompts at the beginning of the prog.
Try to find a way to draw over 1000 sprites (animating however many you want) and maintain an fps >= 30

Just post your specs and the settings you chose and the fps you got.

SMALL UPDATE:
- did a quick(well slow, just threw in an insertion sort) depth sort with sprites
- now hitting the enter key gives all sprites a random animation, just to show that these are truly instanced.
- added more customizable settings

Anyway, here's the link to the file:
http://www.mediafire.com/?6m9dz44x7wn - .zip - 159.49 kb
two pentium3 @ 933MHz each
768 Mb. rambus
NVIDIA geforce 2 gts @32mb agpX4
Win XP Pro sp1:

640X480
Full Screen
1000 sprites
1000 animated
1 loop
GOT: 35 fps
DaveUnit
Posts: 239
Joined: Apr 20, 2006 15:47
Location: Central MA

Post by DaveUnit »

what I'm seeing is that updating and amount of updates isn't gonna be a performance problem whatsoever, and that your res and number of sprites are the key factors (duh).

thanks for the info, everyone!
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Post by Lachie Dazdarian »

640*480.
Fullscreen.
1000 sprites, all animated (does this matter?).
Result: 25 FPS

My specs:
Pentium III, 866 Mhz, 196 MB RAM
Windows XP
ATI 3D Rage Pro
Post Reply