sthorsen
Senior Newbie 
|
 |
«
Posted
2004-08-27 11:08:51 » |
|
Hi! Just made this tetris clone using lwjgl. I wonder if it works on your machines? http://www.retris.1go.dk/Søren Thorsen, Denmark
|
|
|
|
|
|
|
Matzon
|
 |
«
Reply #2 - Posted
2004-08-27 12:44:22 » |
|
works fine nVidia 4200 Go, Windows XP, Firefox
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Middy
Junior Member  
Java games rock!
|
 |
«
Reply #3 - Posted
2004-08-27 12:57:06 » |
|
wont even start. I see the webstart stuff with a "random industries" sign, and then nothign happens
gforce 3 ti200,windows XPpro , firefox
|
When do I get my makeMyGameAsILike() extension?
|
|
|
sthorsen
Senior Newbie 
|
 |
«
Reply #4 - Posted
2004-08-27 13:01:46 » |
|
Middy>> Does it freeze at "Starting application" because I've seen that on a number of other machines which all had in common that no lwjgl had been executing on them before. Any ideas what the problem can be?
Thanks to both of you for using some of your friday afternoon time on this!
Søren
|
|
|
|
|
Middy
Junior Member  
Java games rock!
|
 |
«
Reply #5 - Posted
2004-08-27 13:40:09 » |
|
yes it does, but I have run several LWjGl apps on it before using webstart, and nope I have no idea. I am using java 1.4.2_04 btw (not 1.5 as I stated)
|
When do I get my makeMyGameAsILike() extension?
|
|
|
sthorsen
Senior Newbie 
|
 |
«
Reply #6 - Posted
2004-08-27 13:43:12 » |
|
Hmm ok. Can u see anything wrong in my php/jnlp file? Tetris.php: 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
| <?php header("Content-type: application/x-java-jnlp-file"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";?>
<jnlp
spec="1.0+"
codebase="http://www.retris.1go.dk/"
href="Tetris.php">
<information> <title>Random</title> <vendor>Random Industries</vendor> <homepage href="http://www.random.com/"/> <description>Random</description> <description kind="short"> A little random toy </description> <offline-allowed/> </information>
<security> <all-permissions/> </security>
<resources>
<j2se version="1.4+"/> <jar href="Tetris.jar"/> <jar href="lwjgl.jar"/>
</resources>
<resources os="Windows"> <nativelib href="lwjgl.win.jar" /> </resources> <resources os="Linux"> <nativelib href="lwjgl.lin.jar" /> </resources> <resources os="Mac"> <nativelib href="lwjgl.mac.jar" /> </resources>
<application-desc main-class="Tetris"/> </jnlp> |
|
|
|
|
|
elias
|
 |
«
Reply #7 - Posted
2004-08-27 13:44:17 » |
|
Doesn't work here. SuSE 9.1, Geforce FX 5650 Go, java 1.4.2. Exception from JWS log:
ava.lang.UnsupportedClassVersionError: Tetris (Unsupported major.minor version 49.0) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at com.sun.jnlp.JNLPClassLoader.defineClass(JNLPClassLoader.java:307) at com.sun.jnlp.JNLPClassLoader.access$100(JNLPClassLoader.java:51) at com.sun.jnlp.JNLPClassLoader$1.run(JNLPClassLoader.java:254) at java.security.AccessController.doPrivileged(Native Method) at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:247) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at com.sun.javaws.Launcher.continueLaunch(Launcher.java:614) at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:390) at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:199) at com.sun.javaws.Launcher.run(Launcher.java:167) at java.lang.Thread.run(Thread.java:534)
I guess you've been compiling with a 1.5 SDK, right?
- elias
|
|
|
|
kevglass
|
 |
«
Reply #8 - Posted
2004-08-27 13:55:28 » |
|
Fails to download correctly here  Kev
|
|
|
|
sthorsen
Senior Newbie 
|
 |
«
Reply #9 - Posted
2004-08-27 14:03:50 » |
|
yup! Compiled using 1.5 SDK! What's the problem with that? Does it work if I change my code to compile with an older version?
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
elias
|
 |
«
Reply #10 - Posted
2004-08-27 14:36:11 » |
|
I think you need to specify -target 1.4 to the 1.5 javac to make it generate 1.4 compatible class files.
- elias
|
|
|
|
sthorsen
Senior Newbie 
|
 |
