O'Reilly logo

jMonkeyEngine 3.0 Beginner's Guide by Ruth Kusterer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – initializing a scene step by step

If you no longer have the BasicGame template open, open it again in the jMonkeyEngine SDK. Remember that you can always recreate this project template using the New Project wizard in the File menu.

Let's look at the main class of the BasicGame project:

  1. Open the BasicGame project in the Projects window.
  2. Double-click on the mygame/Main.java file in the Source Packages folder. Main.java opens in the source editor.
  3. When you look at the Main.java template, you see a standard Java class that extends the com.jme3.app.SimpleApplication class. SimpleApplication is the base class that we use to write all our 3D games.

The basic code sample is short enough so that you can type it yourself—we just use the BasicGame ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required