Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (113)
games submitted by our members
Games in WIP (562)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3
  ignore  |  Print  
  Would like some feedback again  (Read 10699 times)
0 Members and 1 Guest are viewing this topic.
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #30 - Posted 2003-02-05 15:56:07 »

Quote

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.  Roll Eyes
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();          
          //NameDialog dialog = new NameDialog(env);
         //while (name == null || name.length()==0) name = dialog.name;
         //dialog = null;
     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();
            //Mouse.enableBuffer();
           
            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 {
                /* The frameTime is how much time it takes to draw a single frame.
                 * We use this so we can animate things in real time.
                 *
                 * Say you want to move an object 100 pixels every second and it
                 * takes 0.10 seconds to draw a frame. Pixels per second
                 * multiplied by the frame time equals the amount of pixels to move
                 * per frame. or 100 * 0.10 = 10; */

                frameTime = Sys.getTime();
                /* Reset the counter, so we can find out how long it takes to draw a
                 * frame */

                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

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #31 - Posted 2003-02-05 17: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

Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #32 - Posted 2003-02-05 18: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 Smiley

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

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #33 - Posted 2003-02-06 07: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.

Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #34 - Posted 2003-02-06 11: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 Smiley

Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #35 - Posted 2003-02-06 11: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 Wink Pretty simple to do in a macro.

Cas Smiley

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #36 - Posted 2003-02-06 12:14:54 »

problem is that 99% of all lwjgl users (and programmers) have a bad habit of using the release build dll

Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #37 - Posted 2003-02-06 13: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 Smiley

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #38 - Posted 2003-02-28 07:12:37 »

some WIP screenshots  Cool





Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #39 - Posted 2003-02-28 11: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 Cheesy

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

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #40 - Posted 2003-02-28 12:29:27 »

Cool

Just get some comfort out of the fact that I'm building on your work Smiley

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.

Offline alexz

Senior Newbie




Java games rock!


« Reply #41 - Posted 2003-02-28 17:07:26 »

It doesn't matter what the picture format is... It's like a music: where's a hook?

Good job, erikd!  Cool
Offline Virum

Junior Member




Like a leaf in an icy world, memories will fade


« Reply #42 - Posted 2003-03-01 19: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
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #43 - Posted 2003-03-02 08:05:56 »

It's because the new version is not online yet.  Smiley

Offline Virum

Junior Member




Like a leaf in an icy world, memories will fade


« Reply #44 - Posted 2003-03-02 22:10:38 »

Well hurry up!!!!  I wanna play.  Smiley

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
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #45 - Posted 2003-03-02 22:54:46 »

Seconded!  Looking good...

Hellomynameis Charlie Dobbie.
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #46 - Posted 2003-03-10 06:03:34 »

Hi there,

I put a new WIP version online for you to try out  Cool (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  Roll Eyes) and I think I'll move gameplay out of the tunnel after these 3 levels.

Critique please  Smiley


Greetings,
Erik

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #47 - Posted 2003-03-10 21: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 Smiley

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

弾幕 ☆ @mahonnaiseblog
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #48 - Posted 2003-03-11 04:13:04 »

Quote
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).


Quote
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  Tongue

BTW what kind of FPS were you getting? (its on the bottom right)

Thanks  Smiley
Erik

Offline zparticle

Senior Member




Thick As A Brick


« Reply #49 - Posted 2003-03-11 12: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.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #50 - Posted 2003-03-11 15: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  Tongue). 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.

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #51 - Posted 2003-03-11 15:52:54 »

>The smoke will stay in there  Tongue

too bad :]

>BTW what kind of FPS were you getting?

whops... sry forgot that Smiley

33-35 fps with this version

60-66fps with the first 3d version (that one hadnt buildings and ran in real fullscreen)

弾幕 ☆ @mahonnaiseblog
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #52 - Posted 2003-03-11 16:12:14 »

Quote
too bad :]


What's the matter, you don't like purple haze?  Grin

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?  Smiley), 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.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #53 - Posted 2003-03-11 16: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

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #54 - Posted 2003-03-13 05: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  Smiley)

Greetings,
Erik

Offline Andrew

Senior Newbie




Java games rock!


« Reply #55 - Posted 2003-03-13 09: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:(
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #56 - Posted 2003-03-13 11:56:12 »

Shoot, the hiscore server crapped out on me while I really tested it a lot on my local server.  Angry Angry Angry
After a few hours, the XML document which holds the high scores got emptied!  Huh
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  Embarrassed

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #57 - Posted 2003-03-14 07: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!

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #58 - Posted 2003-03-14 08:48:34 »

I put up a little webpage for Cosmic Trip at http://www.mycgiserver.com/~movegaga/.
The high scores are visible at http://www.mycgiserver.com/~movegaga/hiscores.html (assuming you run IE 5 or higher with jscript enabled, if not, see the raw xml at http://www.mycgiserver.com/~movegaga/CosmicTripScores.xml)

Offline Virum

Junior Member




Like a leaf in an icy world, memories will fade


« Reply #59 - Posted 2003-03-17 12:42:39 »

How come I can't make it to the next level?Huh


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
Pages: 1 [2] 3
  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.

Dwinin (15 views)
2014-09-12 09:08:26

Norakomi (45 views)
2014-09-10 13:57:51

TehJavaDev (57 views)
2014-09-10 06:39:09

Tekkerue (26 views)
2014-09-09 02:24:56

mitcheeb (49 views)
2014-09-08 06:06:29

BurntPizza (33 views)
2014-09-07 01:13:42

Longarmx (19 views)
2014-09-07 01:12:14

Longarmx (21 views)
2014-09-07 01:11:22

Longarmx (20 views)
2014-09-07 01:10:19

mitcheeb (30 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

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

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

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!