Book Image

JMonkeyEngine 3.0 Cookbook

By : Rickard Eden
Book Image

JMonkeyEngine 3.0 Cookbook

By: Rickard Eden

Overview of this book

Table of Contents (17 chapters)
jMonkeyEngine 3.0 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up a project


The jMonkeyEngine SDK is based around the NetBeans environment. Users familiar with the NetBeans environment will probably have little trouble finding their way around the jMonkeyEngine SDK. For those with no previous experience, some pointers on how to get started might be in place. In this recipe, we'll create a project that can access the jMonkeyEngine test-data library. By doing so, we will have some assets available from the start that can be used to try out many of the recipes.

Getting ready

Before setting up a project, we need to download the SDK. Doing so is as easy as going to http://hub.jmonkeyengine.org/downloads/ and selecting a suitable package for your operating system.

After downloading and installing the package, we're ready to go!

How to do it...

We can set up a project by performing the following steps:

  1. First of all, find the Projects window.

  2. Right-click somewhere inside it and select New Project.

  3. In the window that appears, select JME3 from Categories and BasicGame from Projects.

  4. On the next screen, choose a suitable name for the project and click on Finish to create it.

  5. The project should now appear in the Projects window. Right-click on it and select Properties from the menu.

  6. Select the Libraries option, click on the Add Library… button, and find the jme3-test-data library from the list.

How it works...

When the project is created, it sets up the basic necessities for a jMonkeyEngine project. You will get a Project Assets folder where any content can be placed in its subfolders. It also creates the Main.java file based on the SimpleApplication class. This is the starting point for your application.