erikd
|
 |
«
Reply #30 - Posted
2003-02-05 16:56:07 » |
|
At least in this case it's probably our fault, and likely one that's to do with how you select a screen mode. What's your code to select a mode?
I certainly hope so.  Here's the code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| public static void main(String[] arguments) { GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); client = new HSClient(); contactServer = false; int err = 0; GameWindow game = new GameWindow(); try { game.start(640, 480, 16, true); } catch (Exception e) { err = 1; e.printStackTrace(); } System.out.println("Game Ended."); System.exit(err); } |
which calls the following, which is code from the BaseWindow class from the examples: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
| protected void createGLWindow(int width, int height, int bits, boolean fullscreenflag) throws Exception { fullscreen = fullscreenflag; try { int mode = -1; DisplayMode[] modes = Display.getAvailableDisplayModes(); for (int i = 0; i < modes.length; i ++) { if( modes[i].width == width && modes[i].height == height && modes[i].bpp >= bits) { mode = i; break; } } Display.create(modes[mode], fullscreenflag); gl = new GL(); gl.create(); glu = new GLU(gl); Keyboard.create(); Keyboard.enableBuffer(); Mouse.create(); resizeGLScene(Display.getWidth(), Display.getHeight()); initGL(); } catch (Exception e) { throw new Exception("Problem initialising ", e); } } protected void start(int width, int height, int bpp, boolean fullscreen) throws Exception { long frameTime = 0; timerRes = Sys.getTimerResolution(); if (timerRes == 0) { throw new Exception("There are no timers availible!"); } try { createGLWindow(width, height, bpp, fullscreen); do { frameTime = Sys.getTime(); Sys.setTime(0); } while (!loop((float)frameTime / (float)timerRes)); System.out.println("Loop ended."); killGLWindow(); } catch (Exception e) { throw new Exception("Problem starting loop", e); } } |
Why would this all of the sudden stop working on my desktop at work *and* at my co-worker's pc? It still worked yesterday on both... Like I said, it just quits. I return to desktop. The program doesn't even exit normally (no 'Game Ended.' in the log, no error, no nothing). The complete VM seems to just stop after having loaded all textures without an apparent reason. The only big thing I changed the hack that the AudioClips are not static anymore which prevents the hic-ups when shooting, but also causes the sample to be loaded for every instance of a PlayerFire object. (This was meant as a temporary hack until I successfully avoided using AudioClip). Greetings, Erik
|
|
|
|
erikd
|
 |
«
Reply #31 - Posted
2003-02-05 18:14:08 » |
|
In a desparate attempt to get it working again at a lot of pc's (like my own desktop at work), I undone the hack that fixed the stutters when shooting...
I can't test it here at home because here it always worked anyway...
Erik
|
|
|
|
princec
|
 |
«
Reply #32 - Posted
2003-02-05 19:42:25 » |
|
You aren't checking for available stencil, alpha, and depth bits I notice. Because we have no way of knowing reliably or easily what combinations of A/D/S there are with each display mode, we manufacture all the possible values and ask you to find one that works by attempting to change to each display mode you want in turn. In other words, you bail out as soon as you attempt to create the display because you've probably picked a duff combination of A/D/S which isn't available. Cas 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
erikd
|
 |
«
Reply #33 - Posted
2003-02-06 08:51:17 » |
|
Hmmm.... I just found what it is. At work when I start it outside web start, I get: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| An unexpected exception has been detected in native code outside the VM. Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x0 Function=[Unknown.] Library=(N/A)
NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions.
Current Java thread: at org.lwjgl.opengl.CoreGL.blendEquation(Native Method) at Actor.draw(Actor.java:283) at Universe.draw(Universe.java:107) at Universe.update(Universe.java:61) at GameWindow.drawGLScene(GameWindow.java:243) at BaseWindow.loop(BaseWindow.java:183) at BaseWindow.start(BaseWindow.java:170) at GameWindow.main(GameWindow.java:424) |
So for now I removed the gl.blendEquation() from my Actor class and now it works again. I guess something (maybe the video driver) doesn't like gl.blendEquation()... Also strange that in web start this error is not logged... I'll upload the change tonight when I get home.
|
|
|
|
princec
|
 |
«
Reply #34 - Posted
2003-02-06 12:33:07 » |
|
Agh! You're the second person that hasn't read the manual about glBlendEquation! glBlendEquation is part of the imaging subset in OpenGL and it's an optional extension. You have to check for the existence of ARB_imaging before using it. And seeing as it's for doing 2D operations on pictures I think it's very unlikely that you should be using it in the first place!! Cas 
|
|
|
|
princec
|
 |
«
Reply #35 - Posted
2003-02-06 12:34:59 » |
|
And on a related note, I think we should catch people doing this in the debug build and throw an OpenGLException instead of crashing the VM  Pretty simple to do in a macro. Cas 
|
|
|
|
Matzon
|
 |
«
Reply #36 - Posted
2003-02-06 13:14:54 » |
|
problem is that 99% of all lwjgl users (and programmers) have a bad habit of using the release build dll
|
|
|
|
princec
|
 |
«
Reply #37 - Posted
2003-02-06 14:48:46 » |
|
Welcome to the real world of internet games deployment! I should think there's call for an article on how to deploy a game. It's probably more important than all the other aspects of the game put together. I mean, you can get a suprising number of mingers to pay for 3D solitaire but I bet that no-one will pay up if it doesn't install and run. Cas 
|
|
|
|
erikd
|
 |
«
Reply #38 - Posted
2003-02-28 08:12:37 » |
|
|
|
|
|
princec
|
 |
«
Reply #39 - Posted
2003-02-28 12:19:08 » |
|
Bah! I always get really annoyed when someone spends, like, 2 weeks on a game and it looks as good as the one I've just spent 3 months on! Cas 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
erikd
|
 |
«
Reply #40 - Posted
2003-02-28 13:29:27 » |
|
 Just get some comfort out of the fact that I'm building on your work  And of course I haven't spent time on my own picture formats etc and simply stay braindead and use the java API's for PNG and JPEG.
|
|
|
|
alexz
Senior Newbie 
Java games rock!
|
 |
«
Reply #41 - Posted
2003-02-28 18:07:26 » |
|
It doesn't matter what the picture format is... It's like a music: where's a hook? Good job, erikd! 
|
|
|
|
|
Virum
Junior Member  
Like a leaf in an icy world, memories will fade
|
 |
«
Reply #42 - Posted
2003-03-01 20:23:11 » |
|
Cool game, but how come the angle is still from the back, and I don't have that startup screen?
|
It's time to prove to your friends that your worth a damn. Sometimes that means dying; sometimes that means killing a whole lotta people. Blog
|
|
|
erikd
|
 |
«
Reply #43 - Posted
2003-03-02 09:05:56 » |
|
It's because the new version is not online yet. 
|
|
|
|
Virum
Junior Member  
Like a leaf in an icy world, memories will fade
|
 |
«
Reply #44 - Posted
2003-03-02 23:10:38 » |
|
Well hurry up!!!! I wanna play. 
|
It's time to prove to your friends that your worth a damn. Sometimes that means dying; sometimes that means killing a whole lotta people. Blog
|
|
|
cfmdobbie
|
 |
«
Reply #45 - Posted
2003-03-02 23:54:46 » |
|
Seconded! Looking good...
|
Hellomynameis Charlie Dobbie.
|
|
|
erikd
|
 |
«
Reply #46 - Posted
2003-03-10 07:03:34 » |
|
Hi there, I put a new WIP version online for you to try out  (hoping for some feedback again). I changed some things in the video init code so that the highest available bit depth is chosen. This works great at my home PC where 32bit is chosen (really looks a lot better than 16bit), but at my work PC performance became very bad but this is probably also because it's not a good 3d card (an intel-something), there's a lot more polygons now and it probably also chose 24 bit which I think is quite slow. The high score server is not yet online, so you'll get a high score list full of 'null' entries. This will change soon. It's currently just 3 levels, one in a city, one errrr... 'somewhere else', and one 'getting out of the fog'. Same show: get 10 stars and get to the next level in time. Personally I'm getting a bit sick of the tunnel thing (probably have seen it a bit too much  ) and I think I'll move gameplay out of the tunnel after these 3 levels. Critique please  Greetings, Erik
|
|
|
|
oNyx
|
 |
«
Reply #47 - Posted
2003-03-10 22:09:22 » |
|
mh... i dont like webstart :> had to clear it's cache to get the latest version (that's one of the things wich it should do automatically) :] looks nicer now  but it doesnt run in fullscreen anymore... just a maximized window on top of the desktop (i had to minimize all other windows... dunno... but thats really strange) just on thingy... plz add an option for turning of the smoke it stresses my eyes way too much :> specs: win98se/gf2mx/128mb/latest vm
|
|
|
|
erikd
|
 |
