RoboticsWar Java2D+LWJGL+JOGL

Actually this is more to testing the graphics engine.
Cos the game is only a demo of platformer game.

Now without saying too much word, please testing 3 graphics environment game :slight_smile:
http://goldenstudios.or.id/products/games/bin/robosick.jnlp

Anything that goes wrong?
Mode that likely to be failed, Java2D fullscreen mode, and JOGL mode. Several ppl said that, in here every modes is working perfectly. Please tell the exception and Java version do you use. Thanks

PS: type “hyperspeed” to max out the fps, and press “Z” in the game to make the blocks translucent, and see the difference of Java2D game and OpenGL game :smiley:

nice game , I had fun… opengl worked better

Nice but the JOGL version doesn’t work for me: the fullscreen frame is completely white with a ‘ok’ button that doesn’t respond.

The Java2D version ran at 20-50 FPS with some sound stuttering.

The LWJGL versin ran at 11-41 FPS with lots of sound stuttering and stalls.

I got an exception launching in JOGL…with an odd message that said I do not have OpenGL support (which I do). It seemed like it was related to going full screen exclusive.

Oddly…J2D seems like the winner on this game :wink:

Java2D wins on my machine too :slight_smile: JOGL doesn’t draw anything but a yellow bar in the game screen. LWJGL Z feature doesn’t work, but in Java2D everything is smooth and the Z feature DOES work.

This is very weird.
The result is very variety in all machines, but only now I heard that the Java2D is superior than the OpenGL (LWJGL/JOGL)
As I know the LWJGL has about 2-10 times increment than Java2D.
But mostly the JOGL is not working :frowning:
I have been confirmed by JOGL team that it’s something to do with ATI graphics card, and I need to add some lines on the jnlp file for the workaround.
Could you test it again against the JOGL version?
And be sure to remove the cache, or it will load the old cache.

Thank you for all that testing this :slight_smile:

PS: What Java version do you use Vorax, I happen to get very low fps on some machine that has Java 1.4, but when I upgrade Java version to 1.4.2 the fps boost to normal.
And what graphics card do you have?
Malohkan, what gfx card do you use? If you use ATI then check it out again, perhaps now it fixed :slight_smile:
For the LWJGL I don’t know how to fix it :frowning: only you had that problems…

[quote]PS: What Java version do you use Vorax, I happen to get very low fps on some machine that has Java 1.4, but when I upgrade Java version to 1.4.2 the fps boost to normal.
[/quote]
Running 1.4.2 on Nvidia Geoforce 4 MX

PS: I run JOGL all the time on my computer without problems as well as LWJGL.

I figured out the problem.

Someone recently posted a link to BEA JRocket, I decided to try it out…BAD BAD BAD IDEA.

It messed up just about anything being launched by WebStart.

I uninstalled it and setup my webstart to use JRE 1.5 and things are smooth as an androids bottom now.

J2D, LWJGL and JOGL all ran without a hitch. LWJGL and JOGL both maxed out at what must be the monitor refresh rate of 65 FPS (with hyperspeed)…I suspect if vsync is turned off in your game, that would be over 100 fps.

Great game btw!

Oh well, that’s another occasional problem ;D
Alright, now I’m sure my Java2D + LWJGL + JOGL is working in NVidia Geforce! :slight_smile:
Now time to deal with ATI gfx card…

So my engine is working with Java 1.5, happy to hear it :smiley:
Last time I have a problem with Java2D fullscreen mode in Java 1.5

Only 100 fps? Turn off the vsync (LWJGL) option in there and bufferstrategy (Java2D) option, maxed out the fps (type “hyperspeed”) and see the fps.
I got about 530 fps in Java2D fullscreen mode and 690 fps in LWJGL, and the fascinating one someone said that the LWJGL in his pc can get 1300 fps! And the other 1700 fps! Wow got no worried with the performance anymore I think :slight_smile:
But they have a super fast gfx card, anyone here have a standard gfx card to test this??

Java 2D comes out faster on my works machine. However, thats probably because the integrated graphics card supports DirectDraw much better than OpenGL (i.e. it doesn’t support OpenGL).

Kev

[quote]LWJGL Z feature doesn’t work, but in Java2D everything is smooth and the Z feature DOES work.
[/quote]
Z is on Y on a german keyboard in the LWJGL version. That’s why i had to type “hzperspeed” too…

ATI 9200… LWJGL worked the best in terms of FPS speed. So with transperancy, the FPS for LWJGL is 540ish with J2D it was 280ish. However, the Controls on LWJGL s0xred sooo badly. I couldn’t go back to get some more of those blue things in the first level sometimes without jumping constantly…

So for me, J2D won that round because of the input problems…

DP

Edit: Made what i wanted to say clearer

It’s pretty difficult to get input wrong in LWJGL so role had better be ready with an excuse :slight_smile:

Cas :slight_smile:

Oh well my site is DOWN AGAIN! :<

Integrated graphics card? Do you mean onboard graphics card, kevglass?

For the input, hmm I don’t know, I only convert all LWJGL input constant to AWT input constant and vice versa.
So when checking keyDown(KeyEvent.VK_LEFT) it check Keyboard.isKeyDown(Keyboard.KEY_LEFT), simple :slight_smile:
That’s for checking keyDown, but for keyPressed I need to poll LWJGL keyboard event and then convert it to AWT keyboard event, simple again :slight_smile:

Anyway how do you know Y is Z at first EgonOlsen? Do you have other experience with this? So this is not my fault isn’t it? :wink:
And what’s the problem in there darkprophet? What’s the difference between Java2D input with LWJGL input?

And who’s failed to enter JOGL version here?
What gfx card do you use? I need to report this to JOGL team…

Okay now I need to complain to my site hosting provider before fixing anything!

I get 800 fps with spikes over 1300 (main menu) in LWJGL. Why no option to turn off vsync for JOGL?

YYou definetly have no worries about FPS now. Open GL for 2D games is like killing a fly with a nuclear weapon :smiley:

Kinda funny thinking about C++ guys doing 2D games complaining Java is not fast enough :wink:

[quote] Anyway how do you know Y is Z at first EgonOlsen? Do you have other experience with this? So this is not my fault isn’t it?
[/quote]
I remember this from a friend of mine, who bought a german keyboard. Y & Z are replaced with each other.
I am guessing that the only way to get the correct “key” is to get the character value instead. Since the z key does infact return the y key code on german keyboards (and probably some other keyboard/languages too).

EgonOlsen: Could you validate that Z is actually returning the Y key value and vice versa, while the getEventCharacter returns Z/Y correctly? If you need a test application, you can try the KeyboardTest

java 1.5.0_01, geforcefx5200 amd64 2800

java2d 49/50 (most of the time)
lwjgl 50/50 (constant)
jogl 50/50 (jumps around a bit, even went to 52…)

maybe I’m just being picky, but the scrolling tiles look jittery on my computer… you should be able to make it super smooth with opengl and somewhere near as smooth with java2d. I don’t think it has anything to do with the capabilities of your chosen graphics api though, I would bet the problem is with your scrolling algorithm. I say that because I remember seeing similar effects at one point with a scrolling tile-based rpg I was working on.

Also, I don’t think opengl is overkill for 2D games, especially if you want to create some nice effects (using translucency, scaling, rotating, etc.). I think its still a good choice even if you don’t make heavy use of those effects just because of how smooth that animation can be.

p.s. I’ve been spoiled by writing 2D opengl games, I’m afraid I will never be able to return to the world of java2D.

No problem, i’ll try that after the weekend.

[quote]Anyway how do you know Y is Z at first EgonOlsen? Do you have other experience with this? So this is not my fault isn’t it? :wink:
[/quote]
It’s a common problem in many applications since the early days of computers, because some people think that an english keyboard layout is the only layout there is…
:wink:

You mean it isn’t!? :o

:slight_smile:

Kev