Advertisement Jump to content
Sign in to follow this  

2D Physics/Game Engine For Massive Environment

This topic is 1555 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


I'm looking for a 2D physics engine recommendation. C++ would be preferred, but is not required. I'm looking for something that can handle solar-system level speeds/distances/sizes, while still being able to simulate small (meter-sized) objects.


Some requirements (in no particular order):

  1. Not having to manage too much low-level stuff (screen buffers, graphics, memory management, etc..)
  2. I need to have my largest objects at least 6-8 orders of magnitude larger than my smallest ones, preferable more.
  3. Distances: Without going into exact numbers, I'm looking for an engine that can handle distances/world sizes that utterly dwarf the massive objects described above.
  4. Velocities: extreme speeds to match the distances described above. (If we are talking solar system scale, it should be able to handle significant-fraction-of-c speeds. Newtonian Physics of course.)
  5. Continuous Collision Detection (really important with those kinds of speeds).
  6. Good rigid body dynamics, with multiple shapes available (a bare minimum of rectangles and circles)
  7. Good broadphase collision system to help handle a large number of objects, and compatible/effective with the kinds of speeds/distances described above. Think about a planet going around a sun (at high speed of course), some things flying past the planet at extreme speeds (think 100's or 1000's of km/s), some other things in orbit around that planet, others flying/falling in it's atmo, and others resting on it's surface. All this while also simulating the rest of the solar system (and maybe similar things on other planets). The broadphase system should be able to handle all of this without compromising the continuous collision detection, but still be "smart" enough to not check too many of those objects against too many others.

To clarify #5, a situation it should be able to handle: Imagine a sci-fi projectile, say 1 meter large, launched at 1,000km/s from 10,000km away, aimed perfectly at a target only 20 meters large. The engine should be able to naturally simulate that (no work-arounds or hacks!), detecting the collision and giving me an accurate time and location of impact, without any problems. Oh, and that target object is surounded by other objects that the projectile barely misses on it's inbound course.


I looked at Box2D, and it seemed like it might have been everything I was looking for, until I dug into it and realized it failed #2 (object sizes) rather spetactularly: it could only handle about 2 orders of magnitude difference in object sizes. Any good engines out there that meet my needs?


Thanks in advance for your time and help!


Share this post

Link to post
Share on other sites

Bump.  I've been asking this all over the web but haven't gotten a good answer yet.  I know this sort of thing is doable with double precision for positions and velocities, good broad-phase collision detection, and good continuous collision detection, but I haven't been able to find anything suitable anywhere.  I really don't want to spend years coding my own...

Share this post

Link to post
Share on other sites
If performance is not an issue, you could use the Bullet engine and lock the position to a plane and rotation to an axis.
Bullet has optional 64-bit precision, continuous collision detection and don't require dynamic linking.

If you end up making your own engine anyway, the trick is to apply some of the force directly to the position to simulate how the velocity is converted into heat and then measure the difference between the stored velocity and displayed velocity to stop items from rotating by themself.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!