Converting to Jme engine

Hey I am thinking of converting a game of mine to jMe. I have created my own engine but it has become too much a hazzle to maintain. I spend more time fixing the engine than fixing my game. The engine is based upon LWJGL.

Currently I have following features

    Simple timebased physics engine, movement and intersection based upon bounding spheres.

    SoundManager based upon OpenAL


    Hud manager

    GUI system - buttons,panels, textbox

    model loader - obj format[/list:u]

    Now I think that Jme can do this too. But my worry is that I have to start all over. I would like to keep parts of my rendering logic. How hard it is to fit in in the Jme?

    Also a Good beginning toutorial. starter.pdf is it up to date?

    Thankyou for your time

It’s hard to give a general answer, but I think it’d be fairly easy, especially if your own engine is scenegraph based.

Also, I don’t believe all your work has been for nothing - e.g. jME hasn’t planned for a SoundManager until v0.12.

About the physics engine, you might want to take a look at the odejava interface available in the Third Party Apps section.

I think the Users Guide is fairly up to date - not much (nothing?) brought up in it has changed.

Hope that helps.

I was hoping to replace my physics system . My intersection resolve is very primitive… obj A and B just bounce off each other as they were spheres

My render engine is crap I have lots of visual bugs, so jMe should probably help me here.


In this case, me and per are your new best pals! Hehe

Me and per have created a physics system for jme based on ode (per has already mentioned this) and its very easy to use.

Jme itself is a very good scenegraph, very easy to use once you get the gist of what is what, and how things are used.

Let me tell you the advantage of jme over your current system and how it can help to improve things:

Model formats

Yours uses OBJ format, which jme can also import. However, jme relies on a format (the .jme format) and it converts your obj to the .jme format. The .jme format is very very fast. If you look at jmetest.renderer.loader.ObjToJmeTest you will see how fast it is!

It also has Md2, Md3, 3DS, .ms3d and Milkshape ASCII support. And more to come!

Physics Simulation

As ive mentioned before, our physics system (its a third party app) relies heavily on ODE. And ODE is used industrially to simulate physics. Check out their site at to see what types of games have been made by this physics system.

Render Manager

Im not sure what you mean by this, but i will have a crack at it. jME has a very sophisticated manager whereby it will automatically know which objects should be displayed in Ortho mode, which should be displayed in 3D mode. If in 2D mode, the z order can be specified. If in 3D mode, it will render the transperant objects in the correct order so that they look right. This is called the RenderQueue in jme.

jME geometry will also “inherit” or override renderingn states from its parent. Some things like light states can be inherited so that all the children are lighted properly. Ofcourse you can override this and only have certain children lighted and others not.


I think this is the area in which jme is “slightly” lagging behind. We used to have a person on the boards called Arman and he did all the sound things. It binds to OpenAL and is skillfully linked with the scenegraph so as to give sound in its proper position. However, there are things that still need to be improved over at that area and your help is greatly appreciated.

Hud manager

I dont know what you mean by this also, but our current HUD (we call it UI) is under development. We have billboards, buttons, checkboxes, text fields, and now a progress bar (im sure ive left something out). Any new components are welcome and as long as they are not game specific and integrate nicely to jme and its current UI, it will be accepted.

I wouldn’t worry about starting over. I will be here to help you (yer, run now! hehe) and the people here are very helpful, even on the stupidest things (i should know! ive asked alot of stupid questions here).

I would say go for it. You will have more people working on the rendering for you, so thats out of the way. Physics is under development. Sound and HUD are also in. So all you really need to worry about is getting a game out!

And if you do, we have a project showcase out in the front page to give you some limelight :).

Hope this is of any help to you. And welcome to jme!


Thankyou for the velcome DP. I am sure I will ask alot of stupid questions

I think I will start converting the different features of my game into jME and see how it goes.

I am realy looking forward to having a real speed improvement. my old engine would run 200 FPS on my system. gforce 6800 and Barton 3200+. I suspect it was my pathetic scenegraph and the many mode (2D/3D) switches I made.

You have come at a critical time to be honest with you. The developers (namely mojomonkey, renanse and cep21) are currently revising the entire scenegraph squeesing every ounce of power out of it without changing the API too much.

The current release version is 0.8, when 0.9 is released, it will (as promised ofcourse) will contain alot of performance improvements.

Thats really as far as i can comment about the 0.9 release on a general basis.

But please carry on coverting your project to jme in its current status, most things will not be affected at all, just the internals.

If i can help you in anyway, just post it on, and i’l be here asap. Can’t wait to see what you can come up with!


Well my game is divided into a logic part and a rendering part . I have decided to keep the logic part and replace my rendering with jme. I will also try to keep my scene setup as its very similar to how Jme do it. In that regard I have a few questions

    My logic is poll based, meaning each frame different managers are polled by frametime wich is the time between two frames. Can I continue this strategy with jme?

    My logic all uses rotation translation matrixes based upon 4 vectors. up,down,side and position. Is this something I could easily use with jme, can I pass the matrix or the vectors?. Is this realy an advantage for me. I do alot of math on those vextors.


For your logic. Definetly! This is how ive been doing things, and this is how i shall remain doing things (untill told otherwise to!). It seems a good way of doing things and it hasn’t done me any harm so far. So go for it!

For the vectors thing, i dont really know what you mean. But i’l have a guess.

in Jme, there is a single Vector representing the position of the spatial in the world. Im not sure what that used to be in your old system, but from your writing, it seems to be a matrix, and jme doesn’t provide a matrix for translation.

However, for rotation, there is a directional matrix for rotation which is a 3x3 matrix. The first coloum represents the direction in the X axis, 2nd coloumn is the y axis, and the 3rd is around z axis. The rotational matrix can be set instead using whats called a Quaternion. You might want to read up on quaternions because they are slightly difficult. But their use isn’t:

Quaternion q = new Quaternion();
q.fromAngleAxis(90 * FastMath.DEG_TO_RAD, new Vector3f(0, 1, 0));

The above code rotates the spatial to face 90 degrees in the y direction. So imagine yourself turning 90 degrees while standing up. Notice i said rotates TO face. Not rotates ANOTHER 90 degrees. To do that:

Quaternion q = new Quaternion();
q.fromAngleAxis(90 * FastMath.DEG_TO_RAD, new Vector3f(0, 1, 0));

You multiply quaternions to get them to blend and add rotations onto others.

I am sure that if you convert your vector calculations over to use the above paradigms, you will gain some performance/memory. (mainly from not having as many matrices around)


DarkProphet, this is great.

In my logic all objects in the world have 4 vectors. position, up,down and side(x,y,z or roll,pitch,yaw). When rendering I would put those 4 vectoris in a 4 X 4 matrix(rotation and translation matrix and do a simple GL.multmatrix before rendering the object.

I see you do it in similar way.

I have spend quite alot of time meddling with quaternations. While you can represent an orientation by one quaternation rather than 3 vectors. I prefeer the 3 vectors since, they proove easier to manipulate for me.