Stag Party 4k

It is your Stag Party, so your mates decided it would be a bit of a laugh to open up an interdimensional portal, and throw you through! Now you are stuck dimension where evil cubes are trying to kill you, and all you have to ward them of it Small Good Cubes that fire out of your eye balls.

Yeah, the plot sucks, but that is fine; so does the game!

This is my first forte into writing a 3D game; it really does suck. As it is your stag party, you are very very drunk, that is why the controls make no sense. It has nothing to do with me being very confused over this strange 3D thing. No. Nothing at all…

No webstart get. Sorry.

Or manifest.
Or sound.
Or game play.

Start the game with

java -cp Mlk3D.jar Mlk3D

Controls:
Rotate: Left/Right/Up/Down/Z/X
Fire: Space
Quit: Escape

[tr][td]WebStart[/td][td]http://www.woogley.net/j4k/mlk/Mlk3D.jnlp[/td][/tr]
[tr][td]Exec[/td][td]http://www.woogley.net/j4k/mlk/Mlk3D.jar
[/td][/tr]
[tr][td]Src[/td][td]http://www.woogley.net/j4k/mlk/Mlk3D.html[/td][/tr]

A big Thanks to Woogley for the space! ;D

Edit: Removed warning, should not crash ppls boxes now!

o_O

The controls suck ;D

3860 7zip
3845 kzip

So… if you use a better zip program you can throw in a manifest.

Do you need a manifest for webstart? (not that I have it yet, should get round to it tonight)

In an act of unprecedented unlazyness, No it does not require a manifest :slight_smile:

it does not require a manifest

True. (meknows)

Therefore my next one will use webstart (and because I can use 1.5’s asskicking webstart-only compression thihi).

wow, while launching webstart, your program tried going to Fullscreen…BUT then it just freezed my PC.

Windows XP, Java 1.5, Nvidia GeForce 6800

It actually couldn’t go to Fullscreen (it also couldn’t on my girlfriend’s PC) and then resulted in a screen flickering and freeze of the system.

Cool. I played it… I had no idea… I read the instructions, I still had no idea…

Then I died! :slight_smile:

Still, looking forward see where it goes

Kev

[quote]wow, while launching webstart, your program tried going to Fullscreen…BUT then it just freezed my PC.

Windows XP, Java 1.5, Nvidia GeForce 6800

It actually couldn’t go to Fullscreen (it also couldn’t on my girlfriend’s PC) and then resulted in a screen flickering and freeze of the system.
[/quote]
Indeed, mlk has managed to find a way of completely fucking up 6800’s.

Warning

DO NOT RUN THIS IF YOU HAVE A 6800.

It totally shagged my machine in exactly the same way as KONI.

Its almost like you are setting full screen mode every game loop mlk!?!

I get a bluescreen with my gf4200

ran fine for me on my Intel Fake Graphics an Win XP SP2 2ghz. While the controls were annoying because they used global axes and not local, I still managed to stay alive for as long as I wanted :slight_smile: The more those big blocks came at me, the more angry I was at the woman who threw me in the portal. I like the story :wink:

I got this error:


C:\>java -cp Mlk3D.jar Mlk3D
Exception in thread "main" java.lang.UnsupportedClassVersionError: Mlk3D (Unsupp
orted major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

C:\>java -version
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

C:\>

hey it works for me!(but it runs in a window not fullscreen)
It’s good for 4k.
The controls would be better without the Z-X rotation that’s useless and confusing.

Not only 6800, my girlfriend has a NVidia 5700FX and she get’s the exact same error, only the game isn’t freezing the machine, it has the same flickering but without freezing the machine.

Seems to me as if fullscreen was set at each repaint or if it would try entering fullscreen in an endless loop.

Wow, this is the second time I’m made Java crash a machine! Woot. (the first time was also a game, did something funny on NT boxes, worked fine on Solaris ;D )

It should never attempt to go fullscreen. Could it be a problem with drawing a VolatileImage[1] on a window? I’ll look into.

[quote](and because I can use 1.5’s asskicking webstart-only compression thihi).
[/quote]
Ooo?? Tell me more…

[quote]Cool. I played it… I had no idea… I read the instructions, I still had no idea…
[/quote]
That is very much what I think of it :slight_smile:

[quote]I got this error:
[/quote]
I don’t think it uses any 1.5 stuff, I’ll recompile wih -target 1.4

[1] The Volatile image is created with:


      VolatileImage bb = GraphicsEnvironment.getLocalGraphicsEnvironment()
          .getDefaultScreenDevice().getDefaultConfiguration()
          .createCompatibleVolatileImage(320, 200);

Ooo?? Tell me more…

JWS 1.5 accepts p200/gzip as content encoding, to which you can react by sending an appropriate data stream together with the correct headers (content encoding).

First you create a jar, then obfuscate, then repack (uncompressed), then pack200 it and finally gzip it.

A.class -> a.jar -> a.jar.pack -> a.jar.pack.gz :slight_smile:

It travels through the net like that and gets automatically decompressed (gz->pack->jar) by JWS right after the download.

Pack200 is a specialized compression scheme, which removes unnecessary stuff from jars. Together with gzip it can shrink jars extremely. Eg a 11621 byte class file gets down to 3578 bytes. The per method “penalty” gets also very tiny.

The disadvantage is that you need php, jsp, asp or something like that (and something like mod_rewrite if possible) for sending the correct headers and the file contents.

[quote]A big Thanks to Woogley for the space! ;D
[/quote]
Quite welcome :slight_smile:

Interesting game btw… very surprising you could fit that under 4k! Also I’ve never seen a java compiler with #define directives before?? maybe I am deprived…

and as oNyx is saying about the php… that shouldn’t be a problem (I’m running PHP4)

Thank you. :wink:

I’ve now got the movement right (using local not global space). But I’m completely lost on getting the firing direction. :frowning:

I might roll back to the foo’d/drunk system, and upload a version which should not crash peoples computers :smiley:
Edit: Done

I run it through cpp first (cpp -P X.jp -o X X.java ). Having Point3D’s & Matrixs is much better than double arrays everywhere. It also lets me aggressively inline, without making the code ugly(er).

The only real problem is that I’ve not found a nice way to do

point.normailze();

I currently have to manually name mange.

point_normalize( point );

Cool.

Yeah! Fixed both the movement, and the problem with it crashing. Tis uploaded.