jMonkeyEngine 3.0 Beginner's Guide Book - TowerDefense project

Hi all,
I am new to jMonkeyEngine, and have recently acquired the beginner’s guide book. I really enjoy it, and am finding it very useful, however, when it comes to the TowerDefense proejct, I am very confused.

The explanations of the steps are a bit vague as they usually introduce new fields or new methods you should use that were not discussed or stated before. Moreover, is there a source code answer for the project for each chapter, to be able to compare your code with the code of the author of the book?

In my case, I am currently stuck at chapter 3, unable to understand how to use the setUserData methods and how to use the Line. If anyone could provide a source code for this tower defense project, or help me with explaining in a bit more detail what I need to do, I would really appreciate it.

Thanks in advance,
Alex.

1 Like

I’m not familiar with the book, but some more info about setUserData is here:

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:spatial#how_to_add_fields_and_methods_to_a_spatial

It’s just a way to store some data on an individual Spatial.

As for line, theres not much to it, it has a start and an end point.

I checked the googlecode booksamples for Chapter 3:

https://code.google.com/p/jmonkeyengine/source/browse/#svn%2FBookSamples%2Fsrc%2Fchapter03

And didn’t find anything related from the titles at least, but maybe there’s more info in there.

1 Like

This is perfect! The tower defense game is under the mygame category. Thank you so much for your help :smiley:

1 Like