Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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  
  2D Games using OpenGL, JOGL or LWJGL?  (Read 2303 times)
0 Members and 1 Guest are viewing this topic.
Offline role

Senior Member


Projects: 3


Java manmoth is coming!


« Posted 2004-09-03 16:32:32 »

Like the title said, I would like to port my game graphics engine to use OpenGL to gain more performance.
So far that I know, libraries that used OpenGL are JOGL and LWJGL, any other else?

And the question is, which one should I use? I'm making 2D games, not 3D.
I know LWJGL could make 2D games, but don't know for sure JOGL could make 2D or not.
Which one is better? And how much performance could I gain from porting my Java2D to that OpenGL?
So far I got 200+ fps on my GeForce NVidia 128 megs, but on old pc, it only got 30 fps, that's why I'm trying to port it to OpenGL.

I would like to know any comments from anyone that have use it, before i dig deeper on one of that. The upside and downside of using both.
Or perhaps Java3D, Xith3D, jME, and else could make 2D games too?
The important thing that I would like to know are: which one is faster, easier to use/code, less bugs, active developed, and especially is it right to make 2D games from it or not.
Also last thing, I hear in 1.5 Java2D is using OpenGL too, is it still make sense to port my graphics engine right now?


Thank you very much guys

Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Offline pepe

Junior Member




Nothing unreal exists


« Reply #1 - Posted 2004-09-03 16:41:15 »

I found 1.5 java2D GL pipeline to be fine for 2D gaming. See GoSub in my signature. (home page for zip, if you want to test GL accelerated version)
Nevertheless, some restrictions (no accelerated additive blending, for example) can be no-go.
Depending on the game, it might not be worth going down to GL. Nevertheless, i would not encourage to devellop games for short term to be run with 1.5GL pipeline. It is too immature at the moment.

By the way, what are that 'old' machine specs? Isn't 30fps enough for your game to be playable, or it's just that you'd love to have better framerates?

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline TheAnalogKid

JGO Coder


Projects: 3



« Reply #2 - Posted 2004-09-03 17:01:40 »

Have you considered Xith3D?

If you get 30 fps on an old pc then it might be for another reason other than Java2D. It might be a hardware acceleration issue.

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

Senior Member


Projects: 3


Java manmoth is coming!


« Reply #3 - Posted 2004-09-03 17:15:08 »

Wow thanks for the fast response Smiley

@pepe Hmm.. Then it is true that 1.5 Java2D will use GL pipeline, great!
Currently I use 1.4.1 (waiting for 1.5 to be gold before download it), so I can't test the 1.5 GL, but I'll try the zip, thanks.

I use 50 fps for default, and I use animation/movement based on game loop (update), if the fps drop, the animation/movement will also drop.
The specs is not too old I think, the processor is PIII with 128 Megs RAM, but I don't know the graphics card, got 30 fps.
And also on my friend P-IV 2.26 GHz, 128 MB RAM, unknown gfx card (perhaps onboard), the fps is lower, 25-30 fps.
Anyway is there any difference performance between running on J2SE with running on J2RE??

Ehmmm.. don't you have any comments on JOGL or LWJGL?

@TheAnalogKid is Xith3D can do 2D games? Is it better than JOGL and LWJGL? What is the upside of Xith3D?

Thanks guys

Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Offline z.e.r.o

Junior Member




Java games rock!


« Reply #4 - Posted 2004-09-03 17:20:42 »

capping FPS = evil
at least to me

Matteo Anelli
.brain - http://www.dot-brain.com
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #5 - Posted 2004-09-03 17:24:06 »

capping FPS != evil
running animation based on fixed FPS == evil

Kev

Offline role

Senior Member


Projects: 3


Java manmoth is coming!


« Reply #6 - Posted 2004-09-03 17:28:15 »

lol, that's what I do right now
Running animation based on fixed FPS == evil
I'm == evil  Grin
Any article on this field, whoops out of topic
Any comments about JOGL and LWJGL

Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Offline Orangy Tang

JGO Kernel


Medals: 51
Projects: 11


Monkey for a head


« Reply #7 - Posted 2004-09-03 17:34:25 »

Yeah, despite what people may say, Jogl is still far too buggy and unreliable. Tongue LWJGL keeps it simple and reliable.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline tom
« Reply #8 - Posted 2004-09-03 18:33:12 »

Quote
And how much performance could I gain from porting my Java2D to that OpenGL?

Depends on what your doing. If your getting hw acceleration with your Java2D game, then porting it to opengl won't make ut much faster. It's also alot of work to get it to run fast in opengl. Old computer might not run opengl because of missing/broken drivers. So only consider opengl if you know you really need the improved features.

I like LWJGL. Easy to use and got everything I need.

Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #9 - Posted 2004-09-03 20:05:37 »

Quote
capping FPS = evil
at least to me


