ThirdPerson example in Standard Game?

I was wondering how to do the example of third person in the TestChooser? I know this is a lot but could someone show me how? I'm kinda not familiar with standard game and i was hoping to get my game up and running in standard game…

Where exactly is the problem?

ttrocha said:

Where exactly is the problem?


I am the problem... I can't seem to grasp the concept behind Standard Game... well I kinda... but most of the tutorials are either outdated or they didnt include some classes used or specified which version of jME... I'm using jME 2.0...

I just want to see how the ThirdPerson in TestChooser is coded in StandardGame... after that iM probably good to go with StandardGame...

First, as you are new to jME I only can advice you to use SimpleGame. There are

so many new concepts to discover that StandardGame might overcomplicate the start.



But if you want to give it a try you for sure read this already:

http://www.jmonkeyengine.com/wiki/doku.php/standardgame_gamestates_and_multithreading_a_new_way_of_thinking



In the end you create a GameState of your own. (e.g. extends from DebugGameState that

is more or less created to be like SimpleGame). In the gamestate you have a rootNode

where you can attach stuff to it, just like simpleGame. Do the init-stuff in the constructor.


  • start stanardGame
  • create an instance of your gamestate and attach it to the GameStateManager
  • set it to active



    For gamestates have a look at: jmetest.game.state.IngameState (and other Gamestates in the package)
ttrocha said:

First, as you are new to jME I only can advice you to use SimpleGame. There are
so many new concepts to discover that StandardGame might overcomplicate the start.

But if you want to give it a try you for sure read this already:
http://www.jmonkeyengine.com/wiki/doku.php/standardgame_gamestates_and_multithreading_a_new_way_of_thinking

In the end you create a GameState of your own. (e.g. extends from DebugGameState that
is more or less created to be like SimpleGame). In the gamestate you have a rootNode
where you can attach stuff to it, just like simpleGame. Do the init-stuff in the constructor.

- start stanardGame
- create an instance of your gamestate and attach it to the GameStateManager
- set it to active

For gamestates have a look at: jmetest.game.state.IngameState (and other Gamestates in the package)



I'm actually referring to the controls for ThirdPerson... I dont know if the implementation is the same as the BaseGame... Just like in flagrush tutorial... I'm actually over the SimpleGame and already extended my way to the BaseGame...

I'm in the process of creating my own Third Person Game Framework and a game entitled "College of the Dead"...

So far i'm using MD3 as my models and .obj for some non static... I implemented Simple Physics for Octree Collisions and Tris Picking for walking...

I really want to implement all these to Standard Game...

Though I saw some implementation of GameStates using SimpleGame... But i just want to explore how to use them in Standard Game... but all the tutorials for Standard Game is not what iM hoping to see... If there would be someone kind enough to actually put up a code for the implementation of the Third Person example using Standard Game... that would really be much appreciated...  :D

Well, I won't do it, but I can give you some hints. ThirdPersonController is just an inputHandler.

When you e.g. use DebugGameState you have one inputHandler (I think it is called input) that

is updated every frame. So all you would have to do is to say input=new ThirdPersonController(…)

and keep the node on the floor every update as well.



If you want to use your own from zero gamestate just create the Controller and in update-method update the controller as well. (I think :D)



And how to use GameStates with StandardGame I can just point you again to the link I posted before.

I know it is much text and no shinny pictures but you will get it, if you want! :stuck_out_tongue:

ttrocha said:

Well, I won't do it, but I can give you some hints. ThirdPersonController is just an inputHandler.
When you e.g. use DebugGameState you have one inputHandler (I think it is called input) that
is updated every frame. So all you would have to do is to say input=new ThirdPersonController(...)
and keep the node on the floor every update as well.

If you want to use your own from zero gamestate just create the Controller and in update-method update the controller as well. (I think :D)

And how to use GameStates with StandardGame I can just point you again to the link I posted before.
I know it is much text and no shinny pictures but you will get it, if you want! :p


I see... So StandardGame's Input Handler is pretty much like the BaseGame except I have to put it either on the GameState or wherever update is... Thanks a bunch!

StandardGame has no inputHandler. StandardGame only maintains GameStates. And that gamestates might have InputHandlers (if they are implemented like in DebugGameState) You should really study DebugGameState a bit and you will see how that works.

ttrocha said:

StandardGame has no inputHandler. StandardGame only maintains GameStates. And that gamestates might have InputHandlers (if they are implemented like in DebugGameState) You should really study DebugGameState a bit and you will see how that works.


ok... tanx again for great tips...!! iLL post my codes tomorrow if I can regarding the Third Person in StandardGame...

Why don't you use the normal character controller and just move the camera by a displacement vector so it's behind the guy? You won't have chase camera lag, but you should be able to code that in easily. Besides, some games with over the shoulder views (GoW, ME) work better like this, since the controls are more direct.