Beginner Questions

Hello! I am a complete NoOb to making 3D games! Recently I have been interested in learning about 3D game development (mostly just for my own amusement,) and so I have been looking for the best Java API for that purpose. I had only known about Java 3D, but today I saw jME mentioned on a forum so I am checking it out. I just have a few questions. First, I see that people say that performance is better for jME than for Java 3D. This is important to me because I am running a very low end computer and I would like to at least begin learning 3D coding, even if my computer is too slow to do advanced things. How much better does jME run? Java 3D runs ok on my machine but I have only been doing simple things with it. Secondly, how would you recommend I begin learning jME? I found the Starter Guide PDF and I think I will work through what is finished on that, but I am worried about the lack of documentation (not a criticism, just something I noticed ^^.) I looked through the JavaDocs, but being a beginner to 3D it is pretty intimidating! Is it possible for a beginner to learn with what is available now? Finally, I have a more specific question. How does terrain work in jME? I am still looking at the Starter Guide’s section on that but I am somewhat confused. Do people normally generate the terrain in an exterior program and then import it? Thanks! ^^

First, welcome.



Speed differences between Java3D and jME are hard to quantify, but Java3D is thread safe and jME is not. That accounts for a substantial speed difference there. jME Devs are constantly increasing rendering speed, as being a game platform speed is of the essense, while Java3D is not specific for games. But I can’t really give you hard numbers.



Working through Cep’s Starter Guide is the best thing to do, and just keep posting on the boards. The Javadoc has also been greatly improved thanks to Cep. The next release will have them posted on-line. Documentation is improving, slowly but surely.



Terrain is basically a quadtree implemenation at the core.

Hey there,



In terms of how to learn this stuff, I also suggest the Starter Guide. Just make sure you start at the beginning and take time with each lesson. Resist the temptation to jump ahead to the cool looking stuff or it will be that much harder for you to learn. :slight_smile:



All the best!

Thanks for the help! I think it will work out great, I am actually pretty excited about it. One last thing; should I go ahead and work with the current release or would it be better to wait until the next release (If I understand correctly the current release is 0.6 and 0.7 will come out in a week or so?) Thanks again!

Work from the CVS. There’s guides to help you get jME from the CVS here as well. Documentation will be much better with the next jME release.

I looked at the CVS information and it is well written, it should be easy to install. However, the computer I would be using jME on is not connected to the internet, so what would be the best thing to do when the CVS was updated? I can download the CVS here, so would I just delete the old jME directory on the other computer, transfer over the CVS, and recompile? Sorry I keep asking noob questions, and thanks for helping!

0.7 will be released shortly, that’s what I am currently working on. There a couple issues to resolve (RenderQueue) and it should be out within a couple days.

Hello again! I downloaded the CVS to give it a try, everything compiled correctly. However, I can’t get any of the demos to run! I picked one at random (but they all seem to give the same error message.) Here is my input and Java’s output



E:>java -Djava.library.path=.lib -cp ./lib/lwjgl.jar;./lib/jogg-0.0.5.jar;./lib

/jorbis-0.0.12.jar;./target/jme.jar;./target/jmetest.jar;./target/jmetest-data.jar jmetest.terrain.TestTerrainLighting

Aug 25, 2004 7:27:20 PM com.jme.app.BaseGame start

INFO: Application started.

Aug 25, 2004 7:27:20 PM com.jme.system.PropertiesIO

INFO: PropertiesIO created

Aug 25, 2004 7:27:20 PM com.jme.system.PropertiesIO load

WARNING: Could not load properties: java.io.FileNotFoundException: properties.cfg (The system cannot find the file specified)

java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

at java.lang.ClassLoader.loadLibrary(Unknown Source)

at java.lang.Runtime.loadLibrary0(Unknown Source)

at java.lang.System.loadLibrary(Unknown Source)

at org.lwjgl.Sys.initialize(Unknown Source)

at org.lwjgl.Sys.<clinit>(Unknown Source)

at org.lwjgl.Display.<clinit>(Unknown Source)

at com.jme.system.LWJGLPropertiesDialog.(Unknown Source)

at com.jme.app.AbstractGame.getAttributes(Unknown Source)

at com.jme.app.BaseGame.start(Unknown Source)

