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:
- Open the
BasicGame
project in the Projects window. - Double-click on the
mygame/Main.java
file in theSource Packages
folder.Main.java
opens in the source editor. - When you look at the
Main.java
template, you see a standard Java class that extends thecom.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 ...
Get jMonkeyEngine 3.0 Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.