Opinions please?

I’m working on an open source game project. http://deimosproject.sourceforge.net

I was hoping to get some opinions on the physics engine I’ve built. So far, it handles spheres and you can easily implement arbitrary physical forces, such as gravity between particles, springs, etc.

It supports (generalized) gravity and springs out of the box.

Collisions are detected and handled at the precise moment they occur, between integration steps. Collision detection is pluggable and based on an interface, so it is possible to build your own collision detector.

I admit there are some bugs to fix and important features still left to be implemented, but I’d like some feedback.

Thank you.

Are there any demos available which show some features of your engine ?

In the ‘scenes’ directory of the main project archive, you’ll find a bunch of Java source files. These are the test scenes. DO NOT compile them.

Type this from the base directory:
java -jar physics.jar scenes/Bounce.java

If for example, you want to run Bounce.java.

I’m using a runtime Java compiler called Janino ( http://janino.net) to compile the scenes from source. It’s handy for testing and such.

Hope that makes things clearer.

@simulatoralive:

thanks for pointing that out - unfortunately it doesnt seem to work here. Got the following
exception :

Did you download the required libraries, as the documentation tells you to? (In the ‘docs’ directory) Please follow the install directions.

You need to visit the Janino website and download it. This is the exact error I get when Janino is missing.

You’ll also need JOGL (http://jogl.dev.java.net). Use the JSR 1.0.0 version.

Make sure their jar files are in the same directory with the other project jars, spelled and capitalized as follows: “jogl.jar”, “janino.jar”. Please follow the instructions in JOGL’s docs on installing it’s native bits, though you’ll find some hints in my project’s documentation.

Edit: I do not include the libraries in the main archive because it simply bloats the download for people who already have them, I don’t want to include the native bits for every platform and I wish to direct web traffic to the websites of the libraries I use. They scratch my back, so I scratch theirs…

A very amitious project! Are you working on it alone? I love space shooters as well, although I’m generally too lazy to actually get my joystick to play…

Writing your own physics simulation seems overly complicated, why did you choose to write your own rather than to use for example JOODE?

I am working alone. There’s another guy listed as a developer on the project, but only because he used to be in charge of the website (good friend of mine in RL). I’ve posted through the help wanted system on sourceforge.net more than once, but never got a response.

I would love to have help with the project. It would likely take me a bit to adjust, however (setting up CVS, communicating with other developers, setting up and assigning tasks, etc.); I’ve never really worked with others on a project for all that long. That’s probably due to my insistence on doing things differently (people don’t usually believe what I say is possible until I’ve built it).

My guess is that most people look at my projects and go, “WTF?”

Case in point: I built a unix-like system in Java (http://jinx00.sourceforge.net), though I abandoned it in favor of this project (this one is more satisfying, as I’m not slamming my head against the limits of Java every five minutes).

Another example is my 3D modeler (part of this project). I built it for programmers instead of artists. You build models using Java source code, which when run produces the model.

Like I said, I do things differently. Different is good, eh? :wink:

To be honest, I wanted to write my own physics engine so I could learn how it’s done. I also don’t like the style in which the existing engines were programmed. I mean no offense to those who wrote them, I just don’t like them (granted, I haven’t looked at JOODE). This is simply another in a long line of re-inventions of the wheel, because I didn’t like the wheels that were available.

This also isn’t my first physics engine, but it is the most capable so far. Once I have the rotational bits working and a few more collision detectors, it will fill my needs nicely. Everything else (more forces and pretty eye candy) is just icing on the cake.

Hey, simulatoralive.

I see your project as very interesting, unfortunately (and I think it’s representative of many, if not most, guys here) I already have many projects.

I find interesting your “doing it differently” way. We’re a bit in that philosophy in the Xith3D project and we’re thinking about the “after-Xith” (new scenegraph project after 1.0). I’m personnally convinced that tons of things could be done better.

Your Physics lib e.g., seems interesting since so far the ones I know in Java don’t do “collision fixing between steps” (at exact collision time).

I wish you good luck for the future.

Also, if you want any chance to get noticed by the “busynessed men” :slight_smile: just make your demos available in a ready-to-launch format, (e.g. JWS-like or All in one jar).

Thanks for the advice. I hadn’t thought much about making the demos easier to use.

I could write a simple demo application that presents a list of scene files and lets the user select one. Shouldn’t take much to package it as a JWS app (something I’ve never done before). I could even have it extract the command line arguments from the jar manifest and/or have it scan one of the directories in the jar for the demos. I love this idea.

I think I’ll do the same for the 3D modeler and the sound modeler, once I do some more work on it (actually turning it into a modeler).

Thank you for sparking a good idea!

All right, the Java Web Start version of the physics demonstrator is up on the website.

You can find it on the following page, along with some quick notes on what to expect when you run it:
http://deimosproject.sourceforge.net/Readme%20(Physics).html

If you just want to go straight for the JNLP file, here’s the URL:
http://deimosproject.sourceforge.net/jaws/physics.jnlp

Just keep in mind that when you select one of the demos, the first window will vanish, a few seconds will pass and then the rendering window will appear. To load a new demo, you’ll have to run the application again from the beginning, using the JNLP file.

The new demo code is a little rough, but this should be far easier for the non-programmer to start up. It will take care of downloading all the important bits for you. I’ll be polishing it more in the future; I just wanted to get something simple to use up ASAP.

I had to sign the Janino Jar myself, as it’s author does not currently provide a signed version. I sent the author an email about that. Hopefully I’ll get a reply and a solution for that soon.

Edit: I just barely got a reply. We should have that fixed the right way soon.