Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (492)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3
1  Java Game APIs & Engines / OpenGL Development / Re: Mouse Grabbing on: 2005-09-14 13:09:06
Ha ha. I'm sure pro's have the same stupid mistakes every once in a while. Sometimes I find the best solution is just to rewrite everything.

I’d like to think they don’t make cock ups on the scale that I’m capable of Cheesy

In my defense (well sort of) I’ve still never gotten out of the habit of writing messy code. My objects and stuff are pretty tidy but in almost everything I’ve ever wrote the main program has always been a shoddy mess with bits all other the place. I blame eclipse, it does so much for me that I’ve become more lazy than I could possibly imagine Smiley
2  Java Game APIs & Engines / OpenGL Development / Re: Mouse Grabbing on: 2005-09-13 15:08:47
As far as I can tell you simply need to set that boolean. I've never had any trouble getting it to turn visible when I want it to. Perhaps you are changing something else?

Not changing  anything else, I’ve double checked.

[edit] ok checked it again and found out what I was doing wrong. Alls I’ll say is, thank gawd I don’t program professionally.

Think I’ll delete this thread later if its possible Cheesy

Cheers all  Smiley

3  Java Game APIs & Engines / OpenGL Development / Re: Mouse Grabbing on: 2005-09-09 18:01:39
Ok, I tidied up my mouse calls today and I'm still loosing my cursor after I setGrabbed(false).

What I’m trying to do is grab the mouse so I can use the deltas to move a little picking box around the glscene, then ungrab the mouse so I can use the normal cursor to interact with the giu (a bit hacky I know, but it saves mucking about with ray picking).

My mouse object initially sets Mouse.setGrabbed(true) and I can then later press space to setGrabbed(false), but when I do this the cursor doen’t appear on the screen.

Is there anything else I need to do to make the cursor reappear?

[edit] Meant to mention before, if I start my app with the mouse un-grabbed and then later set it to grabbed the cursor still remains on screen, is this supposed to happen?

Cheers.
4  Java Game APIs & Engines / OpenGL Development / Re: Mouse Grabbing on: 2005-09-07 18:26:20
Oh Dear, just been looking at my mouse code (which was quick and dirty temp stuff I done a while ago) and there appears to be huge amounts of funkyness going on all over the place. Some bits of code are calling myMouseObject and other bits are calling the default Mouse, long story. I think that's where the problem is.

I'll rewrite it over the weekend and that should hopefully sort it out.

Cheers DP, and sorry for wasting your time. Feel free to issue a slap.
5  Java Game APIs & Engines / OpenGL Development / Mouse Grabbing on: 2005-09-07 17:00:09
Probably a stupid question but, is it possible to use the mouse in both the grabbed and un-grabbed state in a single session?

It helps a great deal if I can use the mouse deltas to move and position stuff in my glwindow, but obviously this renders the swing gui useless. If I set a key to grab and un-grab the mouse it becomes unreadable.

Anyone know if there is a workaround for this?

Cheers.
6  Java Game APIs & Engines / OpenGL Development / Re: Quick AWTTest related question on: 2005-09-01 12:19:55
Excellent. Thanks Alan, I should be able to get on with it now.

Cheers.
7  Java Game APIs & Engines / OpenGL Development / Re: Quick AWTTest related question on: 2005-08-31 20:19:07
The inevitable second question Cheesy

I found some old swing code I'd done and added a AWTGLCanvas to it but the canvas appears to be drawing over the contents of my JMenuBar, making it unreadable, anyone know what I’m doing wrong?

Thanks again.
8  Java Game APIs & Engines / OpenGL Development / Re: Quick AWTTest related question on: 2005-08-31 17:48:19
Cheers Cas, been a long time since I’ve played with AWT and stuff but BorderLayout rings a few bells.

Thanks.
9  Java Game APIs & Engines / OpenGL Development / Quick AWTTest related question on: 2005-08-31 17:02:11
Just been looking a the AWTTest.java that comes bundled with the source as I'm tempted to port over my game editor to it, at the moment its all in standard opengl and I'm running out of keyboard shortcuts Cheesy

I have very little experience using AWT but in the AWTTest demo isn’t the GLcanvas supposed to resize when I drag/maximise the window?

If not how do I get the GLcanvas to stay the same size as the window?

Thanks.
10  Java Game APIs & Engines / OpenGL Development / Re: Convolutions on: 2005-07-21 19:07:42
Excellent, that’ll give me something to play about with tomorrow. Must remember to check the ARB extensions before posting, its not the first time.

Cheers Spasi
11  Java Game APIs & Engines / OpenGL Development / Convolutions on: 2005-07-21 18:30:04
Browsing through the red book today and came upon the section on convolution filters and though I'd have a little play around with them, however I can't seem to find them in LWJGL. Have these been left out of LWJGL or are my searching skills just as poor as my programming?

Cheers
12  Java Game APIs & Engines / OpenGL Development / Re: strange crash on: 2005-04-01 08:28:17
Quote

