Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JOGL, Java3D, Xith3D or LWJGL? Complete n00b.  (Read 1691 times)
0 Members and 1 Guest are viewing this topic.
Offline itistoday

Junior Member




There's too much blood in my caffeine system.


« Posted 2004-07-11 23:11:05 »

Hi there, I have a game on the drawing boards that was originally intended to be 2D using sprites.  However, I think that perhaps it would be better if it was 3D OpenGL because then it would probably run faster (through graphics card and not CPU right?), as well as allow for cool special effects and allow me to make the models in 3D modeler applications, right?

Now, I'm a complete newby when it comes to OpenGL, and I'm also currently still learning Java.  However, once I finish with the basics, I'd like to choose a library to base my work on.  So what would you recommend to me and why? Which library is better? Which has more promise? And which is easier to learn, yet powerful?

The game will not really use the 3-dimensions, as it will be a top-down view, and all players will be on the same z-axis, but I think that OpenGL would give me advantages over Java 2D (right?).

Thanks for any help.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #1 - Posted 2004-07-12 08:04:25 »

Sounds like LWJGL is the library for you: Small, easy, reliable and fast  Smiley
An alternative is JOGL/JOAL/JINPUT, which is basically the same thing (a few differences aside) but much larger.
Java3D is not the most suitable tool if you basically are going for 2D games. Xith3D is a java3D alternative geared towards gaming, and uses jogl or lwjgl for rendering.

You could still go for java2D, but you should be prepared for some things:
* You can't depend on that it works fast on any machine (although on windows it can be pretty quick if you get everything to be accellerated).
* You have a lot less bells and wistles to play with compared to openGL for creating eye candy.
* You are tied to 2 dimensions. If you want 3D stuff (even though the gameplay is 2D), you need openGL.

Offline itistoday

Junior Member




There's too much blood in my caffeine system.


« Reply #2 - Posted 2004-07-12 12:20:31 »

Quote
Sounds like LWJGL is the library for you: Small, easy, reliable and fast  Smiley
An alternative is JOGL/JOAL/JINPUT, which is basically the same thing (a few differences aside) but much larger.
Java3D is not the most suitable tool if you basically are going for 2D games. Xith3D is a java3D alternative geared towards gaming, and uses jogl or lwjgl for rendering.

You could still go for java2D, but you should be prepared for some things:
* You can't depend on that it works fast on any machine (although on windows it can be pretty quick if you get everything to be accellerated).
* You have a lot less bells and wistles to play with compared to openGL for creating eye candy.
* You are tied to 2 dimensions. If you want 3D stuff (even though the gameplay is 2D), you need openGL.

Thank you for the really informative reply.  A couple last questions:

I have Strata 3D Pro and would like to use it to create the player models for the game, can LWJGL import models? I noticed that  Xith3D can import them, and if it uses LWJGL what's the reason that you didn't recommend it?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #3 - Posted 2004-07-12 14:27:13 »

Quote
I noticed that Xith3D can import them, and if it uses LWJGL what's the reason that you didn't recommend it?


No reason at all; I should have recommended taking a look at it Smiley.
I never used Xith3D myself, but it seems like a really great API and I've seen it produce very good results.

Offline princec

JGO Kernel


Medals: 378
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #4 - Posted 2004-07-12 18:53:23 »

LWJGL is just one level above driver level - it's very bare metal. If you need higher functionality, you'll be wanting to either write your own or use someone else's stuff like Xith or jMe.

Cas Smiley

Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #5 - Posted 2004-07-12 19:44:09 »

Hey, this is the Java3D forum! So could someone please suggest to use Java3D?

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline itistoday

Junior Member




There's too much blood in my caffeine system.


« Reply #6 - Posted 2004-07-12 21:53:04 »

Quote
Hey, this is the Java3D forum! So could someone please suggest to use Java3D?

Actually, after reviewing my choices, I'm now down to either Java3D or Xith3D and need help deciding.  I like Java3D because it is very well supported and documented and has a lot of utilities and such for it to import models.  Xith3D on the other hand lacks documentation but seems geared specifically towards games.

Also, in order to use Java3D do I need to know OpenGL well? Because currently I have very little knowledge of it.

