[Newcomer] CRAZY 3D concepts

Hey everybody,

I have been EXTREMELY impressed by what the jME engine can do and all the open source tools, tutorials, projects and random code that is floating around everywhere! Here is my situation though, I am a fairly new Java programmer while I have a firm grasp on programming in general, the OO programing really messes me up. I fully understand Java syntax but really what is bothering me is this. Conceptually with OO programing how would a player controlled character move about a flat map (for now) with all these classes and objects and whatnot? Now I know there are loads of tuts all over the place for this but I need someone to explain it to me… in English. I am really excited to start my own little 3D project I just need a firm grasp on how it all works, all help is GREATLY appreciated.

And if somebody out there has a kind enough maybe you could give me a few pointers on shooting a gun with that character by clicking(this would include making the game capture the cursor I presume) and then having collision detection for the bullet.



My suggestion to you would be to download JME and install it in your IDE of choice. After you've done that you will notice JME contains a test package with all kinds of small written tests including movement and firing an object. After you've checked it out just mess arround and see where you end up. Don't raise your goal bar to high, just try to do simple stuff and with time you'll understand it all :slight_smile:

The Flagrush tutorial is a little game that gets extended step by step, this and the Test* Classes in the jmetest package are probably your best start.

Better don't try to make a quake clone for a start :)  start with something easy.

Do you know a bit about OpenGL already?

jME does a really good job at hiding the OpenGL complexity from us, but you still need to know how things work internally or yo will struggle from one problem to the next.

Hey thanks for replying! Well anyways, I already got jME up and running everything is set up to make it work and I have looked at all the examples in jME about different things even before I wrote this. I was wondering is there some way to view the source for the examples? That would probably help a lot.

I did look at the flag rush tutorial but it was only half done which does not help me any  :stuck_out_tongue:

Do you know a bit about OpenGL already?
jME does a really good job at hiding the OpenGL complexity from us, but you still need to know how things work internally or yo will struggle from one problem to the next.

I know only that it does stuff for 3D, nothing else. I have only been to the web page once or twice. Are there some easily accessible OpenGL tutorials?

Thanks again,

if you have set up jme in eclipse or netbeans and you did download the source through cvs, then the source for the tests is in the com.jmetest package.

Its not a problem if you don't know OpenGL yet, but you need to be prepared to read some things up like View frustum, Material and Lightning, Transparency and Texturing for a start.

I think jME is actually a pretty nice playground to learn how those things work, because you can easily change something and see what it does.

Also make sure you understand the concept of a Scenegraph (like kids inheriting the translation/rotation of its parent etc.), but this is the easier part of the game :slight_smile:

Tutorials who deal with OpenGL c or c++ code are not necessary i think, you just need to understand the general 3D concepts.

Oh okay I found them :D. Between now and my last post I have done a lot of experimenting, its really fun, especially for the terrain I got some really cool scenarios. That does not change the fact that a lot of the tutorials are half finished but they still help a ton for easy things.

I have a few more questions that I will probably figure out eventually but it would be nice if someone explained it to me.

  • Making the player controlled box NOT go up vertical cliffs.
  • Randomly generated terrain, how does this work? Actually I would just like to know how a landscape is made in the first place.
  • Rendering distance/fog how do I change this so that it renders objects that are really far away, basically I want it to show the whole map not cut some of it off past a distance.

    Thats pretty much it for questions for now,


Yikes! Sorry everybody for your time but it looks like flag rush just about answered all my questions. I should probably fully read the tutorials next time  :P.

Any ways I still have one problem, that is how do I stop the player from walking straight up cliffs? I have a full 3d environment with the player controlling a box(node) in the first person view. And I have some basic physics for gravity so that the player sticks to the ground, however the player can walk straight up cliffs!!!  :-o Obviously this problem needs to be fixed, any help with this problem is greatly appreciated.


Well there are two main approaches. One would be to have two "terrains" one is the one visible, and the other one is always culled, but it has information about walkable zones… This is what most games do (separate logical info from visual info). The other approach is more straight forward and involves creating a pick ray from your character down, find the triangle intersection of the terrain, and calculate the slope of it (with dot product, for instance) and then preventing movement if the slope is too big.

Oh yeah, I see how that could work. I would have to look a little more in pick rays though.  :smiley:

Thanks everyone!

I think implementing jmephysics pretty well solves that problem as well (walking up slopes). It will help with other things too.