Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (408)
games submitted by our members
Games in WIP (293)
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 2732 times)
0 Members and 1 Guest are viewing this topic.
Offline TheAnalogKid
« League of Dukes »

JGO Coder


Projects: 3



« 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!
Play the free demo of Revenge of the Titans!
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
« League of Dukes »

JGO Kernel


Medals: 54
Projects: 20


Mentally unstable, best avoided.


« 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
« League of Dukes »

JGO Coder


Projects: 3



« 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
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


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!
Try the Free Demo of Titan Attacks
Offline TheAnalogKid
« League of Dukes »

JGO Coder


Projects: 3



« 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
« League of Dukes »

JGO Coder


Projects: 3



« 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
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


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
« League of Dukes »

JGO Coder


Projects: 3



« 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
« League of Dukes »

JGO Kernel


Medals: 196
Projects: 3


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.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars and Titan!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (111 views)
2013-05-17 21:29:12

alaslipknot (120 views)
2013-05-16 21:24:48

gouessej (149 views)
2013-05-16 00:53:38

gouessej (143 views)
2013-05-16 00:17:58

theagentd (156 views)
2013-05-15 15:01:13

theagentd (140 views)
2013-05-15 15:00:54

StreetDoggy (184 views)
2013-05-14 15:56:26

kutucuk (208 views)
2013-05-12 17:10:36

kutucuk (208 views)
2013-05-12 15:36:09

UnluckyDevil (213 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.16 seconds with 26 queries.