## Number of fast moving objects that newton can handle

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

### Number of fast moving objects that newton can handle

I am writing a game that is a 3d space shooter with newtonian physics. In the game I need to have up to 1000 m/s moving objects. With objects moving this fast I need to use either continuous collision mode or run the physics engine at 1000 fps to prevent objects from passing through each other on collisions. The problem with this is that I can only add about 200 simple box-shaped objects to the world before the fps drops below playable level. Is there some kind of "magic trick" with what I could add more fast moving objects to world without the fps dropping too much, or do I need to abandon this project ? The collisions would not need to be that accurate the main thing is that collisions would always be detected.

Another related question which basic form is faster on checking if collision has accured ,a box or sphere?
jargo

Posts: 3
Joined: Thu Nov 13, 2008 4:20 pm

### Re: Number of fast moving objects that newton can handle

Raycasting and Object-casting are probably what you should use for your projectiles.
Help improving the Newton Game Dynamics WIKI

JernejL

Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

### Re: Number of fast moving objects that newton can handle

Delfi wrote:Raycasting and Object-casting are probably what you should use for your projectiles.

Is running 1000 raycast calculations per frame faster than having 1000 fastmoving objects in the world with continuous collision mode turned on?
jargo

Posts: 3
Joined: Thu Nov 13, 2008 4:20 pm

### Re: Number of fast moving objects that newton can handle

I'm not qualified to say that and i have no time to generate a benchmark to see what is faster, so i suggest you try, but i'd guess 1000 raycasts would be a lot faster since it doesn't generate contacts between colliding bodies.
Help improving the Newton Game Dynamics WIKI

JernejL

Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

### Re: Number of fast moving objects that newton can handle

Yes, much faster. I used ray casts all over the place in my ray tracer - at 128x128 (16384 ray casts each frame) it ran at practically 60 FPS, so 1000 ray casts should be nothing.
agi_shi

Posts: 263
Joined: Fri Aug 17, 2007 6:54 pm

### Re: Number of fast moving objects that newton can handle

and for the next beta ray cast just had a turbo bust.
Julio Jerez
Moderator

Posts: 11155
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

### Re: Number of fast moving objects that newton can handle

Julio Jerez wrote:and for the next beta ray cast just had a turbo bust.

Sounds like I might have to revisit my ray tracer
agi_shi

Posts: 263
Joined: Fri Aug 17, 2007 6:54 pm

Return to General Discussion

### Who is online

Users browsing this forum: No registered users and 4 guests