at jmetest.terrain.TestTerrainLighting.main(Unknown Source)

Aug 25, 2004 7:27:20 PM com.jme.app.SimpleGame cleanup

INFO: Cleaning up resources.

Exception in thread “main” java.lang.NullPointerException

at com.jme.app.SimpleGame.cleanup(Unknown Source)

at com.jme.app.BaseGame.start(Unknown Source)

at jmetest.terrain.TestTerrainLighting.main(Unknown Source)



E:>



There seem to be two errors. The first is that it can’t find “properties.cfg”. I thought that a dialog was supposed to pop up and take care of that? I searched through the whole drive and there was no file matching that name anywhere. I would make one myself but I don’t know the proper syntax. Secondly, it is complaining about finding lwjgl, but I made sure that it was in the specified directory. I even tried copying it to the default Java library directory and removing the flag but it gave me the same error. It is messing up this part because it can’t find the properties.cfg file? Anyway, any help that I could get would be greatly appreciated! :slight_smile:

properties config not found is just a warning, and since it is the first time you are running it, it’s expected.



The error is it can’t find the lwjgl.dll file. you have -Djava.library.path=.lib try -Djava.library.path=./lib

You left out the slash (./lib) in your java.library.path. Try adding ./ to your cp as well.



I would suggest using Eclipse to develop with jME (or anything Java for that matter). Trying to remember all these paths for command line entry is just crazy :slight_smile:

"Grad" wrote:
There seem to be two errors. The first is that it can't find "properties.cfg". I thought that a dialog was supposed to pop up and take care of that? I searched through the whole drive and there was no file matching that name anywhere.

It takes care of that. The output means that it did not finned and will create it. Nothing to worry about.
"Grad" wrote:
Secondly, it is complaining about finding lwjgl, but I made sure that it was in the specified directory. I even tried copying it to the default Java library directory and removing the flag but it gave me the same error. It is messing up this part because it can't find the properties.cfg file? Anyway, any help that I could get would be greatly appreciated!

Try puting the dll in the directery you start the program from. in your case

E:

.
"EricTheRed" wrote:
Some strangeness... 1208 is 4B8 in hex, but I can't find a GL constant with that value. This, however, is using the CVS version of lwjgl.

(I'm really rather tired, so if I've overlooked something obvious... err, oops.)

He meant 1280 which is x0500 which is defined as GL_INVALID_ENUM. :? Not very useful unfortunately.

Usually updating your drivers takes care of this type of error though.

Sorry, that last “Guest” was me I just forgot to sign in. I also wanted to say that I haven’t tried out the webstart programs here, because this is a different computer and the other one dosen’t have internet access (I noticed that was one of the first things people suggested be checked when getting an error like mine.)

Some strangeness… 1208 is 4B8 in hex, but I can’t find a GL constant with that value. This, however, is using the CVS version of lwjgl.



(I’m really rather tired, so if I’ve overlooked something obvious… err, oops.)

I am also using the CVS version (if you mean the version in the jME CVS.) Here is the complete message it gives me in case you are interested (the error is near the bottom;)





E:>java -Djava.library.path=./lib -cp ./lib/lwjgl.jar;./lib/jogg-0.0.5.jar;./li

b/jorbis-0.0.12.jar;./target/jme.jar;./target/jmetest.jar;./target/jmetest-data.

jar jmetest.terrain.TestTerrainLighting

Aug 25, 2004 8:59:11 PM com.jme.app.BaseGame start

INFO: Application started.

Aug 25, 2004 8:59:11 PM com.jme.system.PropertiesIO

INFO: PropertiesIO created

Aug 25, 2004 8:59:11 PM com.jme.system.PropertiesIO load

INFO: Read properties

Aug 25, 2004 8:59:17 PM com.jme.system.lwjgl.LWJGLDisplaySystem

INFO: LWJGL Display System created.

Aug 25, 2004 8:59:18 PM com.jme.system.PropertiesIO save

INFO: Saved properties

Aug 25, 2004 8:59:18 PM com.jme.system.lwjgl.LWJGLDisplaySystem

INFO: LWJGL Display System created.

Aug 25, 2004 8:59:19 PM com.jme.renderer.lwjgl.LWJGLRenderer

INFO: LWJGLRenderer created. W: 800H: 600