Are there any spcific problems/disadvantages to using Java3D? And finally, does Java3D use OpenGL under-the-hood for all its graphics work (it is hardware accelerated right)?

Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #7 - Posted 2004-07-13 05:35:17 »

Using Java3D doesn't require any OpenGL knowledge. It CAN render to OpenGL, but theres also a DirectX binding. But on the Java3D API level, you cannot tell the difference.

The problem/disadvantage of Java3D is that is wasn't made for games. It is highly multithreaded and a bit unpredictable. Hard to get stable framerates. (See FlyingGuns to know what I mean).

So for fast paced shooters like AlienFlux that rely on a constant 60FPS, Java3D might not be a good choice.

Also, Java3Ds focus is on scalability. The downside is that it performs bad on small problems.

I'd watch at some samples and classify your game.

- many 2D games run very well with Java2D
- for games like AlienFlux, head for JOGL/LWJGL
- for games like FlyingGuns, you need more infrastructure, head for Xith3D/Java3D

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline Breakfast

Senior Member




for great justice!


« Reply #8 - Posted 2004-07-13 11:38:45 »

Xith3D is based on Java3D, which means that if you learn to use Java3D with all the documentation and tutorials available for that you should be able to pretty much translate it directly to Xith3D.

I think that Java3D is a really good learning environment for exactly the reasons you mentioned. Once you have the skills they are pretty much transferrable.
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #9 - Posted 2004-07-13 11:56:33 »

I personally found openGL to be far easier to learn than java3D's scenegraph stuff. Given that the author is a newbie who intends to do a 2D game, I still would suggest learning some openGL first, using LWJGL (or JOGL if you like). Maybe put the use of models on hold for later when your game progresses and choose a library for that or write your own then. By the time you get there, these things have become easier to accomplish for you will have learned a lot.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cep21

Junior Member




Java games rock!


« Reply #10 - Posted 2004-07-13 13:49:19 »

If you havn't check out www.mojomonkeycoding.com  Try some of the demos see how they run and look at the source code for them.  It's pretty simple to use.
Offline itistoday

Junior Member




There's too much blood in my caffeine system.


« Reply #11 - Posted 2004-07-13 14:55:55 »

Ok guys, thank you so much for all this help.  After playing Alien Flux I'm convinced, because my game will be somewhat similar.

Alien Flux uses LWJGL, which I would love to use but sadly it doesn't work well on a Mac (somehow they got it working though...).  So it seems like JoGL is the way to go for me.

But, I also understand that JoGL is somewhat "lowlevel" stuff. Does using it mean I'll have to do more work (writing my own collision detection schemes etc).  If this is true, then another potential route is to learn the Java3D tutorials and then migrate to Xith3D which has built in collision detection, model loaders, and uses JoGL...

edit: the game I'm going to be making is going to be very difficult to write, and very complicated.  I'm going to have to worry about a lot more stuff than just the graphics, so the more a library can do for me the better.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #12 - Posted 2004-07-13 20:56:22 »

Quote
edit: the game I'm going to be making is going to be very difficult to write, and very complicated.  I'm going to have to worry about a lot more stuff than just the graphics, so the more a library can do for me the better.


Take care that you don't set your targets too high for your first game. You might just get frustrated. Why not start with something simple?

Offline itistoday

Junior Member




There's too much blood in my caffeine system.


« Reply #13 - Posted 2004-07-13 22:33:06 »

Quote
Take care that you don't set your targets too high for your first game. You might just get frustrated. Why not start with something simple?

Yeah, I plan on making a very watered-down version of it and just move objects around on the screen.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (23 views)
2014-09-12 09:08:26

Norakomi (56 views)
2014-09-10 13:57:51

TehJavaDev (69 views)
2014-09-10 06:39:09

Tekkerue (34 views)
2014-09-09 02:24:56

mitcheeb (56 views)
2014-09-08 06:06:29

BurntPizza (40 views)
2014-09-07 01:13:42

Longarmx (25 views)
2014-09-07 01:12:14

Longarmx (31 views)
2014-09-07 01:11:22

Longarmx (31 views)
2014-09-07 01:10:19

mitcheeb (39 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!