Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  GF2 Speed  (Read 1960 times)
0 Members and 2 Guests are viewing this topic.
Offline troggan

Full Member
**

Posts: 113


no guts no glory


« on: 2003-08-02 10:51:09 »

Hi !

I have a little perfomance problem with my App. It tries
to paint 500 Sprites with the help of jogl. The Problem is the FPS. It get's only 70-80 FPS on my GF2. I asked kevglass to check it, on his 9000 mobilit he gets 250. What's wrong? And yes, i switched off vsync and i reinstalled the nvidia driver.

Could someone test this :

http://www.informatik.uni-oldenburg.de/~troggan/bodo/JOGLTest.zip

Huh

(http://www.wannawork.de) - Will work for food
(http://tvbrowser.org) - Java EPG
Offline kevglass
« League of Dukes »

JGO Kernel
*****

Posts: 5214
Medals: 49


Mentally unstable, best avoided.


« Reply #1 on: 2003-08-02 11:20:56 »

I did forget to ask actually, is it by chance a GF2 MX ?

Kev

Offline troggan

Full Member
**

Posts: 113


no guts no glory


« Reply #2 on: 2003-08-02 12:24:11 »

It's an NForce chipset. I checked and it's a GF2 MX.
Is that the reason for the speed of the game?

(http://www.wannawork.de) - Will work for food
(http://tvbrowser.org) - Java EPG
Games published by our own members! Go get 'em!
Offline gregorypierce

JGO Strike Force
***

Posts: 905


I come upon thee like the blue screen of death....


« Reply #3 on: 2003-08-02 12:28:07 »

GF2 MX is very old school, but if you're just drawing sprites I don't see why it would be that slow. I should be back in action after this weekend as the OSX port is wrapping up.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline troggan

Full Member
**

Posts: 113


no guts no glory


« Reply #4 on: 2003-08-03 06:02:43 »

thanks in advance for looking at the source. i hope you will find a way to speed it up a little bit. i don't want to buy a new card to be able to code that game   :-/

(http://www.wannawork.de) - Will work for food
(http://tvbrowser.org) - Java EPG
Offline troggan

Full Member
**

Posts: 113


no guts no glory


« Reply #5 on: 2003-08-08 00:49:06 »

Could anybody PLEASE look at the code Huh I tried a lot of stuff the past few days, but I can't get it faster. Sometimes the Java2d-Stuff is faster than the JOGL-Version on my PC (Geforce 2MX). Is THAT normal ?


(http://www.wannawork.de) - Will work for food
(http://tvbrowser.org) - Java EPG
Offline kevglass
« League of Dukes »

JGO Kernel
*****

Posts: 5214
Medals: 49


Mentally unstable, best avoided.


« Reply #6 on: 2003-08-08 00:59:02 »

When you say its a GF2 MX above, you also say its an NForce chipset. From what I understand (lets face it, not much), NForce is a motherboard chipset. Are you refering to an "onboard" graphics processor that is GF2?

If so, I suspect you're performance would be pretty dire.

Incidently, I looked at your code before, it all looked fine. I also ran it on my 9000 Mobility, and got decent frame rates, so I'm guessing its your hardware...  (possibly a driver update?)

Kev

Offline troggan

Full Member
**

Posts: 113


no guts no glory


« Reply #7 on: 2003-08-08 01:04:16 »

I tried it with my Onboard GF2 and with an normal GF2. Both had the same speed Sad

(http://www.wannawork.de) - Will work for food
(http://tvbrowser.org) - Java EPG
Offline aldacron

Full Member
**

Posts: 200


Java games rock!


« Reply #8 on: 2003-08-08 01:16:55 »

Just out of curiosity, how is 70-80 fps bad? I mean, it's not jerky, right?  
Offline kevglass
« League of Dukes »

JGO Kernel
*****

Posts: 5214
Medals: 49


Mentally unstable, best avoided.


« Reply #9 on: 2003-08-08 01:28:52 »

Sure, but its not doing anything much yet, its about what happens when it all scales up..

Kev

Games published by our own members! Go get 'em!
Offline cfmdobbie

JGO Wizard
****

Posts: 1257


Who, me?


« Reply #10 on: 2003-08-11 07:35:26 »

Hrm.  Are you sure VSync isn't messing you around?  Cut the number of sprites down to 10 or so and run again - if you still get the same frame rate with significantly fewer sprites, you may have a VSync problem.

A GeForce2 MX should be able to push out a lot more sprites than 500 - if done correctly!  Comments:

Unnecessary loadIdentity() call per sprite: You do a loadIdentity()/translatef() for every sprite rendered.  Try using pushMatrix()/popMatrix() instead.  Even better, don't do the translate but render the sprite at the correct x,y coordinates straight off.

Unnecessary texture changes: You rebind the OpenGL texture object for every sprite rendered.  Try sorting the sprites into "same texture" groups and bind the texture only once for each group.  At the very least just track the last texture you rendered and don't bind the new one if it's the same as the old. (Sample code only uses one texture.)

Float vertices: You're casting all your vertices from ints to floats - why not keep them as ints and use the vertex2i() call?  Let the OpenGL driver decide what's fastest. (Very minor issue.)

Hellomynameis Charlie Dobbie.
Offline Preston

Sr. Member
**

Posts: 346
Medals: 2



« Reply #11 on: 2003-08-11 09:26:34 »

The value "80-90" fps I also get with my own small Jogl application, no matter how many polygons I draw. When there are very many the FPS number drops to lower values which is reasonable, but I also "just" geht 80-90 fps if there's only one polygon. Looks like there's some internal barrier with my used TimerTasks. Or something else. :)

Memento mori.
Offline troggan

Full Member
**

Posts: 113


no guts no glory


« Reply #12 on: 2003-08-11 11:39:15 »

Thanks for the help !

Yes, I switched off VSync. If I only Draw 1 Sprite, it goes up to 250 (but thats very slow, too Sad ).

I have added all your changes to my code, but I have received only 5 Fps more Sad. Do you have an Example on how   to do this the right way? And are you sure that a GF2 MX should be faster than this??

troggan

Btw: Bought a new Card, runs like hell on it Wink

(http://www.wannawork.de) - Will work for food
(http://tvbrowser.org) - Java EPG
Offline tortoise

Full Member
**

Posts: 230


<3 Shmups


« Reply #13 on: 2003-08-11 11:56:04 »

How do you turn off vsync anyway? My driver (nvidia's latest  tnt2 driver for an ancient diamond viper 32mb) offers me the ability to turn off vsync in the control panel, but it never actually occurs in my app. I always run at exactly my refresh rate.
Offline troggan

Full Member
**

Posts: 113


no guts no glory


« Reply #14 on: 2003-08-11 13:19:31 »

I switch it off in the Control Panel. Don't know why it doesn't switch it off in your case, but the 250fps proves, that it works for me Wink

troggan

(http://www.wannawork.de) - Will work for food
(http://tvbrowser.org) - Java EPG
Offline blahblahblahh

JGO Kernel
*****

Posts: 4575


http://t-machine.org


« Reply #15 on: 2003-08-11 14:30:47 »

Quote
When you say its a GF2 MX above, you also say its an NForce chipset. From what I understand (lets face it, not much), NForce is a motherboard chipset. Are you refering to an "onboard" graphics processor that is GF2?


The beauty of the NForce chipset was that - coming from nVidia - it was the first widely-available chipset with onboard video to actually have really GOOD onboard video (for the time, GF2MX was pretty good, although of course no vertex-shaders etc Sad ).

IIRC from reviews at the time there was negligible performance loss compared to an AGP GF2MX (although I may be completely wrong here Smiley).

The nForce2 was a GF4MX, so nVidia are keeping a fairly consistent approach of stuffing their "budget-card-of-the-season" into a chipset. Blurb from NV:

"Introducing the NVIDIA nForce2 Ultra 400 and NVIDIA nForce2 400
The NVIDIA nForce2 Ultra 400 incorporates dual 400MHz DDR controllers, delivering twice the bandwidth of typical DDR chipsets, an optimized 128-bit architecture, and 400MHz frontside bus (FSB) support for unparalleled performance. The NVIDIA nForce2 400 relies on a single 64-bit memory channel to deliver 400 MHz FSB and 400MHz DDR performance to the mainstream."

malloc will be first against the wall when the revolution comes...
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.107 seconds with 20 queries.