• Game library
    • 3D space
      • “Particles” are the main moving agents, they don’t collide with each other but only with Static objects. They have radius (they are spherical), mass and density. So they are not really particles, but neither are they really physical objects..
      • “Static” objects are the main obstacles, and particles will collide with those. Implemented shapes (with all combinations of collisions): Box and Sphere.
    • support for gravity and environmental forces
      • user can define their own World concrete classes, eg some games will have a fixed gravity while other might vary it in several locations
    • broad-phase algorithms can be defined to identify possible collisions (eg, get all static objects close to a certain point)
      • ideally one should implement an octree/kdtree to be able to very, very quickly get objects close enough to collide
      • I only implemented an ArrayGrid class that uses only the x and y coordinate to store 3D points, since I had very limited z-axis usage. For points that are most often on the x-y plane this is very efficient (both for memory, since everything is stored in a 1D array, and computational efficiency since usually only a handful of cells must be checked)
  • License: open source, Apache 2.0
  • Language: Java 7
  • Platforms: Linux, Mac and Windows
  • Github Repository
  • Download N/A yet

I’ve played around with pure Java particle physics engine development, here. It is roughly working but still a lot of work is needed on the API: physics engines are supposed to be very modular so as to be integrated in very different projects/games.

In brief, I needed an engine where all movable entities were sometimes points (eg, only checking whether the actual point is inside another object) and sometimes spheres (using also the radius for collision checks). Which is is a very weird use case and likely not interesting to most potential users.

It was fun and a nice experiment but it’s definitely not good for other projects — yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.