Uhm... no. Why?

Drawing more frames than hz is a wast of cpu power. It's pointless and you'll run easier into GC pauses that way.

Framecapping works really well with a high precision timer. Especially if you use a self adjusting method (see lwjgl's sync2 method).

弾幕 ☆ @mahonnaiseblog
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline role

Senior Member


Projects: 3


Java manmoth is coming!


« Reply #10 - Posted 2004-09-04 03:06:31 »

Okay then it settled now, I will learn LWJGL. Wink
Less buggy, reliable, easier to use, simple, that's what I needed! despite of I will gain performance or not, but it always nice learn new things, and OpenGL is always in my mind from long ago Smiley
All right LWJGL here I come!! Grin
Oops one thing, I know LWJGL can do 2D games, but is it right doing 2D games using LWJGL?
Any big troubles will I face later? Cos I know LWJGL is intended for 3D games.
Or for simplifying things, are there many 2D games is using LWJGL out there, and what's the most common problems arise while using it to make 2D games.


Thanks a million guys

Note to self: I better google how to code animation that not depends on fps  Tongue

Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #11 - Posted 2004-09-04 13:11:50 »

LWJGL is intended for any kinds of games! Both my games are 2D.

Alien Flux
Super Elvis (WIP)

Cas Smiley

Offline role

Senior Member


Projects: 3


Java manmoth is coming!


« Reply #12 - Posted 2004-09-05 04:43:28 »

Fantastic!!
Thanks a lot guys, I'll digging LWJGL right now.

Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Offline z.e.r.o

Junior Member




Java games rock!


« Reply #13 - Posted 2004-09-05 20:59:09 »

Quote


That was I intended, really Smiley



Matteo Anelli
.brain - http://www.dot-brain.com
Offline Wozzer

Innocent Bystander




Java games rock!


« Reply #14 - Posted 2004-10-05 07:21:59 »

Quote
capping FPS != evil
running animation based on fixed FPS == evil

Kev



Getting slightly back to topic here.

Kev, I was reading your SpaceInvaders refactoring/OpenGL article and you said:
The only downside of the LWJGL is that you need to buy into all of the ideas behind the library or none of them. Assuming you agree with everything the library has been written around then this isn't a problem.

This kind of implies to me that maybe you don't agree with everything the library was written around.  I was wondering if you could do into more detail about this?

Or at least what you mean by "the ideas behind the library"?

I'm not looking for an argument.  I'm a newbie and I'm interested in knowing about the pros & cons of LWJGL.

Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #15 - Posted 2004-10-05 07:38:38 »

Sure, am I'd hope Cas/Matzon/Elias would'nt mind me saying this:

LWJGL has taken some steps to "tailor" what they provide to games development. For instance LWJGL has removed a bunch of GL calls that you most likely don't want to use in your games. When a decision is taken on changing the API its done in the direction of games development, or at least the perceived (sp?) view of games development.

This is why:

1) LWJGL is driven so far so fast and changes so rapidly.
2) LWJGL is not the same as JOGL, providing far more functionality.
3) LWJGL will do pretty much _everything_ for you game.

This does mean that should you use LWJGL (correctly), i.e. you use it for visuals, audio and control, then your game becomes hugely dependant on changes/improvements to LWJGL.

I'd like to say at this point that in the tutorial I've attempted to be objective as possible and not put too much personal opinion in there. What I was attempting to say was that assuming you don't mind having some of your decisions made for you by people that actually take the time to think about it (LWJGL team) then LWJGL is fine. If you're someone with enough time to take every decision in games development for yourself then (and you'd prefer it that way) then maybe its not for you.

<personal_opinion>
At the current time LWJGL is in fact my preferred option when developing anything. One of the reasons I'm not doing any Xith stuff at the moment is that I'd like to use the LWJGL version once its stable.

To me, if you're writing a 2D game at the moment then the best choice is LWJGL. If you're ready for a learning curve then you can do much worse than jumping for SPGL (although I would say this isn't really for the learner).

And finally Smiley On a purely selfish whim, while I think its cool that we're seeing lots of 3D games attempts I'd really recommend working in 2D if you're a single person. I only say this through bitter experience (see my projects page).

1) Sprites you can get. Models are harder to find.
2) 2D display/control/collision is easier to make fun.
3) 3D style effects in 2D are very cool Wink

</personal_opinion>

Kev

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.

xsi3rr4x (18 views)
2014-04-15 18:08:23

BurntPizza (15 views)
2014-04-15 03:46:01

UprightPath (28 views)
2014-04-14 17:39:50

UprightPath (13 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (54 views)
2014-04-10 04:04:31

BurntPizza (111 views)
2014-04-08 23:06:04

tom_mai78101 (212 views)
2014-04-05 13:34:39

trollwarrior1 (181 views)
2014-04-04 12:06:45

CJLetsGame (187 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!