Basic 3D RPG Concepts -- Advice Requested!

Hello everyone!

I am new here to the forums, although I have been "lurking" for a while.

JME sounds like an excellent project and I would love to be able to develop with it. However, my mind is a little slow when it comes to adding a whole new axis in my thoughts, and I was hoping I could get some of your lovely advice :smiley: .



Alrighty, first let me start off by explaining what I want to do. A few of my friends and I are looking at eventually developing an MMORPG (yeah yeah I know, lots of work, you will never make it, etc.). However, we are doing this as a learning experience because an MMORPG is a game type which requires many different programming skills such as implementing a client and server with a database, as well as traditional gaming concepts. Right now my main focus is learning enough about this great engine to start off.



If you all could help me, I would like to know how to do a few things. Namely:

    Have a character on terrain that can move on the terrain and their sprite follows the terrain instead of going through it.

    Attach a camera node to an object (if that is how it works) so I can have a 3rd person view of the character's sprite. (I know Per has some kind of system like this, but I am a little confused with how it works and would love it if someone could kindly explain how it works).[/list:u]


    Thank you very much for reading this post and I hope you all have a wonderful day and life!

I believe I’ve answered this thread before, with a code snippet showing how to work with the third person camera posted on ā€œUsers Codeā€. It seem to have gone lost in the server crash though :frowning:



Anyhow, you should check out the examples in the zip.

This wiki article should help you to get the camera following your avatar. It’s probably too basic but its a good start I hope.



http://www.jmonkeyengine.com/pmwiki/index.php?pagename=Tutorials.ZNodesThatFollowTheCamera





*Edit

Actually I just realized thats for a node to follow the camera and not a camera to follow the node. Same thing maybe??



I think for something super super simple, each frame you can set the location of the camera to match the location of your avatar, then rotate the camera so that its facing the same direction of the avatar, then move the camera backwards. I think that would give you a camera that always looks at the back of the character. It wouldn’t have the fancy movement and rotation stuff though.



I’m sure some of the smarter people on the boards can help out with that.

Have a character on terrain that can move on the terrain and their sprite follows the terrain instead of going through it.


Terrain allows you to obtain the height for a given point. Use this height to adjust the translation of the character.

For instance, Y is up in the game world, my character is at (10.2, 23.1) in the world coordinates.

player.setLocalTranslation(10.2, terrain.getHeight(10.2, 23.1), 23.1);



of course that is a simplification, but gives you an idea.

You could also use ODE to make a true physics type collision.

Attach a camera node to an object (if that is how it works) so I can have a 3rd person view of the character's sprite. (I know Per has some kind of system like this, but I am a little confused with how it works and would love it if someone could kindly explain how it works).


Not sure exactly what you want explained, but using spherical coordinates, it positions the camera at a set distance away from a player, looking at a player. The mouse can be used to rotate around the player, etc. As the player moves the camera moves with it (with some slight delay and rubber band effect).