Terrain creation question - GUI - DnD - And well lots of other questions

Every developer should write out their plans before they do them. Right? So I have… I have made myself an island (more like continent) w/ many cities on it. Due to that I have some huge questions! :stuck_out_tongue:

QUICK NOTE: ALL OF THIS IS LOW POLY - DO NOT PICTURE OBLIVION WHILE READING THIS - Picture RuneScape type polies. With the exception of a little better.

  1. Could I design my terrain using some other program? Or do I have to use the terrain design in jME? Because if I could use it, 3ds would be huge advantage…

  2. If I can do '1.' read this:

    I DONT WANT the players to walk (or swim) on water. is it possible to make it to where they can walk on 'bridges' over water? Walk on the land while not being accessible to walking on water? If so can I get an explanation?

  3. Lets say I have a city already pre-built. And I want land around it… Would it be smarter to do this:

      A) Continue building around the city

      B) Use another 'file' to build the land around the city

    Assume I have all stuff on the 'continent' built.

      C) Port them into one file?

  4. I've tried to get MonkeyWorld3D to work… But I've had NO LUCK… Could someone give me a walk-through of how to get MW3D 4.0 started? Also… Please note if I need something else to get it to work I probably DONT HAVE IT!.. So yeah I need a dedicated helper :stuck_out_tongue:

  5. Camera - I've been looking through the API and I cannot seem to find out how to make a rotational camera with the up, down, left, and right keys. Any suggestions?


  6. Textures - I noticed that when I brought in a 'teapot' that I had created it was all white, it didn't retain any color I had given it in 3ds. Any reason why…? Any way to give it color? Here is the code I am using to load the object…

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;

import com.jme.app.AbstractGame;
import com.jme.app.SimpleGame;
import com.jme.bounding.BoundingSphere;
import com.jme.scene.Node;
import com.jme.scene.Spatial;
import com.jme.util.export.binary.BinaryImporter;
import com.jmex.model.converters.FormatConverter;
import com.jmex.model.converters.ObjToJme;

 * Started Date: Jul 22, 2004<br><br>
 * Demonstrates loading formats.
 * @author Jack Lindamood
public class LoadingObj extends SimpleGame {
    private static final Logger logger = Logger
    public static void main(String[] args) {
       LoadingObj app = new LoadingObj();
        // Turn the logger off so we can see the XML later on

    protected void simpleInitGame() {
        // Point to a URL of my model
        URL model=LoadingObj.class.getClassLoader().getResource("jmetest/data/model/teapot.obj");

        // Create something to convert .obj format to .jme
        FormatConverter converter=new ObjToJme();

        // This byte array will hold my .jme file
        ByteArrayOutputStream BO=new ByteArrayOutputStream();
        try {
            // Use the format converter to convert .obj to .jme
            converter.convert(model.openStream(), BO);
            Spatial teapot=(Spatial)BinaryImporter.getInstance().load(new ByteArrayInputStream(BO.toByteArray()));
            // shrink this baby down some
            teapot.setModelBound(new BoundingSphere());
            // Put her on the scene graph
        } catch (IOException e) {   // Just in case anything happens
            logger.logp(Level.SEVERE, this.getClass().toString(),
                    "simpleInitGame()", "Exception", e);

7. Is there a DnD (drag n drop) thing? Uhh... I mean... Is there a way to bring in a model and 'drop it' exactly where I want it? Move it per pixel as some would say? I really need this and if it's in jME do... EXPLAIN! :P

8. All that is stated here is 2D -->  Mini-maps, inventory, stats, MMORPG-like chat-box; Is it possible to add this w/ DnD (drag n drop)? If not could I be pointed to the right direction on giving me an idea how to implement a 2D interface? I also want this interface to contain the 3D world but not overlap the 3D world. I want it to contain it similar to 'runescape'. I already have these created I just need to implement them now.




trizicus Don't take me wrong, but I think you are trying to eat the whole world all by yourself and it will certainly give you indigestion.

It is clear that you are trying to make a huge project and have some basic questions about many things. There is definitely no easy way to wake up one day and know anything, let aside a 3D game engine, even if it is one as easy as jME.

Some of your questions (like the terrain being exported from 3DS) are really not related to jME at all, and are more of a programming paradigm or style. jME can do pretty much everything, but the concepts required for the programmer to actually do anything are not going to be learned this way.

Also, asking questions is really good, but some times you just need to figure it out yourself by trial and error and independent research. Don't let the wonderfully responsive community of jME to spoil you  :wink:

I am sorry if I sound too harsh. I don't want to turn you away from jME, it is just that I think your efforts can be redirected in a more constructive way for your learning curve. That is all. 

just to clear some things up… :stuck_out_tongue:

  1. yes you can. you can even use Photoshop to make one. see Image-based Height Map. (google)

    – you can import them in jME, but i think (i read some time ago) that it requires an image file in the power of 2s (64x64, 128x128).

  2. yes you can. this depends entirely on your design. if your water is simply looking like a box, or somewhat tiled, you can use distance checking, or other simplier methods to optimize performace. if not, you could use some bits of collision detection. or you could create an imaginary bound and use some bits of collision detection as well. depends entirely on your design and requirements, as what each and every other game has.

  3. still depends on your design. you design on your own. there is no 'wrong' design, only better.

  4. didn't have any luck with it either. (can't make a scene, causes errors)

  5. you can customize the FirstPersonHandler (or make your own) as you wish. jME makes it much easier.

  6. 3ds texture loading (and even general loading) is a bit of a problem for starters. you need set some kind of property (is it 'texdir' or 'texurl'?) for it to work. try checking it out on the forums. or copy the same thing for Maya (the property setting for 'mtllib') and simply change it into either of the two above.

  7. DnD is something you need to implement for the while. (you can use event-handling through MouseInput and MouseInputHandler)

    – you can simply use switches to perform DnD. for example, IF left button pressed && timePressed > 0.5f THEN isDnD = true;

    – the one you also need uses Mouse Picking. check out some examples around jME and the forums.

  8. there are an abundance of examples for GUI in jME. i have never really tried GUI programming in jME myself (concentrating on my game interactions still) but they have a lot going on here. if you want to make your own, i guess setRenderQueueMode(Renderer.QUEUE_ORTHO) would be step one.

    i've just started jME only for a week now, and jME goes better and better.

Thanks for your knowledge :stuck_out_tongue:

I'm in the middle of getting to know java a little better now, and will get started on this after I've put a good month or two into mastering java.

trizicus said:

I'm in the middle of getting to know java a little better now, and will get started on this after I've put a good month or two into mastering java.

It's great to see you are serious about all this and are really interested in learning java and jME. A number of other people chose to run after they've been told they'd have to learn a lot before they could get anything done with jME...
Way to go, I really hope you manage to get over the rougher parts of the road with that spirit!

heh, thanks…

Don't get me wrong though I thought the basics was enough… But apparently not… I've got plenty of books to read and understand to get me going :stuck_out_tongue:

Thanks for the support!

I finally understand a simple code like this:

Vehicle minivan = new Vehicle();

This is what I come to and means I could finally understand how spheres are added in jME - This is what I've come to:

Vehicle is a class declared 'before' this is declared example:

class Vehicle {

  int passengers;

  int fuelcap;

  int mpg;


Thus now when I see 'sphere' I'll understand that for me to effectively use it, I better know the class :stuck_out_tongue:

on top of that… I don't save the .java as the Vehicle.java… I save it as the class that is followed by a main() method… :smiley:

I feel so good I'm learning JAVA… moving right along…

Once again Thanks for Support