Results 1 to 11 of 11
  1. #1
    Elektromarius is offline Member
    Join Date
    Feb 2015
    Posts
    7
    Rep Power
    0

    Default Which 3D Java engine to use?

    Hi, I've been creating 2D games for years in flash, now I'm migrating to java. I've downloaded everything so I can compile programs using Eclipse. I'm pretty decent in Object Oriented coding ( I've never used any of the graphical elements in flash ).

    Here's the thing, I want 1 3D element in my new game, a screen showing a planet. But i want it to be detailed, i want to add random terrain to it. just a simple sphere with some heightmapping and nice textures ( the planet is seen from afar btw ). I've searched the web for nice 3D engines and ended up with "Java 3D API". But it's very hard to find good tutorials for it, as it's name is ambiguous.

    QUESTION
    What is the best 3D engine to use that include the possibility to add heightmapping? I guess I could manipulate each vertex or something like that too.

    Please point me in the right direction, if I can do this with Java 3D API, please show me some tutorials showcasing this.

    Thanks :)

    The rest of the game is in 2D.

    Edit* Im not a math freak and dont need something extremely advanced, this planet is all I need in 3D.

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Which 3D Java engine to use?

    Java3D is very old and not further developed.

    Look here: Engines, Libraries and Tools - Java-Gaming.org
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    Elektromarius is offline Member
    Join Date
    Feb 2015
    Posts
    7
    Rep Power
    0

    Default Re: Which 3D Java engine to use?

    K thanks, I will do further research.

  4. #4
    Elektromarius is offline Member
    Join Date
    Feb 2015
    Posts
    7
    Rep Power
    0

    Default Re: Which 3D Java engine to use?

    So from what I can see, an approach is to use jMonkey and use a canvas for the 3D stuff. I have downloaded the jMonkey editor and will try it out.

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Which 3D Java engine to use?

    The thing is, if the game is -mostly- 2D then LibGDX is far more suitable to your needs as it is really designed to do 2D games (but also allows you to do 3D stuff). Its rather counterproductive to use a full 3D engine just because you have one 3D object.

    PS: I didn't point you to that site just for that one subforum on engines, make that place your home ;)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  6. #6
    Elektromarius is offline Member
    Join Date
    Feb 2015
    Posts
    7
    Rep Power
    0

    Default Re: Which 3D Java engine to use?

    Thanks for replying :)

    Yeah i know. I want to write everything from scratch and learn stuff along the way, like game loops, garbage collection and things like that. What I dont want to learn is how to write a 3D engine.

    Basically all i want is to use a library of classes that deals with 3D objects. Java 3D ( although outdated ) was perfect in that sense. jMonkey is a complete overkill it seems. I'm checking out libgdx now.

  7. #7
    Elektromarius is offline Member
    Join Date
    Feb 2015
    Posts
    7
    Rep Power
    0

    Default Re: Which 3D Java engine to use?

    After a loop d loop of different Editors and Libraries and what not, I have ended up With libGDX using Android Studio as the Editor ( I do plan on making another Android game ). I have managed to create a basic 3D sphere which is Nice, so I will stick With this one for a while.

    Is it supposed to take 8 Seconds to compile a simple System.out.println()? I had to use this Gradle thing, and I feel that is taking 7 of the 8 Seconds.. I mean I'm not used to using Java but I Guess I have to press the "Run" button to test a Project out? Seems unnecessary to build all those Gradle files every single time.

  8. #8
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Which 3D Java engine to use?

    Generally during development you would use your IDE to do the building and running. I don't know anything about Android Studio so can't say if that supports Gradle. But the documentation of LibGDX shows you how to setup your projects and IDEs.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  9. #9
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,143
    Rep Power
    15

    Default Re: Which 3D Java engine to use?

    Quote Originally Posted by Elektromarius View Post
    Yeah i know. I want to write everything from scratch and learn stuff along the way, like game loops, garbage collection and things like that. What I dont want to learn is how to write a 3D engine.
    I'm confused- do you want to write everything from scratch, or do you want to use an engine? If you don't want to write an engine, then you'd presumably use an engine that takes care of a game loop. In fact, OpenGL has its own render loop, so pretty much anything you'd use is going to give you this.

    And if you're using Java, you've already got garbage collection. You don't need to write that from scratch.

    Quote Originally Posted by Elektromarius View Post
    Basically all i want is to use a library of classes that deals with 3D objects. Java 3D ( although outdated ) was perfect in that sense. jMonkey is a complete overkill it seems. I'm checking out libgdx now.
    OpenGL is pretty much the standard way of doing 3D stuff, but it's written in native C. Java libraries like libGDX and JMonkeyEngine give you access to OpenGL in Java.

    JOGL is probably the "lowest level" Java wrapper of OpenGL. If you're just looking for access to 3D primitives, then this is worth checking out.

    LWJGL is at a slightly "higher level" than JOGL, and it adds additional features used for game development.

    libGDX is written on top of LWJGL, and adds even more features for game development, including cross-platform exporting (including to Android and JavaScript), which is a huge deal. This is pretty much the standard library for Java game development.

    I should note that Processing is also worth checking out. It's written on top of JOGL, and makes it extremely easy to get something up and running without any boilerplate code. This is what I suggest novices (and not-so-novices) check out before anything else.
    Last edited by KevinWorkman; 02-23-2015 at 04:13 PM.
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  10. #10
    Elektromarius is offline Member
    Join Date
    Feb 2015
    Posts
    7
    Rep Power
    0

    Default Re: Which 3D Java engine to use?

    wow thanks for your help. I'm so used to a different system over so many years I'm pulling my hair out trying to figure out the smallest of things.

    That last post really cleared things up for me. Thanks a lot.

    I may have mixed up "engine"/"code libraries", sorry for that. The way I have used to do it, is just use the vanilla flash editor, and I create everything from scratch from that. Usually I would create all the classes myself, but if I wanted to do some 3D I would find a library of classes that did all the computations for me. No game engine or anything like that, just a way for me to create a 3D shape without having to do all the math that comes with it.

    The first thing I will do now is look at JOGL, sounds interesting.

  11. #11
    Elektromarius is offline Member
    Join Date
    Feb 2015
    Posts
    7
    Rep Power
    0

    Default Re: Which 3D Java engine to use?

    K so I found this great tutorial on some of the basics on OpenGL \ LWJGL. I thought I would share it if there is someone else in the same boat as me. He does a really good job on explaining and takes his time to go a little bit into the details.

    search youtube : Java LWJGL/OpenGL Game Development Tutorial 1

    This was what I was looking for.

Similar Threads

  1. Playing video from a Java based Engine
    By shiraha in forum New To Java
    Replies: 2
    Last Post: 01-31-2012, 06:13 PM
  2. Replies: 0
    Last Post: 01-28-2012, 07:13 AM
  3. Game Engine in Java, is it practical idea?
    By chan_nguyen in forum New To Java
    Replies: 2
    Last Post: 09-14-2010, 04:20 PM
  4. Java Code Snippets Search Engine
    By ZuudoTech in forum Reviews / Advertising
    Replies: 1
    Last Post: 01-18-2008, 10:13 PM
  5. New Search engine for Java Programmers
    By coolgeek in forum Java Software
    Replies: 0
    Last Post: 07-02-2007, 08:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •