Space Invaders

Hello all,

I thought I would throw my Space Invaders game your way and see what you guys think of it. It’s my first LWJGL game. I cannot find a signed lwjgl.jar file (maybe I’m supposed to sign it myself?), so I had to distribute the files inside the main jar file, so it’s Windows only.

Here’s a screenshot for those of you who can’t run it if they don’t have Windows (again, sorry about that).

http://www.myexh.com/~gonav341/SpaceInvaders/Screenshot.png

Here’s the WebStart link: http://www.myexh.com/~gonav341/SpaceInvaders/SpaceInvaders.php

you are aware of: org.lwjgl.examples.spaceinvaders.Game ?

No, I am not. What is that? It can’t be part of the API, it’s not in the API docs. Is it part of a CVS? I don’t see any CVS on the website.

http://lwjgl.org/jnlp/lwjgl-demo.php/examples.spaceinvaders.Game

Woah so you create an almost identical game with extremely similar art and graphical style without being aware it existed?

Oh that. I didn’t know that was on lwjgl.org. I intended my game to be like that one, but I found it on kevglass’ site, cokeandcode.com. I didn’t use the tutorial, but I got the art from molotov.nu, apparently he altered the art a little though.

But anyway, does anybody know why the lwjgl.jar needs to be signed? And where to get the signed jar from (or do I sign it myself?).

it doesn’t need to be signed as such, you just get a non-friendly warning message.
If it was signed, then you get a better permissions asking dialog.

the lwjgl jars needs to be signed, because running native code is not allowed per default.

I cannot run the JAR file without it being signed. I get the following:
(this is running from my local server)

Unsigned application requesting unrestricted access to system
Unsigned resource: http://localhost/Java/SpaceInvaders/lwjgl.jar

It will not start up after that, just cancels it out.

And as you said…

[quote=“Matzon,post:7,topic:30121”]
If they DO need to be signed… am I required to sign them myself? If not, where are the signed versions of the JARs???

???

Launch it now and you’ll see the error.

there are signed libraries using the jnlp extension:
- yet to be versioned…

You will want to sign them yourself because WS apparently doesn’t like it when it mixes JAR’s signed by different people. All you do is create a keystore and then sign the JAR’s with that. Kev has a great ANT script that automates all of that. Check his site.

  • Jon

Okay, thanks for the information. I’ll go ahead and sign the JARs myself.

Okay, so, update! I’ve been able to successfully place everything (including lwjgl.jar) in separate JAR files. Now supports Windows, Linux, and Mac (so far, only tested on Windows). Another update is it supports controller input (only the first available controller that has at least one axis is selected by default).

Please run it and tell me what you think of it. I’d be interested to see what the results are on Linux and Mac (and other versions of Windows).

EDIT: Oh and by the way, thanks for all the help!!! I really appreciated it!

I tried to run your game, but screen just turned black, and game hanged. When I got back to desktop I’ve found a nice exception:

org.lwjgl.opengl.OpenGLException: Invalid value (1281)
	at org.lwjgl.opengl.Util.checkGLError(Util.java:53)
	at org.lwjgl.opengl.Display.swapBuffers(Display.java:592)
	at org.lwjgl.opengl.Display.update(Display.java:610)
	at SpaceInvaders.startGame(SpaceInvaders.java:156)
	at SpaceInvaders.<init>(SpaceInvaders.java:100)
	at SpaceInvaders.main(SpaceInvaders.java:309)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Hope this will help.