I still get the same error. Probably a bug in Mustang’s Web start implementation. You should try it out and report the bug if it is one.
I just tested it with JDK 1.5.0_04-b05. Not only did it run but I got a 20 fps boost in speed. After testing I recompiled it in 1.5 and got about a 1K saving in size in 1.5 only mode and a 200 byte saving in 1.4 campat mode very usefull in these limited size contests. I uploaded the recompiled version just in case it fixes your problem. It may be something to do with the platform. I See from your links that you have a mac address are you on a mac platform. I could have something wrong with the jnlp file that detects the platform and tries to load the correct LWJGL native jar. I do not have a mac so can’t test that configuration. The relavent lines are shown below. I have added links to the raw jar files on http://elmkom.tripod.com. NOW at http://javaunlimited.net/hosted/race16k/ If you have a chance to try them it would help isolate if it is a webstart problem or a code issue.
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.4.2+"/>
<jar href="lwjgl.zip"/>
<jar href="lwjgl_util.zip"/>
</resources>
<resources os="Windows">
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.4.2+"/>
<nativelib href="lwjgl-windows.zip"/>
</resources>
<resources os="Linux">
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.4.2+"/>
<nativelib href="lwjgl-linux.zip"/>
</resources>
<resources os="Mac OS">
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.4.2+"/>
<nativelib href="lwjgl-osx.zip"/>
</resources>
My tests were done on Win XP with Java 6 (Mustang) b44.
I was about to try on the Mac, but I got “The page you are attempting to access has been removed because it violated Tripod’s Terms of Service.”
Looks like when I added a link to allow the download of the jar files it violated their policy of not sharing files directly. Who would have guessed. Anyone know of a place where I can host the files. I saw that woogley was setting up a site to host the 16K contest. But It looks like it is not ready yet.
The site is ready, the contest isn’t. Wish it would start soon. I can host your files if you want… I have a public FTP directory you can use:
server: ftp.javaunlimited.net
user: java@woogley.net
pass: java
files appear at http://javaunlimited.net/hosted/
Thanks very much Woogley. The game is now hosted at http://javaunlimited.net/hosted/race16k/. How do you stay on top of these posts. I just mention your name and within an hour you respond.
no problem
better to refer to it as http://javaunlimited.net/hosted/race16k/ as that subdomain is likely to change soon
There are certain posts (mainly those that showcase a game) that I check whenever a new message is posted to see if there is some enhancement to the game or something
Chaged the URL as requested. Thanks once again.
An error occurred while launching/running the application.
Title: Race Way 16K
Vendor: Rick McConney
Category: Download Error
Found unsigned entry in resource: http://javaunlimited.net/hosted/race16k/lwjgl.zip
I tried this on my Powerbook G4 (Mac) running Java 1.5 on OS X 10.4.2. Worked with 91fps, but only the right hand half of all ships were drawn. Otherwise fine
I like the firing effects and the asteroid shards, which are new since I last tried your game
Alan
Thanks for the report on the Mac. I tried to save space by only having half of the ship image which I draw and then flip to draw the other half. However I noticed when I tried it on a mac that one half was not showing up. I thought I had it fixed with the following code. I guess it has something to do with the native byte order. Does any one have a way to fix this. I just need to draw the mirror image of the original half ship image. It looks like on your machine either I am not detecting that it is a mac or I do not need the alternate flip.
I am not sure why the unsigned jar error is happening I am guessing that since I have working reports from windows and mac. It must be the lynux native jar file that is causing the problem. I got all the signed jars from the post from Cas in the LWJGL16k thread. I have reuploaded the jar please let me know if that fixes the problem. Has any one had any success running it on Lynux.
if(System.getProperty("os.name").indexOf("indows") >= 0)
{
g.drawImage(bufferedImage,
bufferedImage.getWidth()*2,0,bufferedImage.getWidth(),bufferedImage.getHeight(),
0,0,bufferedImage.getWidth(),bufferedImage.getHeight(),null);
}
else
{
g.drawImage(bufferedImage,
0,0,-bufferedImage.getWidth(),bufferedImage.getHeight(),
0,0,bufferedImage.getWidth(),bufferedImage.getHeight(),null);
}
g.drawImage(bufferedImage,0,0,null);
Rick,
I tried your code as follows:
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
public class FlipTest extends Frame {
BufferedImage bufferedImage;
/** Creates a new instance of FlipTest */
public FlipTest() {
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gs = ge.getDefaultScreenDevice();
GraphicsConfiguration gc = gs.getDefaultConfiguration();
// One or the other but not both
bufferedImage = gc.createCompatibleImage(200, 400);
// bufferedImage = new BufferedImage(200, 400, BufferedImage.TYPE_INT_RGB);
Graphics g = bufferedImage.getGraphics();
g.setColor(Color.BLUE);
g.drawLine(0, 0, 199, 399);
g.dispose();
}
public void paint(Graphics g) {
g.translate(10,36);
if(System.getProperty("os.name").indexOf("indows") >= 0) {
g.drawImage(bufferedImage,
bufferedImage.getWidth()*2, 0,
bufferedImage.getWidth(), bufferedImage.getHeight(),
0, 0,
bufferedImage.getWidth(), bufferedImage.getHeight(),
null);
} else {
g.drawImage(bufferedImage,
0, 0,
-bufferedImage.getWidth(), bufferedImage.getHeight(),
0, 0,
bufferedImage.getWidth(), bufferedImage.getHeight(),
null);
}
g.drawImage(bufferedImage, 0, 0, null);
}
public static void main(String[] args) {
FlipTest f = new FlipTest();
f.setSize(420, 446);
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
f.show();
}
}
Your Mac specific code doesn’t work on my Powerbook G4. The windows code (which looks correct too) does work on it.
I tried creating the bufferedImage both directly, and as a screen compatible image. I got the same result for both on my PC, However the Mac set the background of the compatible image to white rather than black. Further investigation showed that the Mac returns a TYPE_INT_ARGB while my PC returns a TYPE_INT_RGB.
So the mac specific code doesn’t seem to be required (at least for my mac). Maybe there’s a bug in older JVMs?
Alan
Alan_W,
Thanks for taking the time to try it for me. I do not have a mac to try it on. However my Dad has an Imac so when I visited him over the summer I tried it on his Imac and that’s where I got the mac vesion of the code to work. Maybe his mac had an older version of java on it. As it should work the same way on a PC and a mac, if java is supposed to be portable. I took the os check out so now it runs the same on all platforms. I uploaded the fix so see if the ships show up now. Once again thanks for the feed back.
Works Fine Now (OS X 1.4.2, Java 1.5.0, PowerBook G4)\
Alan