Is this with ANY OpenAL app AND with a LWJGL app ?


Sorry, I should have checked more before posting, just updated my sound drivers and that seems to have fixed it.
13  Java Game APIs & Engines / OpenGL Development / Re: strange crash on: 2005-03-31 15:43:28
I've just been playing about with openal for the first time and it seems to be working ok, besides one huge conflict problem. If I'm using openal and I've got Reason (music app) open I get a blue screen of death with this message:

DRIVER_IRQL_NOT_LESS_OR_EQUAL
Blah, blah, please reset your computer...

That's on winxp with a creative Audigy card.

Not nice, but it could be a problem with Reason and I've learnt to close Reason if I'm using openal on the pc. I get the same problem if I try the superdudster demo when Reason is open. I haven't tried it on the mac yet but I'll give it a go tomorrow. Also, noticed the sound in superdudster gets very crackly when lots of bat guys are exploding, I can't remember thisbeing a problem in the older versions I tried.
14  Java Game APIs & Engines / OpenGL Development / Re: Dot3 Bump Mapping (little) problem on: 2004-09-28 16:02:07
Has anyone converted this tutorial to LWJGL yet ?
http://nehe.gamedev.net/data/articles/article.asp?article=20

If not I've got it working so if anyone wants just pop me a message, only got it working on a quad though, cant get it working an a mesh.

Might be of use to someone, never know.
15  Java Game APIs & Engines / OpenGL Development / Re: Dot3 Bump Mapping (little) problem on: 2004-09-20 18:18:20
I've been playing around with multitexturing recently and I thought I'd try out the example above, doesn't seem to work right for me. Is there anything else that has to be added to the above code to get bump mapping working as the code above just adds highlights to the texture, rather than a light reactive bump map?

Also, I've been browsing the net looking for none shader bump mapping techniques and a common one I've found is this : http://www.paulsprojects.net/tutorials/simplebump/simplebump.html, (nehe#20 links to this tut) Its uses a normalized cube map to calculate the, err, magic:)

However I'm having trouble converting this bit of C code to java.
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  
      GL11.glGenTextures(textureId);
      glBindTexture(GL_TEXTURE_CUBE_MAP, texid);

      unsigned char* data = new unsigned char[size*size*3];

      float offset = 0.5f;
      float halfSize = size * 0.5f;
      float[] temp = {0f, 0f, 0f};
      int bytePtr = 0;

      for(int j=0; j<size; j++)
      {
            for(int i=0; i<size; i++)
            {
                  temp[0] = halfSize;
                  temp[1] = (j+offset-halfSize);
                  temp[2] = -(i+offset-halfSize);
                  scale_to_01(temp);//i think this method multiplies the vector by 0.5 than adds 0.5 to it.

                  data[bytePtr] = (unsigned char)(temp[0] * 255.0f);
                  data[bytePtr+1] = (unsigned char)(temp[1] * 255.0f);
                  data[bytePtr+2] = (unsigned char)(temp[2] * 255.0f);

                  bytePtr+=3;
            }
      }
      glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X,
                  0, GL_RGB8, size, size, 0, GL_RGB, GL_UNSIGNED_BYTE, data);


The part I'm having trouble with is the unsigned char parts, I guess this needs to be a byteBuffer but (being rubbish with byteBuffers) I have no idea how to get this bit of code working with them. Can someone point me in the right direction?

Also are there other more straight forward ways for creating the bump mapping effect, preferably with openGL doing all the work Smiley

Cheers all


[edit], I think I've sorted it out, wont be able to test it tomorrow though.
16  Java Game APIs & Engines / OpenGL Development / Re: sync and sync2 on: 2004-09-11 10:32:49
I tried sync2(61) and its still causing the graphics to twitch every few seconds.

I take a look at your test app later, I'll need up update it for the latest lwjgl before it'll compile.

Cheers onyx.
17  Java Game APIs & Engines / OpenGL Development / sync and sync2 on: 2004-09-10 17:09:39
Hands up who could see this coming Smiley

After being advised to use the sync and sync2 methods rather than rely on vsync, I thought I'd try and test them out. Not sure if I'm doing this right but here's how I'm using the method, using the mainloop from FullScreenWindowedTest as an example.

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  
       private void mainLoop()
      {
            while (!Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) && !Display.isCloseRequested())
            {
                  if (Display.isVisible())
                  {
                        // check keyboard input
                       processKeyboard();
                        // do "game" logic, and render it
                       logic();
                        render();
                  }
                  else
                  {
                        // no need to render/paint if nothing has changed (ie. window
                       // dragged over)
                       if (Display.isDirty())
                        {
                              render();
                        }
                        // don't waste cpu time, sleep more
                       try
                        {
                              Thread.sleep(100);
                        }
                        catch (InterruptedException inte)
                        {
                        }
                  }
                  // Update window
                 Display.sync(60);
                  Display.update();
            }
      }



