Tutorial upgrade


#1

Could we update the tutorials? I got the JMonkeyEngine book an read through it and I went through the online tutorials, and I still had major hurdles to jump over to get started. For example, seeing how to work the InputManager while it’s in Main(), and then having to put it in an appState or Control or Node (yes, I’ve done it in all three), gets confusing. When you’re just getting started, you don’t have enough experience to know where the best place to put it is. I do fine now but, I still don’t know how others do it. And, from there, how do you interact with the spatial. *(See note below)

I got that, “Scene graph is not properly updated for rendering,” too many times. (“Um, I’m done updating so, yes, I think it is…”) There was little or no discussion from a noobs perspective, with all that there is to learn and read through it may have been missed, about where/when to set translations and rotations when you move all that out of Main(). I just saw a post about how to update a spatial in a networked game. I ended up creating a base class that works either way. In update(), without an active network connection it sets the translation and rotation immediately, and with a network connection it sends the update to the server and waits for the server’s reply to do the update. I got the idea from MonkeyZone. So, now, I set states that get checked in the update phase. (Uh, that is how ya’all do it, right?) But, I feel like I had to come up with that myself.

I guess I’m asking for something like a node pull. Find what everyone struggles with and redo the examples, or add to the examples with completely JME organized examples. Since appStates are so important, I think they should be introduced in the intermediate (or even beginner) section, and all the example code, especially for the InputManager, moved to them/it. Also, I’d like to see the Advanced section upgraded, or a More Advanced section added, with more complete examples. As for examples, there are MMORPGs and space/flight sims. Are there any more genres in 3D gaming for which a skeleton program could be written?

  • I did a quick review of the Sample Projects and remembered that I found them to be overwhelming. I could make sense of them now.

#2

Sounds awkward. I learned from sim-eth-es example: Model is on server, the client gets the update from server 20 times a second and interpolates the new pos so the client can have 60 updates a second. Only the server sends model update, the client is view only. On a different connection in my case RMI calls the client sends the commands like move, shoot, jump to server.

But honestly networked games are quite advanced. I would keep the beginners section simple as it is with self contained examples. It helped me a lot to get started in JME. The rest I learned from sample code, trial and error and reading.


#3

Well that was just one idea I had.
And, that’s the whole point, I’m trying to promote less ‘trial and error.’


#4

I think this is a good notion. There’s definitely a lot that can be learned through trial and error, but for anyone just starting on the beginner tutorials, trial and error is more likely to just get frustrating and discouraging.

From my personal experience going through the tutorials, I think that the best solution is to tell new learners to read the whole beginner tutorial in its entirety before attempting to code anything or implement any working examples at all. Then when you’re finally ready to code and you start to go through the trial and error process, you’ll at least know which exact tutorial to reference to find the exact knowledge that you need.

I think the hardest part for me was learning all the important stuff about materials and working with the default lighting shader, and it also took me a while to discover things like the scene and terrain editing tools (both in the SDK and JMB- I went 5 months not knowing either existed and was mind blown when I found out :rofl: ). But this all starts getting into slightly more advanced territory, so that goes back to what @ia97lies said in regards to keeping the beginner section simple


#5

I’m trying not to be too narrow focused here. I ported over a virtual solar system from Jave3D. I stopped when I found out that you can’t attach/detach while it is ‘running’ (there is no event loop). But, I wanted to put stuff on the screen and wasn’t worried about materials at the time. But, I did want input and to set things up properly - using controls and appStates. But, again, where should you put the InputManager? Main(), AppState, Control. I missed a lot because I was so focused on making spheres for planets (but I got a model for a ship loaded) that I missed some things that I found later. Trying out different places for the InputManager slowed me down.


#6

I actually recall having similar confusion with the input manager when I was first learning about app states. I set up my first project without knowing what an app state was, so I ran into some trouble trying to refactor my project to work correctly when I attempted to implement my first app state. Maybe the beginner tutorial could benefit from a final section about using app states and controls to expand a game past a single-class application, rather than leaving these tutorials in the advanced section.


#7

Now that’s what i’m talkin’ bout!


#8

I am thinking you guys haven’t visited the tutorials recently?
https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_simpleapplication.html#the-future-of-simpleapplication

Note that this is tutorial 1.

Also note that it directs you to,
https://jmonkeyengine.github.io/wiki/jme3/advanced/application_states.html

Which goes into significant detail on AppStates.

Note that the Very first topic in the Wiki after Installation is,
https://jmonkeyengine.github.io/wiki/jme3.html#sdk-documentation

Note that it goes into great detail about all aspects of the SDK, Like
https://jmonkeyengine.github.io/wiki/sdk/terrain_editor.html

Very few seem to even read the wiki or even participate in its upkeep. It does need some major work still. I don’t think many people realize just how massive it really is.

There is now an easy way to become a wiki editor, see the readme. Markdown is very easy to learn.


#9

You’re right I haven’t seen this page since it’s been updated, but that looks like it addresses the simple application and app states enough to help beginners understand what’s going on without flooding them with too much knowledge.

It’s definitely my fault I didn’t find some important engine and SDK tools for so long haha, I went through the beginner tutorial section thoroughly and in order, but after that there’s so many tutorials that I would randomly pick and study some and I guess I also missed some important ones. I think it’s hard to prioritize certain really useful tutorials over others once you get past the beginner section since there’s so many and most have something useful to teach.


#10

If you start at Install and read it in order like a book with chapters it will make things easier. You will still run into things that need fixin but those are slowly getting done.


#11

No, I did review the tutorials before posting. I found the same thing. The sample AssStates were only a little useful. BulletAppState - I implemented but found the structure to be flat. Everything goes in world space whereas I wanted to attach the Earth to the Sun and the Moon to the Earth. TestAppState gave me an example with no content/context. RootNodeState was the same thing. I guess I’d like to see an AppState that builds on the Two Cubes example. Make them in the AppState and add the input to move them.
I went through the book and tutorials in order.

I actually recall having similar confusion with the input manager when I was first learning about app states. I set up my first project without knowing what an app state was, so I ran into some trouble trying to refactor my project to work correctly when I attempted to implement my first app state. Maybe the beginner tutorial could benefit from a final section about using app states and controls to expand a game past a single-class application, rather than leaving these tutorials in the advanced section.

Same here. I just want one complete simple app to copy. Now, yaRnMcDonuts and I have been using JME for years now and can do everything we want. I just want something more concrete for beginners. Like yaRnMcDonuts said, maybe a a section at the end of the beginner section with a completely organized app would help.


#12

There are complete examples around and they are not that hard to find if you search.

Those tend to all be ES (entity system) based but that’s a pretty good place to start anyway.

For general app construction, you can also look at how I put together my tree editor and the iso surface demos.

Now, you might say “those examples are too complicated”… well, that’s the thing, eh?