Slick with GameJolt Quick Play

09 January 2010

Game Jolt

So you've got your Slick applets working on Game Jolt, but what if your game is normally a downloadable? Game Jolt has "Quick Play" which is pretty handy considering most people don't want to download, unzip, and run a batch script to play your game.

You've tried compiling your Slick game into an executable with both launch4j and JSmooth, but neither have seemed to work. Did you ever try asking Game Jolt to run your batch script?

I did, and it didn't work.

After some reading, here is the reason why:
The Quick Play java applet which downloads and runs your game uses the method Runtime.getRuntime.exec().
Programs ran with exec() will stall if they produce more than a few lines of output.

Solution 1: changing your program code
You can alter the System.out and System.err OutputStreams in your game so they do not print anything. Try using NullOutputStream from

Solution 2: add to your batch script
You've probably got something like
java -jar -Djava.library.path=lib/natives MyGame.jar

to run your program so it find's the native libraries.
Try this instead:

echo off
java -jar -Djava.library.path=lib/natives MyGame.jar << stdout.txt

The "<< stdout.txt" should redirect all System.out print statements to the file stdout.txt.

So there, your Slick downloadables should now work with Quick Play on Game Jolt! :)

Share on Facebook