As I said I'm not sure if this is the right way to use the method, but doing it this way the updates are not very reliable, the screen seems to skip every few seconds as if it's catching up with the updates, if that makes any sense.

So what I'm I doing wrong here?

cheers

Btw, the display mode is set to 60htz.
18  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 0.92 released! on: 2004-09-10 16:20:46
Oh, the *other* Display class, sorry, I deserve a slap for not seeing that.

Cheers cfmdobbie
19  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 0.92 released! on: 2004-09-10 13:43:52
/waves hand jedi like:

What and where are these sync and sync2 methods of which you speak.

Are these part of lwjgl or are they just some tried and tested timing methods, can't seem to find any info on them. I've always relied on vsync but going by the advice on here its time to look into something more reliable I guess.

Cheers
20  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 0.92 released! on: 2004-09-10 11:02:41
Cheers onyx, I'll look in to it when the time comes.

Noticed there's a timer class in LWJGL now, haven't got a clue how to use it or even what it's for, but I should be ok using vsync for development purposes anyway.


21  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 0.92 released! on: 2004-09-09 16:45:33
Oops, no its still there Smiley

I was looking through good'ole FullScreenWindowedTest.java, only just noticed that Display.setVSyncEnabled(true) has now been placed into glInit().

Slightly off topic. What's the score with TFT monitors and VSync, do they always sync at 60htz, or should I look to using a proper timer for a game release?
22  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 0.92 released! on: 2004-09-09 15:04:48
Works ok here, but what happened to vsync?
23  Java Game APIs & Engines / OpenGL Development / Re: Does my game work on your machines? on: 2004-08-27 13:19:19
No problems here, XP Pro, firefox, 6800 GT and 1.4.2_01.
24  Java Game APIs & Engines / OpenGL Development / Re: Keyboard Focus and Webstart on: 2004-08-21 08:05:06
I had a problem with this with one of my own webstarts, it was caused by webstart popping up a dialog box asking if I would like the app integrated into my desktop, unfortunately webstart decides to ask this question after the app has run, so that's why you have to alt-tab to gain focus away from the dialog box.

It's easily turned off.

Might be something else but it sounds very similar.
25  Java Game APIs & Engines / OpenGL Development / Re: LWJGL on Mac OS X (Donation Drive) on: 2004-08-19 17:42:11
Cool, as long as they get the donation.

Cheers Middy
26  Java Game APIs & Engines / OpenGL Development / Re: LWJGL on Mac OS X (Donation Drive) on: 2004-08-19 17:03:08
So I have to join sourceforge before I can make a donation then?

Are you sure this isn't a sourceforge recruitment scam Cheesy

I'll look try and sort something out tomorrow.

Cheers
27  Java Game APIs & Engines / OpenGL Development / Re: LWJGL on Mac OS X (Donation Drive) on: 2004-08-19 14:39:11
Just to clarify, if I use this link ( http://sourceforge.net/donate/index.php?group_id=58488 ) can I be sure my donation will go to lwjgl?

I'm not a member of sourceforge so will the fact I'm not logging in make any difference?

I'm haven't got a paypal account either and have no idea how to use it, but if it's straight forward and requires no registration I'll use that option instead.  

Cheers.
28  Java Game APIs & Engines / OpenGL Development / Re: The JWS thread *LWJGL demos only* on: 2004-08-09 15:56:58
Ahh crap, finally got around to buying a vid card that supports the pixel trickery and now all JCD's demos have been taken down Roll Eyes

Anyone know if all these demo are available on any other sites?

cheers all.
29  Java Game APIs & Engines / OpenGL Development / Re: ported kev's TextureLoader on: 2004-05-01 14:36:23
>It bombed out at GLU.gluBuild2DMipmaps IIRC

JCD's worked fine for me, but as I said I've only glanced through the texture chapter, maybe JCD can shed some light.

>Well, opengl stores them upside down.

That I didn't know, I've just been flipping them in photoshop to solve the issue Smiley
I'll really have to read that red book properly sometime.

Cheers Smiley
30  Java Game APIs & Engines / OpenGL Development / Re: ported kev's TextureLoader on: 2004-05-01 14:01:54
Cool oNyx, I'll take a look at this as soon as I get some time. I really like JCD's texture loader though, very easy to use imo.

What problems have you had with it?

There is one thing that's puzzling me about JCD's texture loader though, but I'm not sure if it's something I'm doing or something in the code. Every time I load and display a texture it's always displayed upside down. I'm pretty sure its something I'm not setting up right on the texture loading side of things, but I've only glanced through the texture chapter of the red book so I can't be sure.

Anyone got any clues?
Pages: [1] 2 3
 

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

The first screenshot will be displayed as a thumbnail.

Nickropheliac (15 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (33 views)
2014-08-22 19:31:30

atombrot (41 views)
2014-08-19 09:29:53

Tekkerue (40 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (25 views)
2014-08-16 06:20:21

Tekkerue (37 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (49 views)
2014-08-09 21:09:32
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!