jMonkeyEngine 3.0 Cookbook published!

Great book, I’ve enjoyed the parts I’ve read so far. it is well organized, and interesting to read. In order to improve the book, I would say take a good look at some of the samples to ensure they are explained throughly. I found myself at times stuck not knowing where some of the variable in the examples came from. For instance, in the inputAppState example:

public void onAnalog(String name, float value, float tpf) {
if(character != null){
character.onAnalog(name, value * sensitivity, tpf);
}
}

Where should the sensitivity variable be declared?

I understand the book is for intermediate users, but when we are referencing controls, appStates, and classes, it could get confusing for some users. just a thought. Overall, great book!

1 Like
@WBaez1 said: Great book, I've enjoyed the parts I've read so far. it is well organized, and interesting to read. In order to improve the book, I would say take a good look at some of the samples to ensure they are explained throughly. I found myself at times stuck not knowing where some of the variable in the examples came from. For instance, in the inputAppState example:

public void onAnalog(String name, float value, float tpf) {
if(character != null){
character.onAnalog(name, value * sensitivity, tpf);
}
}

Where should the sensitivity variable be declared?

I understand the book is for intermediate users, but when we are referencing controls, appStates, and classes, it could get confusing for some users. just a thought. Overall, great book!

Thanks for the feedback!
Admittedly, there is some difference in writing style between the early and latter chapters (chronologically, not necessarily order in the book) as I gained more experience and especially once I started getting technical feedback. Early on, I assumed the reader would have the code examples next to them and the editing phase may have missed a couple of the unclear references in the early chapters. I’ll make sure to think of it if there ever is a 2nd edition!

In the mean time, I’ll do my best to help here.

To answer your question: sensitivity is a float field in the class and is used to tweak the outcome of the input value by a factor. Not exactly necessary for the recipe in itself but very useful for a real implementation as you get better control over, for example, movement.

2 Likes

Bought it. On page 10 you run into a dead end when asked to add jaime.j3o to the scene.

How to copy the model from library to your project is not explained. There is no link to scene option available on right-clicking the model file directly in the library. There is no obvious way to copy the file either.

So how do you use assets from libraries in scene composer?

1 Like
@stenb said: Bought it. On page 10 you run into a dead end when asked to add jaime.j3o to the scene.

How to copy the model from library to your project is not explained. There is no link to scene option available on right-clicking the model file directly in the library. There is no obvious way to copy the file either.

So how do you use assets from libraries in scene composer?

You’re right. this would have been worth mentioning.
You can’t directly link a model to a scene from a library (most likely because it’s archived and more difficult to edit?). To do so you need to copy it to your asset folder. This can be done by dragging the assets from the lib to the Models folder, or using Ctrl+C + Ctrl+V (no option when right clicking).

1 Like

I’m just going to keep nitpicking as I work my way through the book :slight_smile:

  1. On several occasions I am asked to bring up the “properties” window on a certain scene object, like a DirectionalLight. I have yet to find this properties window …
  2. I think the use of the sensitivity field in both GameCharacterControl and InputAppState is confusing. InputAppState already multiplies by sensitivity before sending the value on to GameCharacterControl, why multiply by sensitivity a second time in that class?
  3. I’ve come across several places so far where class fields have not been mentioned before you’re asked to use them, or they are only included in a later point. For example the sensitivity field in the GameCharacterControl class, or the app field in the InputStateManager class, or the origin field in the Bullet class … none of these “exist” at the time you encounter them if you just follow the recipes step by step.
@stenb said: I’m just going to keep nitpicking as I work my way through the book :)

I’m fine with that as long as you don’t find any of the issues too grave to continue reading it for. :slight_smile:
I can’t really do much about them now, but if there ever is a second edition I’ll have some corrections for it.

1. On several occasions I am asked to bring up the "properties" window on a certain scene object, like a DirectionalLight. I have yet to find this properties window ...
I guess it's one of those things you take for granted when having worked with JDK for so long.. But also, isn't the Properties window visible by default when installing the SDK? To answer the question, though. It's available under the Windows tab :)
2. I think the use of the sensitivity field in both GameCharacterControl and InputAppState is confusing. InputAppState already multiplies by sensitivity before sending the value on to GameCharacterControl, why multiply by sensitivity a second time in that class?
Don't have a good answer for this one. Must be an oversight. An explanation might be that since I use the same classes over several recipes, I sometimes made changes or improvements to them that I might have failed to reflect.
3. I've come across several places so far where class fields have not been mentioned before you're asked to use them, or they are only included in a later point. For example the sensitivity field in the GameCharacterControl class, or the app field in the InputStateManager class, or the origin field in the Bullet class ... none of these "exist" at the time you encounter them if you just follow the recipes step by step.

Alas, this has been raised previously in the thread.

Hey guys. I wanted to let you know that I wrote a review for this book HERE and on Amazon as well.

I think it’s a great book, with recipes that server game developers exactly as needed. I’m still reading it, but I love it already.

1 Like
Hey guys. I wanted to let you know that I wrote a review for this book HERE and on Amazon as well.

I think it’s a great book, with recipes that server game developers exactly as needed. I’m still reading it, but I love it already.

I’m glad you like it, and the reviews are really appreciated!

Cheers.

No problem. Thank YOU for helping me really step up my game.

@indiebynight said: No problem. Thank YOU for helping me really step up my game.

Hey. If you note down where you think additional diagrams would be useful I might use my dormant blog to do a couple of addendums that give more clarity.