Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthorsheisdigital
- CommentTimeSep 11th 2010
Most of my game runs great. There is one place where the frame rate drops to an unacceptable 20 FPS.
I am looking for ideas on any tweaks big or small that will bring me closer to my desired frame rate (30 FPS).
A little info about the game - I am using an emitter to spit particles from 5 different zones so it actually looks like I have 5 emitters on screen. I have already played around with the imageclass to see which yields best results. I want my particle streams to be thick - so my counter is set to around 100.
The overall dimensions of my game are 930 x 500 but only 640 x 480 contain the particles (Im using a death zone to kill particles beyond that point). I'm using a collision bounding box of 640 x 480 because the particles need to bounce off eachother.
The collision box (ON or OFF) barely effects the frame rate.
Any ideas? I'm so close! -
- CommentAuthorRichard
- CommentTimeSep 12th 2010
Hi
If you're using a BitmapRenderer or PixelRenderer, make sure the rectangle defining it is no bigger than you need. So in your case it would be 640 x 480 pixels. You shouldn't need both the CollisionZone and the DeathZone, since the former keeps the particles inside the space and the latter kills them if they move outside the space.
For more specific tips I would need to see your code. -
- CommentAuthorsheisdigital
- CommentTimeSep 17th 2010
Thanks Richard. I am testing with both DisplayObjectRenderer and Bitmap Renderer and am defining the canvas as you mentioned. The reason Im using both CollisionZone and Deathzone is that I want particles to die when they hit the side of the walls instead of bouncing off. But, I still want particles to collide with each other when they are inside the zone. (I have my DeathZone set smaller than my Collision Zone). My project has a lot of custom classes and I wouldnt know which ones to post. I think I'll go through my actions and time them to see which ones might be killing frame rate. I have a custom initializer and that might be doing too much. -
- CommentAuthorRichard
- CommentTimeSep 21st 2010
A CollisionZone doesn't make the particles collide with each other, it makes them collide with the edges of the zone. To make particles collide with each other you need the Collide action.
1 to 4 of 4
