(lwjgl) Schlug Attuck crash test

Ok, remember Schlug Attuck, my baby in Fullscreen Exclusive mode? I rewrote it in LWJGL instead and here it is… Just a crash test, you can drive and zoom and change vehicle… Read the README_FIRST.txt before playing and tell me your results and opinions.

http://www.naturalgamer.com/dist.zip <-- will be updated with latest version all the time

Works like a charm - but damnit - cant shoot! >:(

Working on the collision detection now … =/

$ java -cp lwjgl.jar; Schlug
java.lang.NoClassDefFoundError: Tank
at Schlug.run(Schlug.java:47)
at java.lang.Thread.run(Thread.java:536)

mill:
need to add Schlug jar to classpath too !

ehm, am i missing something trivial? it’s monday morning so i’m a bit … ehh… slow. :slight_smile:

-rw------- 1 d00ama students 8401 Apr 14 12:08 Actor.class
-rw------- 1 d00ama students 895 Apr 14 12:08 ArrayTest.class
-rw------- 1 d00ama students 1078 Apr 14 12:08 Chrono.class
-rw------- 1 d00ama students 1030 Apr 14 12:08 DarcLib.class
-rw------- 1 d00ama students 2077 Apr 14 12:08 Fonter.class
-rw------- 1 d00ama students 1070 Apr 14 12:08 Harrier.class
-rw------- 1 d00ama students 1697 Apr 14 12:08 Player.class
-rw------- 1 d00ama students 227 Apr 14 12:08 README_FIRST.txt
-rw------- 1 d00ama students 4727 Apr 14 12:08 Schlug.class
-rw------- 1 d00ama students 567 Apr 14 12:08 Structure.class
-rw------- 1 d00ama students 1061 Apr 14 12:08 Tank.class
-rw------- 1 d00ama students 567 Apr 14 12:08 Targeter.class
-rw------- 1 d00ama students 7192 Apr 14 12:08 Universe.class
-rw------- 1 d00ama students 1070 Apr 14 12:08 Vehicle.class
-rw------- 1 d00ama students 2872 Apr 14 12:08 Vehicle.java~
drwx–x--x 2 d00ama students 512 Apr 14 12:08 data/
-rw------- 1 d00ama students 229376 Apr 14 12:08 lwjgl.dll
-rw------- 1 d00ama students 120974 Apr 14 12:08 lwjgl.jar
-rw------- 1 d00ama students 29 Apr 14 12:08 run.bat

login-8{d00ama}: ll data
total 578
drwx–x--x 2 d00ama students 512 Apr 14 12:08 ./
drwx–x--x 3 d00ama students 512 Apr 14 12:08 …/
-rw------- 1 d00ama students 1695 Apr 14 12:08 cursor.png
-rw------- 1 d00ama students 1897 Apr 14 12:08 font.ini
-rw------- 1 d00ama students 33259 Apr 14 12:08 font.png
-rw------- 1 d00ama students 11856 Apr 14 12:08 harrier.png
-rw------- 1 d00ama students 19356 Apr 14 12:08 repair.png
-rw------- 1 d00ama students 165192 Apr 14 12:08 shelter.png
-rw------- 1 d00ama students 1035 Apr 14 12:08 soldier.png
-rw------- 1 d00ama students 14840 Apr 14 12:08 tank.png
-rw------- 1 d00ama students 26569 Apr 14 12:08 wood.jpg

it seems to be missing! what do you other people use to extract rar with? what’s wrong with zip? if the author is using winrar he can use zip as well as rar.

eh i feel so stupid hehe

i added what you said to the command line and it worked :slight_smile:

You execute it with run.bat so that you dont have to worry about the classpath parameter.
About the tank.class error it was an old .rar that was missing the Tank class file… it is updated now.
I think I will switch to zip instead as man people seem to be disturbed by me using rar :slight_smile: And yes I use winrar.

bat-files are for win32-people… so i suggest just pack everything in a single jar-file instead :slight_smile:

Hmmmm… I got CRC errors trying to extract the jar :-/

Erik

No one else seems to have that problem, perhaps a broken download? It is a rar btw and packed with winrar.

Is there any reason for the RAR file? Some of us would rather not go through the pain of installing WinRAR or comparable libraries.

there, made it zip :slight_smile:
www.naturalgamer.com/dist.zip

Hehehe, this looks familiar:

Failed to set screen mode: bad mode
java.lang.Exception: Failed to set display mode to 1024 x 768 x 32 @75Hz 8bit alpha, 16bit depth, 0bit stencil
at org.lwjgl.Display.create(Unknown Source)
at Schlug.initGL(Schlug.java:140)
at Schlug.run(Schlug.java:45)
at java.lang.Thread.run(Thread.java:536)

What you need is LWJGL 0.6! Coming soon.

Cas :slight_smile:

hehe yeah thats about the only error I get nowadays :slight_smile:

I tried to run the game, but all I get is a monitor screen that cannot synchronize on whatever screen mode is chosen.

I took the freedom to decompile the code and look for the problem and here it is:

The program tries to find a display mode 1024x768x32 display mode and picks the first maching mode. This is fatal because my system returns a “@200Hz” mode here. That is more than my monitor can bear.

I’m amaized, my system returns not less than 5552 display modes. I added a “modes[i].freq != 75” condition to the line that chooses the mode. Still 16 modes to choose from and a high chance to get the wrong one…

Otherwise quite nice :wink:

java.lang.NullPointerException
        at org.lwjgl.Display.create(Unknown Source)
        at Schlug.initGL(Schlug.java:140)
        at Schlug.run(Schlug.java:45)
        at java.lang.Thread.run(Thread.java:536)

Hmmm… :-/

Yeah, waiting for lwjgl 0.6 that should fix that problem.

Btw… decompile? Hmm? is that possible? What happened to compilation = code privacy, can people get the source code from byte code?

There are different kinds of tools to decompile, such as JAD (http://members.fortunecity.com/neshkov/dj.html) or DJ.

What do you mean by ‘compilation = code privacy’?

I mean that you shouldnt be able to decompile compiled code… But I talked to herkules and he told me about obfuscators so I understand it now.