Management Improvements / General Comments

Hi all!

I’ve very recently been looking around for a suitable 3d rendering /game engine in Java, and after dayss of looking and glad to have finally found one which looks very promising, and is still under development :wink:

Anyway, I know I’m sure to sound very intrusive, but I’m not…honestly :slight_smile: I simply want to get involved with the project in a positive way, take this as constructive criticism and suggestions!

While looking through the code I noticed that almost none of it is documented, or commented actually. I was wondering what your stance on this issue as, as I believe it lets down the project. I would be happy to lend a helping hand in this situation by documenting various sections of the code, atough due to my lack of knowledge of the structure of some of the code I obvisouly can’t do it all.

I also had thoughts about the management of things such as particle systems and materials / textures etc. On my quest for an engine I came acorss OGRE ( which is very well designed IMO. I couldn’t use this because I do not want to develop in c++, and it’s a nightmare to setup unless you shell out for MS Visual C++ or equivalent.

Anyway the idea is to centralise the management (singletons) and also to externalise them by creating a parseable format which can describe the features of such an entity (ie it can describe what parameters are to be applied to a particle system). This allows for an extensible and easy to use format, meaning that a game engine can be continually changed and modified without access to the source code (ie. modding, or simply trying out various changes to a particles system for example). Take for example a material, which may be applied to multiple objects:

//material definition
material Grass {

    //'global' values for the material
    ambient 0.2, 0.7, 0.32

    //describes LOD, which sets up three different materials at different
    LOD 200, 500, 700

    LOD 1 {
        pass { 
            diffuse 0.5, 0.1, 1

            // Texture unit 0
                texture grass-base.jpg
                scroll_anim 0.1 0.0

            // Texture unit 1 (multitexture pass)
                texture grass-detailed.png
                rotate_anim 0.25
                colour_op add

        pass {
            //another pass to add even higher level of detail to material,
            //could be turned off depending on capabilities of end machine   

    LOD 2 {

BTW that above example was off of the top of my head, although loosely based on what is seen in OGRE. All values are random so don't take any notice of the details ;)

This sort of management will require refactoring of major parts of the engine, as well as a big effort to actually create. I am willing to help in any way I can, but again I do not claim to be highly knowledgeable about 3d concepts (advanced ones anyway) nor the engine (currently). I can create easy to understand and competent Java code though :)

The advantage to this system is IMO extensibility as the major 'selling point'. It also means that advaced setups can be used for creating highly detailed materials for terrain and other object that can be setup to be renderable on not only high end systems but low end systems, through additional definitions of different material setups (ie in the example above the material is split into LOD sections, which could potentially be further divided into high end and low end, used depending on graphics cards capabilities and such)

Sorry for such as long post, I've got too much time on my hands. If you are interested in anything discussed here please tell me, I am willing to help in anyway I can for this project, to improve it into something that is useful and widely used.

Thanks for listening, and hopefully I'll be having further discussions with you!

:// I think thay have sumting like this in the xml file format, but i am not sure(I had two much work to look at the could lately). ://

First of all, welcome! :slight_smile:

We certainly need to go back and do some code documentation… It seems we often do a major documentation push prior to a formal release so there will be better comments in there before .7 is released. Whether or not this is the proper way to document code is debatable, but it’s worked so far and has kept development from stagnating.

As for the OGRE inspired design changes, you may find some of that in the XML stuff, given that many of the features noted in your sample already exist in jME.

As a general rule, you’ll find that the jME developers are receptive to ideas and feature requests from library users, but not as much to large changes to the basic underlying design itself. Just my observation though and not a statement as to whether the team (esp. Mojo) will take to your suggestion or not. I personally suggest spending some time with our XML stuff and the library in general, then explain what it is that you feel needs to be done differently and why. Showing a real knowledge of the existing functionality and how it could be better will go a long way towards getting a major piece/change of functionality incorporated into jME.

All the best…

I am basically going to just be rehashing what everyone else said.

Documentation is something we try to keep up, some classes tend to fall behind, but overally things stay documented. In fact, I’d say we do better than most in that regard.

Cep21’s XML system should take care of your suggestion regarding an Ogre like system, and with the XML we won’t have an arbitrary text file, it will have structure and a validation element.

Thanks for the quick replies, definetly encouraging to see the developers are very active, promising!

I understand about the documentation, and it’s probably just me being too picky, as I like to see the code documented all over, although I know it’s fairly impractical for an open source, actively developed project.

That XML format looks good. I’m afraid currently I don’t have any time to look into the source code, so could you please give a brief explanation (just what things you intend to be able to do in it. Will it accept loading particle definitions, geometry etc.). Even better if somewhere a document exists just point me in it’s direction. Just at the moment I have no time and have to go out so I’ll answer in more depth later, thanks!

The XML format is a jME scenegraph in text form. It is designed to, in it’s final phase, be able to store in human readable text anything jME can render. This isn’t just particle systems or file formats, this can be anything from the geometry to a cube, all the way to an entire level of a game stored in text format, where people could “mod” the level by changing it’s information. I have a long way to go before I’m there, though it can already store Geometry information, keyframe animations, joint animations, Materials, Textures, and a few primitives.

When I’m rolling along with it well, I plan on writting out it’s format specifications and all that other stuff. Untill then, there’s always my meger attempts at javadoc if you just can’t wait :slight_smile:

if gregg is still working on JmeStudio, then this will give jME’s XML format a furthur push by providing a level editor in which you can model stuff in. (I think).

I am also learning (albiet very slowly) MaxScript so whoever has 3ds max can export their models to jME’s.

So when JmeStudio is ready, or the plugin, you wont even have to touch the XML. :slight_smile:

Thats the plan anyway…i think


What is JmeStudio? I was thinking of tiring to write a seen editor for jme but if someone was tiring to write one already…

Haven’t seen Gregg post for a little over two months… anyone heard from him?