PDA

View Full Version : My Sprite Count Demo



robotz
January 20th, 2008, 08:58 AM
Hi all,

Just wanted to say thanks to everyone who has helped me so far - AS3 is proving to be a complete blast :)

Here is my latest test - basically to see how many 32x32 sprites I could get running together smoothly at 30fps. I was really pleased with the results. Each sprite has a random alpha channel, direction and speed - when it hits the fringe it respawns at a new location.

On Firefox I can get 2,500 smoothly moving fish for 30fps, on IE I can push that up to around 3,500.

Here is the demo - you can set the fish rate yourself, I'd love to know what the max you can push it to is (before it starts to get too jerky)

http://www.fatal-design.com/fish_timer/

On larger numbers of fish let it run to around 10 seconds for things to settle down.

Cheers!

ArmoredSandwich
January 20th, 2008, 01:06 PM
Nice results xD.

Yea, I wish I could reply with something more usefull, but I can't :p .

robotz
January 20th, 2008, 02:20 PM
No problem :) Just let me know what kind of number of fish you could get before it started to run badly! (and what spec computer/browser you have)

ArmoredSandwich
January 20th, 2008, 02:29 PM
Well I could push it to 5000 without noticing too much lag. The problem was that I could hardly see the lag as there were just too many fish. If you put in an fps counter I could tell you that.

I have a dual core e6000 and Geforce 8800 GTS. I used Firefox.

parkerdc
January 20th, 2008, 02:54 PM
I'm not as cool/lucky as ArmoredSandwich, P4 2.6, 1GB ram and of course IE7, Windows XP. Radeon x1650 w/ 256 MB

1000,2000,300 ran great.
4000 the fish swam great, but my computer started to lag. If I move the IE window, would lag.
5000 fish swam, had pauses on my computer.

robotz
January 20th, 2008, 03:07 PM
parkerdc - thanks for the feedback, those are figures I would expect from what I have been witnessing now, but I'm glad you confirmed them. It gives me a good 'base line' from which to set some limits in my game.

I'll try a few more tests and see where the main lag comes from first. It'll either be big objects (i.e. large volumes of bitmap data) or the quantity of them. i.e. can flash handle 3000 objects if they are 256x256 in size as opposed to 32x32, or is it the overall amount of pixels it has trouble with.

alexgeek
January 20th, 2008, 03:28 PM
I have a 4GB PC with vista ultimate, 512mb gfx card and an awesome processor but my it still lagged for 5 seconds when I put it on 5000.

robotz
January 20th, 2008, 07:10 PM
Doesn't surprise me, 5000 is a lot. When I put it on 5000 it starts off really bad for the first few seconds and then settles down into a sort of rhythm - albeit a jerky one.

I have a similar spec PC to you, but really only the CPU and *browser* is relevant (IE7 will run it so much faster). Graphics card makes no difference beyond a certain spec, Flash doesn't talk direct to the GPU anyway.

tarwin
January 23rd, 2008, 10:56 PM
You'll find that Firefox Beta 3, Opera (maybe) and Safari will run it faster than IE, but Firefox 2 will be slower than IE. An FPS counter would help if you want feedback.