Does my game work on your machines?

Another slick LWJGL game :slight_smile:

Cas :slight_smile:

[quote]Another slick LWJGL game :slight_smile:
[/quote]
Would have been, if only it weren’t using JOGL! ;D

??? What are you talking about. Check your javaws cache, it uses lwjgl.

Thanks cas! :slight_smile:

I use LWJGL for rendering and input and pure java for the rest. No JOGL!

edit: And of course php/mysql for the hiscore part. That should cover it ;D

[quote]??? What are you talking about. Check your javaws cache, it uses lwjgl.
[/quote]
Hmm, than I take it all back.

It crashed out on my laptop, and my Webstart log contained a JOGL stack trace - I checked the timestamp, and was pretty sure Retris created it. I must have been mistaken!

It runs fine for me but the background graphic has interlaced black lines running through it. I’m not sure if that was intentional. I can send you a screen shot if you would like.

Specs:
Dell Inspiron 9100
Radeon Mobility 9700 128MB
XP Pro SP1
JVM 1.4.2_05-b04

I know about the interlaced lines - but I’m not sure how to fix it. Does anyone have an idea what can be wrong? The image for the texture measures 800x600 pixels and I use the following code to generate the texture:

      private static int loadTexture(String path) {
            java.net.URL url = Thread.currentThread().getContextClassLoader().getResource(path);
            Image image = (new javax.swing.ImageIcon(url)).getImage();

            // Exctract The Image
            BufferedImage tex = new BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_3BYTE_BGR);
            Graphics2D g = (Graphics2D) tex.getGraphics();
            g.drawImage(image, null, null);
            g.dispose();

            // Flip Image
            AffineTransform tx = AffineTransform.getScaleInstance(1, -1);
            tx.translate(0, -image.getHeight(null));
            AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
            tex = op.filter(tex, null);

            // Put Image In Memory
            ByteBuffer scratch = ByteBuffer.allocateDirect(4 * tex.getWidth() * tex.getHeight());

            byte data[] = (byte[]) tex.getRaster().getDataElements(0, 0, tex.getWidth(), tex.getHeight(), null);
            scratch.clear();
            scratch.put(data);
            scratch.rewind();

            // Create A IntBuffer For Image Address In Memory   
            IntBuffer buf = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer();
            GL11.glGenTextures(buf); // Create Texture In OpenGL   

            
            // Typical Texture Generation Using Data From The Image

            // Linear Filtering
          GL11.glBindTexture(GL11.GL_TEXTURE_2D, buf.get(0));
          GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);
          GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR_MIPMAP_NEAREST);
            GLU.gluBuild2DMipmaps(GL11.GL_TEXTURE_2D, 3, tex.getWidth(), tex.getHeight(), GL11.GL_RGB, GL11.GL_UNSIGNED_BYTE, scratch);

            
            return buf.get(0); // Return Image Address In Memory
      }

it works.
intel 82845G graphics card,win2000,firefox