«
Reply #48 - Posted
2003-03-11 05:13:04 » |
|
mh... i dont like webstart :> had to clear it's cache to get the latest version (that's one of the things wich it should do automatically) :]
Well I do like webstart, but sometimes you have to start a program twice before it checks for updates (although I never had to clear the cache). That's definately a bug in webstart, but I couldn't isolate it yet (most of the time it works like it is supposed to do). but it doesnt run in fullscreen anymore... just a maximized window on top of the desktop (i had to minimize all other windows... dunno... but thats really strange) That's a problem in lwjgl that's said to be fixed in 0.5. This happens sometimes, but not always. I have it too sometimes. The smoke will stay in there  BTW what kind of FPS were you getting? (its on the bottom right) Thanks  Erik
|
|
|
|
zparticle
|
 |
«
Reply #49 - Posted
2003-03-11 13:16:48 » |
|
This is my crappy work machine:
PIII-930mhz 512 megs ram Win2K Service Pack 2 NIVIDIA RIVA TNT2 Model 64 - 32 megs ram
FPS 8-9
This seems bad but the interesting thing is this: I can tell, visually, the FPS is slow but the game still feel fairly smooth. Is this because of the 3D environment? I mean with 2D games 8-9 FPS would absolutely be horrid.
|
|
|
|
erikd
|
 |
«
Reply #50 - Posted
2003-03-11 16:30:43 » |
|
Hmmm... 8-9 fps should be too chunky, even though movement is time scaled and all is 3d. :-/ It seems the videocard is the bottleneck (or how I use ogl or something  ). My PC at home is a lot slower than yours (P2/450, 128Mb) but has a GF4 and I get fps varying from 60-70 fps in level 1 to 110-130fps in level 3.
|
|
|
|
oNyx
|
 |
«
Reply #51 - Posted
2003-03-11 16:52:54 » |
|
>The smoke will stay in there  too bad :] >BTW what kind of FPS were you getting? whops... sry forgot that  33-35 fps with this version 60-66fps with the first 3d version (that one hadnt buildings and ran in real fullscreen)
|
|
|
|
erikd
|
 |
«
Reply #52 - Posted
2003-03-11 17:12:14 » |
|
too bad :] What's the matter, you don't like purple haze?  I still think 30fps is way too low. I'm probably doing something a bit inefficient, 'ogl wise' (most of the time is spent in ogl by far). The environment mapped blended globes with the stars in them do have a fairly large poly count (they do appear pretty rounded, don't they?  ), so maybe I can cut that down a bit. Other than that I'm not sure what I'm doing wrong. It's all pretty straightforward.
|
|
|
|
erikd
|
 |
«
Reply #53 - Posted
2003-03-11 17:14:54 » |
|
Oh BTW, the previous version ran 'as fullscreen' as this one. Chances are if you run the game again, you won't have to click away the windows that are in front of the gl screen.
Greetings, Erik
|
|
|
|
erikd
|
 |
«
Reply #54 - Posted
2003-03-13 06:30:45 » |
|
I put a new version online. Here's the differences: - I excluded 24 bit bpp (so it's only 16bit or 32bit when available) - halved the number of polygons in the 'star globes' - The high score server is online! (So I want to see some familiar names in there  ) Greetings, Erik
|
|
|
|
Andrew
Senior Newbie 
Java games rock!
|
 |
«
Reply #55 - Posted
2003-03-13 10:00:44 » |
|
It looks lovely but runs a bit slow, although I'm happy with anything that works on my old machine - Celeron 433, 256Mb, Intel 810 graphics, Win98.
I only get about 12 fps, which I think is about half of what I had with the original version. It must be all the buildings it has now - any chance of being able to turn some off?
Perhaps it's the framerate, but I am really bad at it:(
|
|
|
|
|
erikd
|
 |
«
Reply #56 - Posted
2003-03-13 12:56:12 » |
|
Shoot, the hiscore server crapped out on me while I really tested it a lot on my local server.  After a few hours, the XML document which holds the high scores got emptied!  No idea how this can happen. I logged every exception on the server, but no errors are shown in the log. Anyway, the high score list is reset 
|
|
|
|
erikd
|
 |
«
Reply #57 - Posted
2003-03-14 08:05:32 » |
|
I put some retry mechanisms in the high score server, so hopefully it will be a bit more reliable now.
So c'mon, it's lonely in the high score list!
|
|
|
|
|
|
Virum
Junior Member  
Like a leaf in an icy world, memories will fade
|
 |
«
Reply #59 - Posted
2003-03-17 13:42:39 » |
|
How come I can't make it to the next level?  It just starts the game over when the distance hits 0
|
It's time to prove to your friends that your worth a damn. Sometimes that means dying; sometimes that means killing a whole lotta people. Blog
|
|
|
|