number of moving physics objects

View previous topic View next topic Go down

number of moving physics objects

Post  waterbuffalo99 on Sat Aug 08, 2009 9:57 am

In my game I want to have several moving physics objects, at times many of them will be in the scene at once. "Several" is 5 to 15.

I'm finding that 6 is a stretch. My rendering and physics framerate is dropping to around 4 to 6 fps. Is this to be expected? What can I do to improve this performance?

thanks,
George

waterbuffalo99

Posts : 36
Join date : 2009-06-03

View user profile

Back to top Go down

Re: number of moving physics objects

Post  sio2interactive on Sat Aug 08, 2009 10:29 am

Try to use simple collision shape with large static triangle mesh. The most CPU intensive shapes are convexhull... and of course soft body...

You can use tutorial061 as a benchmark and duplicate the object of type of your choice to test the performance...

Having another physic thread is also helping... as well has having concentrating the physic calculation among multiple frames instead of forcing the simulation step to be executed on everyframe.

But... once again every games are different... what type of game are you working on?

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

moving physics objects

Post  waterbuffalo99 on Sun Aug 09, 2009 3:05 pm

I assumed that objects like your example palm trees that are a complicated shape, that convex hull would be less cpu intensive, but you're saying no to that.

So I'll make sure all my static objects are simple. Does that mean even if they are a cube, cone, etc. I should not select that for the "bounds" type? Or just that I should avoid Convex Hull? I did in fact have a few objects where the bounds type was convex hull.

-George

waterbuffalo99

Posts : 36
Join date : 2009-06-03

View user profile

Back to top Go down

type of game

Post  waterbuffalo99 on Sun Aug 09, 2009 3:25 pm

The game type is action adventure. The game play will be somewhat like Destroy All Humans 2 (but the theme is completely different).

-George

waterbuffalo99

Posts : 36
Join date : 2009-06-03

View user profile

Back to top Go down

Re: number of moving physics objects

Post  sio2interactive on Sun Aug 09, 2009 3:35 pm

What you should do for is:

- For shape like a house, you can easily set the bound to cube.

- For shape like a tree (like the palm tree in tutorial04), do not set the collision on the object but on another invisible object, like in this case a cylinder at the base of the tree...

In other words, for all "regular" shape that can easily be recognize of one of the basic shape, simply use the appropriate bound. For all more complex irregular shape use and invisible geometry (like an empty or another shape) where is make sense.

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 38
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: number of moving physics objects

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum