How did you get involved with the jMonkeyEngine team?
I discovered jMonkeyEngine 2.0 at JavaOne in 2007, and then joined the community. At first, I went through the beginner tutorials for versions 1.0 and 2.0, and made edits to samples on the wiki.
In 2009, the jMonkeys (as team members are called), led by Kirill Vainer, kicked off the jMonkeyEngine 3.0 code base; around the same time, I added new tutorials to the wiki as I was learning the API. Later that year, I "applied" and joined the core team as the official doc writer.
Can you explain the connection between jMonkeyEngine and the NetBeans Platform?
In earlier versions, jMonkeyEngine was just a bunch of JAR files—powerful, but not very user-friendly. We spent a lot of time repeatedly explaining things to users: how to put the JARs on the classpath, how to set things up in various IDEs, how to link the javadoc, etc.
In early 2010, Normen Hansen discovered Geertjan Wielenga's NetBeans RCP tutorials and realized that the Platform had half the stuff people asked us for anyway, and it was an IDE. So Normen built a NetBeans platform app as a proof of concept. He bundled the JARs with it, and added custom jME3 project support, a 3D model preview window, and a "convert model" button. Suddenly, we had a game development environment! We could install just one tool, start out with a pre-configured project, and build executables, just like that. That was pretty cool and felt like a leap ahead in usability.
With Normen's platform app, you just create a new Java project from a template, and the bundled JARs are put automatically on the classpath. The project is created with the recommended directory structure; the bundled jME3 javadoc and sources are linked in the editor; the default Main.java and the Code Palette contain jME3 sample code; and the included build script automatically packages your non-code assets, sounds and images and so on. The help search box even pulls up pages from the jMonkeyEngine 3.0 wiki, solving a good "90%" of our user questions!
Over the last three years, the developers have added more features to jME3, and Normen has developed additional NetBeans plugins. Today, we have asset browsers, live previews, material editors, property editors, terrain editors, effect editors, etc, and thus the "jMonkeyEngine SDK" (software development kit).
How did the idea for the book start?
One of our community members, Taksan Tong, had already written a book about 2D and 3D game development . In late 2010, he reached out to Packt Publishing about a new game development book. Around the same time, I was collecting content for a potential jMonkeyEngine 3.0 User Guide. We worked together and presented a jME3 book outline to the publisher. The publisher gave us the green light; unfortunately, Taksan couldn't continue, so I took over as sole author in early 2011.
How do you personally use jMonkeyEngine?
Privately, I use jMonkeyEngine for procedural 3D art. For example, to generate "endless" landscapes, planets and space scenes, or fractal geometries that you can fly through. I also wrote a very simple Tower Defense game once, where you fend off waves of attackers.
What challenges do you face creating a game?
Providing the engine with quality data to work with. Creating good-looking 3D models, materials, animations, sounds, and music is a whole learning experience of its own. Personally, I start off with basic shapes and stock art, that way I can continue fine-tuning the game interaction without worrying about the looks. Mock-ups can always be replaced with better models later. You can search Asset Packs, Creative Commons and download free models. The jMonkeyEngine community has a lot of great hobby artists who really show off what the engine can do, and people with complementing skills often work together.
Another challenge for me is that I cannot easily tell what's wrong by looking at a rendered 3D scene. I load a model and can't find it in the scene. Where did it go? The misplaced object may be too large or small, too near or far, too dark or bright; it may be stuck underground, overlapping something else, or missing its surface material. You can't track down 3D transformation or rendering errors with JUnit tests, a debugger, and a profiler unlike with other kinds of programming.
How long did it take you to write the book?
The same amount of time it took the team to develop jMonkeyEngine 3.0--three years. This includes the extra year I spent learning the new API and writing the beginner tutorials that I used as a base for the book. In the following two years, the draft went through several iterations, API changes, and restructurings. And of course, I still had a day job and wrote mostly only on weekends. In the end, the book had 350 pages and about 100 code samples. Plus, one extra downloadable chapter that didn't fit in.
You've been published once before. Was it different a second time around?
It was quite different. My first book (100 NetBeans Tips and Tricks ) was shorter; the code samples were simpler; and I had a lot more freedom about how I wanted to structure it. 3D game development is a more advanced topic, and requires more research and more in-depth explanations. Also, Packt Publishing has guidelines on how to write for a beginner audience, so I had to adapt my drafts to that. On the other hand, finding material to write about was easier. I had a lot of support from other jMonkeys--they have a ton of combined experience that went into the book.
Will you write another book?
Possibly, but not right away. For now I'll stick to writing on the jMonkey wiki and finishing my procedural planet. Maybe that will be a next book. We will see!