«
Reply #11 - Posted
2004-08-27 14:45:25 » |
|
Just compiled without option -source 1.5 and it works on all machines I've encountered. Does it work on yours now? Thanks for your help everyone!
Søren
|
|
|
|
|
elias
|
 |
«
Reply #12 - Posted
2004-08-27 15:00:03 » |
|
I'm sure you meant "-source 1.4"  Anyway, it works fine now. - elias
|
|
|
|
karatemarkel
|
 |
«
Reply #13 - Posted
2004-08-27 15:19:19 » |
|
No problems here, XP Pro, firefox, 6800 GT and 1.4.2_01.
|
|
|
|
|
sthorsen
Senior Newbie 
|
 |
«
Reply #14 - Posted
2004-08-27 15:26:08 » |
|
I meant what I said which was compiling with "bla bla bla" instead of "-source 1.5 bla bla bla". I think 1.4 is the default option so no need to specify it... Anyway i'm glad it seems to work on most machines. Please let me know if I'm wrong!
|
|
|
|
|
Middy
Junior Member  
Java games rock!
|
 |
«
Reply #15 - Posted
2004-08-27 16:04:25 » |
|
works 
|
When do I get my makeMyGameAsILike() extension?
|
|
|
|
|
Middy
Junior Member  
Java games rock!
|
 |
«
Reply #17 - Posted
2004-08-30 12:55:37 » |
|
sthorsen, how did you compile your 1.5 code to 1.4 compatible. Cause I cant make it work
|
When do I get my makeMyGameAsILike() extension?
|
|
|
sthorsen
Senior Newbie 
|
 |
«
Reply #18 - Posted
2004-08-31 15:05:33 » |
|
I changed the few lines with 1.5 specific code to 1.4 compatible code and the compiled it with:
javac -classpath "$[ClassPath]" -d "$[OutputPath]" $[JavaFiles]
The javac.exe is still the 1.5 compiler but it compiles to 1.4 by default.
|
|
|
|
|
Middy
Junior Member  
Java games rock!
|
 |
«
Reply #19 - Posted
2004-08-31 15:53:15 » |
|
damn... I dont want to change my code and I cannot compile it to 1.4 code...
Well shrew it you'll get a webstart in a year or so (when 1.5 is out)
|
When do I get my makeMyGameAsILike() extension?
|
|
|
princec
|
 |
«
Reply #20 - Posted
2004-08-31 21:43:52 » |
|
Another slick LWJGL game  Cas 
|
|
|
|
cfmdobbie
|
 |
«
Reply #21 - Posted
2004-08-31 22:58:11 » |
|
Another slick LWJGL game  Would have been, if only it weren't using JOGL! 
|
Hellomynameis Charlie Dobbie.
|
|
|
renanse
Junior Member  
Intelligence is light to a dark world.
|
 |
«
Reply #22 - Posted
2004-09-01 05:59:04 » |
|
Would have been, if only it weren't using JOGL!   What are you talking about. Check your javaws cache, it uses lwjgl.
|
Renanse (ruh-NON-say)
|
|
|
sthorsen
Senior Newbie 
|
 |
«
Reply #23 - Posted
2004-09-01 07:25:46 » |
|
Thanks cas!  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 
|
|
|
|
|
cfmdobbie
|
 |
«
Reply #24 - Posted
2004-09-01 09:27:41 » |
|
 What are you talking about. Check your javaws cache, it uses lwjgl. 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!
|
Hellomynameis Charlie Dobbie.
|
|
|
EsotericMoniker
|
 |
«
Reply #25 - Posted
2004-09-18 22:01:01 » |
|
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
|
All generalizations are false
|
|
|
sthorsen
Senior Newbie 
|
 |
«
Reply #26 - Posted
2004-09-20 12:14:46 » |
|
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: 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
| private static int loadTexture(String path) { java.net.URL url = Thread.currentThread().getContextClassLoader().getResource(path); Image image = (new javax.swing.ImageIcon(url)).getImage();
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();
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);
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();
IntBuffer buf = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); GL11.glGenTextures(buf); 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); } |
|
|
|
|
|
eric_o_z
Senior Newbie 
Java games rock!
|
 |
«
Reply #27 - Posted
2004-09-21 03:44:36 » |
|
it works. intel 82845G graphics card,win2000,firefox
|
I love game program.
|
|
|
|