Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (773)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (856)
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  
  Ken - I saw your StarGauge speed problem.. I think  (Read 1184 times)
0 Members and 1 Guest are viewing this topic.
Offline Vorax

Senior Devvie


Projects: 1


System shutting down in 5..4..3...


« Posted 2005-05-23 05:24:19 »

Hi Ken,

I think I saw the problem you were having with StarGauge.  You said that it was running very fast - to fast to be able to hit the enemy.

I am working on implementing the GUI for the game, and while I was testing out changing the options, I tried turning on VSync (I always run with it off).  Everything seemed normal until the game started.   Everything was running at an incredible rate.  I was flying very fast and the enemy ships were buzzing around at incredible speeds.  My controls were also moving very fast.

Is that what you saw?

Everything in the game is controlled by the engine operation thread, which is capped (supposed to be) at 62fps.  It is based off of System.currentTimeMillis().  Something happened that messed with the time reporting from System.currentTimeMills()

I changed the options to run in 1600x1024, fullscreen when it happened.  The way my code works is that if VSync is on, wglSwapIntervalEXT() is never called.

Could this be a bug in Java?  A bug in JOGL?  A bug in my nVidia drivers (v71.84 - GeforceFX 5500)?

I had no errors on the console.  I have never seen it do this before, and I haven't been able to reproduce it. Sad

Offline Ken Russell

JGO Coder




Java games rock!


« Reply #1 - Posted 2005-05-23 13:24:25 »

No, I just found that in general the ships moved too quickly to respond to. I just tried your latest version and the FPS and engine FPS were locked at 100.0. I was able to get a couple of shots in on the enemy ships this time though didn't actually blow one up.

A couple of points: as of JOGL 1.1 b11 there is a new GL.setSwapInterval(int interval) call which provides portable VSync control. Also, you should either inform the user that you're writing files to the local disk, or use getClass().getClassLoader().getResourceAsStream() to open your music files at runtime directly from the Java Web Start jar cache.
Offline Vorax

Senior Devvie


Projects: 1


System shutting down in 5..4..3...


« Reply #2 - Posted 2005-05-23 14:51:06 »

Quote
No, I just found that in general the ships moved too quickly to respond to. I just tried your latest version and the FPS and engine FPS were locked at 100.0.


Hmm...ok, must have been an fluke then.  

Quote

I was able to get a couple of shots in on the enemy ships this time though didn't actually blow one up.


To blow one up, just unload some missles (right click) on your locked target, they are self guiding. Wink  The next version will allow you to adjust mouse sensitivity, which should solve it for you.

Quote

A couple of points: as of JOGL 1.1 b11 there is a new GL.setSwapInterval(int interval) call which provides portable VSync control. Also, you should either inform the user that you're writing files to the local disk, or use getClass().getClassLoader().getResourceAsStream() to open your music files at runtime directly from the Java Web Start jar cache.


Great, i'll switch to setSwapInterval().   What OpenGL version is that?  If it's not OpenGL but a Java workaround, does it fall back to wglSwapIntervalEXT() for windows?  Any dangers for multithreaded code?

I'll add a message about the file writing.  I won't be switching to getResourceAsStream() because I am using FMOD and it loads the sounds/music by file name.  I could switch to play from memory, but there is no point to the effort for me because the final version of the game isn't going to be launched by webstart, it will be installed via an installer.  I am also going to have to write several other things to the drive, such as the configuration (which it's now doing, but not released yet).

I am only using Webstart to make life easier for the testers on this board.

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

JGO Coder




Java games rock!


« Reply #3 - Posted 2005-05-23 15:56:00 »

Quote
Great, i'll switch to setSwapInterval().   What OpenGL version is that?  If it's not OpenGL but a Java workaround, does it fall back to wglSwapIntervalEXT() for windows?  Any dangers for multithreaded code?


Check the javadoc. Basically there are no guarantees about its effects; if the necessary OpenGL extension is present on the particular platform then it will take effect. You need to call the method from within your GLEventListener's callbacks, preferably init(), so any multithreading issues are handled internally by JOGL's existing mechanisms.
Pages: [1]
  ignore  |  Print  
 
 

 
EgonOlsen (1853 views)
2018-06-10 19:43:48

EgonOlsen (1882 views)
2018-06-10 19:43:44

EgonOlsen (1249 views)
2018-06-10 19:43:20

DesertCoockie (1682 views)
2018-05-13 18:23:11

nelsongames (1348 views)
2018-04-24 18:15:36

nelsongames (1966 views)
2018-04-24 18:14:32

ivj94 (2737 views)
2018-03-24 14:47:39

ivj94 (1940 views)
2018-03-24 14:46:31

ivj94 (3030 views)
2018-03-24 14:43:53

Solater (1081 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!