FlagRushTutorial problems

I'm trying to learn jME by using FlagRushTutorial,

but I have expirienced some errors and I don't know how to solve them.

I guess they might be due to API versions I'm using, but I'm not quite sure.

Anyhow, I'm using WinXP, LWJGL 0.99, jME 1.0 and newest versions of source code for the FlagRushTutorial.

Everything compiles OK, but only examples from the 1st and 2nd lessons are working as expected.

In all other lessons I get one of two types of errors (see below).







Lessons 3-6:



…  …

INFO: Created Heightmap using Mid Point

Jan 17, 2009 10:16:36 AM com.jme.scene.Node attachChild

INFO: Child (Terrain) attached to this node (Scene graph node)

Jan 17, 2009 10:16:36 AM class jmetest.flagrushtut.Lesson3 start()

SEVERE: Exception in game loop

java.lang.NoSuchMethodError: org.lwjgl.opengl.GL11.glVertexPointer(IIIJ)V

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

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

at com.jme.scene.batch.TriangleBatch.draw(Unknown Source)

at com.jme.scene.TriMesh.draw(Unknown Source)

at com.jme.scene.lod.ClodMesh.draw(Unknown Source)

at com.jme.scene.Spatial.onDraw(Unknown Source)

at com.jme.scene.Node.draw(Unknown Source)

at com.jme.scene.Spatial.onDraw(Unknown Source)

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

at jmetest.flagrushtut.Lesson3.render(Lesson3.java:123)

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

at jmetest.flagrushtut.Lesson3.main(Lesson3.java:95)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

Jan 17, 2009 10:16:36 AM com.jme.app.BaseGame start

INFO: Application ending.









Lessons 7-9:



…  …

INFO: Child (down) attached to this node (skybox)

Jan 17, 2009 10:18:32 AM com.jme.scene.Node attachChild

INFO: Child (skybox) attached to this node (Scene graph node)

Jan 17, 2009 10:18:32 AM class jmetest.flagrushtut.lesson7.Lesson7 start()

SEVERE: Exception in game loop

java.lang.NullPointerException

at jmetest.flagrushtut.lesson7.Lesson7.buildPlayer(Lesson7.java:293)

at jmetest.flagrushtut.lesson7.Lesson7.initGame(Lesson7.java:268)

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

at jmetest.flagrushtut.lesson7.Lesson7.main(Lesson7.java:127)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

Jan 17, 2009 10:18:32 AM com.jme.app.BaseGame start

INFO: Application ending.





Could someone help me with this problems?

The code for the flagrush tutorial comes also with the jme source.



jmetest.flagrushtut.Lesson1.java



Also i’d suggest using jme2, since 1.0 is frozen.

As I can see, jme2 is available only in source, so I won't use it.

jme1.0 is still recommended package. Am I right?



So, it seems that the only way to solve this problem is to

use jme1.0 and sources contained in the html tutorial files.?



If I suceed I will note it to you.



p.s.



It is now obvious that it was big omission to forget to

pack tutorial files in zip archive and state what versions

of APIs to use with that.

snapshot jars and sources should be available as downloads soon for jme 2.

its on the todo list.



In the mean time you can of course use jme1 and grab the flagrush source via web access:

https://jme.dev.java.net/source/browse/jme/src/jmetest/flagrushtut/


I've already did that, but failed as I explained in the topic.

If you didn't figured out by now, I have already used most recent files of FlagRush tutorial, not the one that can be found in the html tutorial.

Ah sorry, i didn't ready carefully enough.  :slight_smile:

You do use the lwjgl version which comes with jme1 right?

NoSuchMethodError seems to be some incompatibility between different versions.



Lessons 7 and above use the bike.3ds Model as a player, so your NPE results maybe of file not found?



All Lessons seem to work fine for me.

Thanks. NPE seem to be solved, but now arises first type of exception "java.lang.NoSuchMethodError: org.lwjgl.opengl.GL11.glVertexPointer(IIIJ)V".



I don't quite understand what do you mean by "You do use the lwjgl version which comes with jme1 right?".

Again, I used:



  1) LWJGL 0.99

  2) jME 1.0

  3) newest versions of source code for the FlagRushTutorial



Please, tell me what version of LWJGL you are using?

its best if you use the libraries which come with the jme source.



https://jme.dev.java.net/source/browse/jme/lib/

it seems the latest jme1 version uses lwjgl 1.1.4

Tahnk you @Core-Dump.

It works now!



Thank you again. :smiley: