Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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 OpenGL performance  (Read 3184 times)
0 Members and 1 Guest are viewing this topic.
Offline TheAnalogKid

JGO Coder


Projects: 2



« Posted 2005-02-26 03:34:28 »

Hi,

my game is now using LWJGL but I have serious performance problems. The game runs only at 10 fps. What Am I missing? I use display list for each sprite I draw. What about Pbuffers do I need them? What is the equivalent of video buffers?

I know that calling Display.update() swap the buffers but I don't know more about buffers.

I've looked at the NeHe tutorials but didn't find something that helps me. I've also checked the red and blue books but I don't have time right now to read all the docs.

One question: did you compare the performance of Space Invaders between the Java2D and LWJGL implementations when running in window mode? On my laptop (S3 video card), the Java2D runs at 100 fps and the LWJGL at 45 fps. Why???

By the way, my S3 card has only 16 megs of vram.

Please help!

angelfaerie
Guest
« Reply #1 - Posted 2005-02-26 05:29:59 »

how do you make a game
Offline oNyx

JGO Coder


Medals: 1


pixels! :x


« Reply #2 - Posted 2005-02-26 05:30:21 »

Quote
[....]the Java2D runs at 100 fps and the LWJGL at 45 fps. Why???
[...]


Because... the card is... uhm... shite :-/

Well, maybe it's not that bad and a driver update helps?

16mb should be ok-ish. It's about as good as a TNT2 then? Definitively look for newer drivers.

弾幕 ☆ @mahonnaiseblog
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline K.I.L.E.R

Senior Member




Java games rock!


« Reply #3 - Posted 2005-02-26 07:46:51 »

You're using an S3 card?
That explains the performance.

S3's drivers for their earlier cards are really cruddy, you're better off using a Riva 128 Pro, an 8MB card.

Vorax:
Is there a name for a "redneck" programmer?

Jeff:
Unemployed. Wink
Offline kevglass

JGO Kernel


Medals: 122
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #4 - Posted 2005-02-26 07:59:07 »

Argh! The card isn't shite its just not designed for OpenGL. It, like make low end cards designed for windows workstation use is much better suited to DirectX (hence the 100 FPS in Java2D).

A better driver might help yes, but there is nothing persay wrong with you card (its probably comparable to a fair amount of the users cards that might end up playing mighty bubbles).

Infact, that might well be a consideration for design. Smiley

Kev

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #5 - Posted 2005-02-26 10:13:43 »

I didn't choose the card when I bought the laptop. And didn't imagine that I could have OpenGL issues with it.

Quote
Definitively look for newer drivers.
Yes Iwill.

Quote
Infact, that might well be a consideration for design. Smiley
Well if you're talking about my game then it might be true.

What about the Pbuffers?

Thanks all!

angelfaerie
Guest
« Reply #6 - Posted 2005-02-26 10:21:24 »

How do i create a game? Huh
angelfaerie
Guest
« Reply #7 - Posted 2005-02-26 10:23:01 »

Quote
Hi,

my game is now using LWJGL but I have serious performance problems. The game runs only at 10 fps. What Am I missing? I use display list for each sprite I draw. What about Pbuffers do I need them? What is the equivalent of video buffers?

I know that calling Display.update() swap the buffers but I don't know more about buffers.

I've looked at the NeHe tutorials but didn't find something that helps me. I've also checked the red and blue books but I don't have time right now to read all the docs.

One question: did you compare the performance of Space Invaders between the Java2D and LWJGL implementations when running in window mode? On my laptop (S3 video card), the Java2D runs at 100 fps and the LWJGL at 45 fps. Why???

By the way, my S3 card has only 16 megs of vram.

Please help!

How did you create this game and whats cards?
Offline tom
« Reply #8 - Posted 2005-02-26 11:43:20 »

Quote
Hi,

my game is now using LWJGL but I have serious performance problems. The game runs only at 10 fps. What Am I missing? I use display list for each sprite I draw. What about Pbuffers do I need them? What is the equivalent of video buffers?

Don't use display lists if you only got one sprite in it. Use display lists when you've got a large number of static triangles. You need to batch up all the sprites in a vertex array. You also need to state sort. It's a lot of work but will probably speed things up quite a bit.

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #9 - Posted 2005-02-26 11:59:31 »

See the SPGL sprite engine at http://www.sf.net/projects/spgl - poke around in com.shavenpuppy.jglib.sprites for a really nifty sprite engine which I've been reusing over and over again.

Sprites are located and rotated using fixed point maths btw, which might be a bit confusing.

Cas Smiley

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

JGO Coder


Projects: 2



« Reply #10 - Posted 2005-02-26 12:04:01 »

Quote

How did you create this game and whats cards?

With Java2D, GAGE Timer, LWJGL FMOD and JInput.

I'm in the process of porting my code to LWJGL for performance reasons and give away Java2D (Sad this I will miss this API, it's so easy to use).

My video card on my laptop is S3 Graphics SuperSavage/IXC 16 megs and it runs on a Toshiba Tecra 9000 Pentium 3 1 Gig.

If you want to create a game you'll have to consider which type of game and the quality of the game you'd like to reach. For non sophisticated 2D graphics Java2D performs very well on windows but not on Linux and Mac yet. On the other hand Sun said recently that when using the OpenGL pipeline of Java2D on Linux it boosts dramaticaly the performance.

For flashy and cool visual effects, LWJGL should be a very good API for that but be aware that once you enter the OpenGL, you have to deal with low level graphics operations so my advice is use LWJGL if you really need it. Unless you're already fomfortable with OpenGL.

For 3D game I have very few knowledges in this field but consider Xith3D on top of LWJGL. If not, there's JOGL, jME and others too.

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #11 - Posted 2005-02-26 12:22:16 »

Quote
See the SPGL sprite engine at http://www.sf.net/projects/spgl - poke around in com.shavenpuppy.jglib.sprites for a really nifty sprite engine which I've been reusing over and over again.

Sprites are located and rotated using fixed point maths btw, which might be a bit confusing.

Cas Smiley

Thanks Cas.

Where do I get the libs/jars and docs?

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #12 - Posted 2005-02-26 22:41:00 »

eeehh, er, there ain't no docs Wink But if you poke around in the sourcecode you should get a reasonable idea of how it works to hack your own version up. (Or figure out how it works and use it as it is Tongue)

Cas Smiley

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #13 - Posted 2005-03-14 20:02:36 »

Hi Cas,

I'm back to LWJGL/OpenGL. I'd like to get the sources of SPGL. Do you recommend me WinCVS for that or another CVS client? Maybe eclipse does the job correctly?

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #14 - Posted 2005-03-14 22:16:30 »

Eclipse does great.

Cas Smiley

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.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (25 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (13 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (44 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

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

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

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
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!