Aug 25, 2004 8:59:19 PM com.jme.renderer.AbstractCamera

INFO: Camera created.

Aug 25, 2004 8:59:19 PM com.jme.util.lwjgl.LWJGLTimer

INFO: Timer resolution: 1193182 ticks per second

Aug 25, 2004 8:59:19 PM com.jme.scene.Node

INFO: Node created.

Aug 25, 2004 8:59:19 PM com.jme.scene.Node

INFO: Node created.

Aug 25, 2004 8:59:19 PM com.jme.scene.Node attachChild

INFO: Child (FPS label) attached to this node (FPS node)

Aug 25, 2004 8:59:19 PM com.jme.scene.Node

INFO: Node created.

Aug 25, 2004 8:59:19 PM com.jme.scene.Node

INFO: Node created.

Aug 25, 2004 8:59:19 PM com.jme.scene.Node attachChild

INFO: Child (box) attached to this node (light)

Aug 25, 2004 8:59:19 PM com.jme.scene.Node

INFO: Node created.

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (quad) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf0) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf1) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf2) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf3) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf4) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf5) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf6) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf7) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf8) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf9) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf10) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf11) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf12) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf13) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (sf14) attached to this node (flare)

Aug 25, 2004 8:59:22 PM com.jme.scene.Node attachChild

INFO: Child (flare) attached to this node (light)

Aug 25, 2004 8:59:22 PM com.jme.terrain.util.MidPointHeightMap load

INFO: Created Heightmap using Fault Fractal

Aug 25, 2004 8:59:23 PM com.jme.scene.Node attachChild

INFO: Child (Terrain) attached to this node (rootNode)

Aug 25, 2004 8:59:25 PM com.jme.scene.Node attachChild

INFO: Child (light) attached to this node (rootNode)

Aug 25, 2004 8:59:25 PM com.jme.scene.Node attachChild

INFO: Child (Camera Node) attached to this node (rootNode)

org.lwjgl.opengl.OpenGLException: Invalid enum (1280)

at org.lwjgl.opengl.Util.checkGLError(Unknown Source)

at org.lwjgl.opengl.Window.update(Unknown Source)

at com.jme.renderer.lwjgl.LWJGLRenderer.displayBackBuffer(Unknown Source)

at com.jme.app.BaseGame.start(Unknown Source)

at jmetest.terrain.TestTerrainLighting.main(Unknown Source)

Aug 25, 2004 8:59:25 PM com.jme.app.SimpleGame cleanup

INFO: Cleaning up resources.

Aug 25, 2004 8:59:25 PM com.jme.app.BaseGame start

INFO: Application ending.



E:>



Do you think upgrading lwjgl will help?

That was it; it is a typo on the "Getting Started" page


It's been mentioned before. It does need to be changed... <poke poke> All file paths are like that on the started guide.

The Terrain makes use of VBO, which the TNT may not support. Although it’s supposed to detect that VBO isn’t supported and fall back to normal vertex arrays… That’s the only strangeness of terrain. Try some of the other tests and see if you get similar errors.

Do the demos on the webpage work?

The drivers contain the OpenGL implementation, so there is nothing else you need to update.



This is by far the oldest card we have compared against. It might very well only use OpenGL 1.1, and we have a couple 1.2 and 1.3 in the base things (we were targeting at least TNT2s). If you use texture maps in jME it will call into effect multitexturing (even if it’s not being used).



You know, low end graphics cards are quite cheap now and they are magnitudes more powerful than what you have now. :wink:

You guys bring good luck. Immediately after writing that last post, the department head here was talking to me and I mentioned that my computer was obsolete. He said he would give me some money to upgrade it. I thought he meant $100 or something, but I will be getting $750 next week! Great! Anyway, I am working out all the components for my new computer, and I wanted to ask about the video card. As much as I might like to talk about hardware with über-programmers like you, this isn’t a hardware board so I will restrain myself to one question; are any of the modern cards known to be incompatible with jME? I am seriously considering a GeForce FX 5900 with 128 MB RAM, is there any problem with that? Of course, jME isn’t the primary reason I am getting a new computer but I might as well get a compatible card. So, thanks again! :smiley: I also wanted to offer to help out around here if anyone needs it… I certanly can’t help with programming, but if you ever need someone to help with proofreading documentation or something let me know.