Castle Forge

My friend and I created this game for an Independent Study project. It’s our first game created using Slick2D and was written in Scala. It’s missing sound and the graphics are just programmer art, but it can still provide some amusement. Sound likely won’t be added until the future when we have time to port it to libGDX so it can run on android and in browsers. Also, our code structure started showing some weaknesses towards the end of development which made us have to cut some features. It was a great learning experience and our next game(s) will be much better because of it.

Download: https://github.com/downloads/Talon876/CastleForge/CastleForge-1.0.jar
Source: https://github.com/Talon876/CastleForge

Game Objectives:
The goal of the game is to find your way through Castle’s containing various puzzle elements. Most of the time it’s just finding the right key for the right door, but there are objects that allow for creation of ice sliding puzzles (like in pokemon), teleporters, hidden rooms, and more.
Currently, there is only the intro level available but the other half of the game is the editor which allows you to create your own Castles.

https://a248.e.akamai.net/camo.github.com/b9df845f9ddd48cb4e4d0b65141ce6667fb3cbc2/687474703a2f2f692e696d6775722e636f6d2f79374966612e6a7067

https://a248.e.akamai.net/camo.github.com/45b4b970e6ca5da3885445312af5cf0469494bd8/687474703a2f2f692e696d6775722e636f6d2f64397a76712e6a7067

sP44eRHJgTE

Error: Invalid or corrupt jarfile. :stuck_out_tongue:

Oops, I uploaded the wrong jar file -.-
Should be fixed now.

java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixe
java -jar CastleForge-1.0.jar
Error: Invalid or corrupt jarfile CastleForge-1.0.jar

I don’t know what’s going on, I run the jar file and it works just fine, I upload it to GitHub, I then redownload it from GitHub and it works just fine again. Then after awhile it just becomes a 0kb jar file. I’ll try reuploading it again but if it still doesn’t work, there will be a mediafire mirror.

edit: ok I know what I did. It’s going to be broken for awhile, I’ll fix it as soon as I have time later today.

Ok, NOW it should work. All sorts of weird issues with my native extractor not working after I changed the version number as well as jar files becoming 0 bytes after uploading them -.-

Definitely looks cool! Any plans for monsters/enemies/bosses/treasure in the future?

Yeah definitely, probably after I get it ported to libGDX which will take some time.

It doesent work. I just see a black screen. ???

It takes a couple seconds to load. What version of java do you have installed? What OS? Can you run it with java -jar and paste any errors here?

It works but I get several exceptions:
Loading jar at /home/gouessej/Téléchargements/CastleForge-1.0.jar
Moving /natives/natives from jar to /home/gouessej/.castleforge/natives/1.0/natives
java.lang.NullPointerException
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:999)
at org.nolat.castleforge.NativeExtractor$.org$nolat$castleforge$NativeExtractor$$extractFromJar(NativeExtractor.scala:48)
at org.nolat.castleforge.NativeExtractor$$anonfun$extractNatives$1.apply(NativeExtractor.scala:29)
at org.nolat.castleforge.NativeExtractor$$anonfun$extractNatives$1.apply(NativeExtractor.scala:24)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.JavaConversions$JEnumerationWrapper.foreach(JavaConversions.scala:578)
at org.nolat.castleforge.NativeExtractor$.extractNatives(NativeExtractor.scala:24)
at org.nolat.castleforge.App$.main(App.scala:13)
at org.nolat.castleforge.App.main(App.scala)
Moving /natives/jinput-dx8.dll from jar to /home/gouessej/.castleforge/natives/1.0/jinput-dx8.dll
Moving /natives/jinput-dx8_64.dll from jar to /home/gouessej/.castleforge/natives/1.0/jinput-dx8_64.dll
Moving /natives/jinput-raw.dll from jar to /home/gouessej/.castleforge/natives/1.0/jinput-raw.dll
Moving /natives/jinput-raw_64.dll from jar to /home/gouessej/.castleforge/natives/1.0/jinput-raw_64.dll
Moving /natives/jinput-wintab.dll from jar to /home/gouessej/.castleforge/natives/1.0/jinput-wintab.dll
Moving /natives/libjinput-linux.so from jar to /home/gouessej/.castleforge/natives/1.0/libjinput-linux.so
Moving /natives/libjinput-linux64.so from jar to /home/gouessej/.castleforge/natives/1.0/libjinput-linux64.so
Moving /natives/libjinput-osx.jnilib from jar to /home/gouessej/.castleforge/natives/1.0/libjinput-osx.jnilib
Moving /natives/liblwjgl.jnilib from jar to /home/gouessej/.castleforge/natives/1.0/liblwjgl.jnilib
Moving /natives/liblwjgl.so from jar to /home/gouessej/.castleforge/natives/1.0/liblwjgl.so
Moving /natives/liblwjgl64.so from jar to /home/gouessej/.castleforge/natives/1.0/liblwjgl64.so
Moving /natives/libopenal.so from jar to /home/gouessej/.castleforge/natives/1.0/libopenal.so
Moving /natives/libopenal64.so from jar to /home/gouessej/.castleforge/natives/1.0/libopenal64.so
Moving /natives/lwjgl.dll from jar to /home/gouessej/.castleforge/natives/1.0/lwjgl.dll
Moving /natives/lwjgl64.dll from jar to /home/gouessej/.castleforge/natives/1.0/lwjgl64.dll
Moving /natives/META-INF from jar to /home/gouessej/.castleforge/natives/1.0/META-INF
java.lang.NullPointerException
at java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.io.FilterInputStream.read(FilterInputStream.java:107)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:999)
at org.nolat.castleforge.NativeExtractor$.org$nolat$castleforge$NativeExtractor$$extractFromJar(NativeExtractor.scala:48)
at org.nolat.castleforge.NativeExtractor$$anonfun$extractNatives$1.apply(NativeExtractor.scala:29)
at org.nolat.castleforge.NativeExtractor$$anonfun$extractNatives$1.apply(NativeExtractor.scala:24)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.JavaConversions$JEnumerationWrapper.foreach(JavaConversions.scala:578)
at org.nolat.castleforge.NativeExtractor$.extractNatives(NativeExtractor.scala:24)
at org.nolat.castleforge.App$.main(App.scala:13)
at org.nolat.castleforge.App.main(App.scala)
Moving /natives/MANIFEST.MF from jar to /home/gouessej/.castleforge/natives/1.0/MANIFEST.MF
java.lang.NullPointerException
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:999)
at org.nolat.castleforge.NativeExtractor$.org$nolat$castleforge$NativeExtractor$$extractFromJar(NativeExtractor.scala:48)
at org.nolat.castleforge.NativeExtractor$$anonfun$extractNatives$1.apply(NativeExtractor.scala:29)
at org.nolat.castleforge.NativeExtractor$$anonfun$extractNatives$1.apply(NativeExtractor.scala:24)
at scala.collection.Iterator$class.foreach(Iterator.scala:772)
at scala.collection.JavaConversions$JEnumerationWrapper.foreach(JavaConversions.scala:578)
at org.nolat.castleforge.NativeExtractor$.extractNatives(NativeExtractor.scala:24)
at org.nolat.castleforge.App$.main(App.scala:13)
at org.nolat.castleforge.App.main(App.scala)
Moving /natives/openal.dylib from jar to /home/gouessej/.castleforge/natives/1.0/openal.dylib
Moving /natives/OpenAL32.dll from jar to /home/gouessej/.castleforge/natives/1.0/OpenAL32.dll
Moving /natives/OpenAL64.dll from jar to /home/gouessej/.castleforge/natives/1.0/OpenAL64.dll
Set org.lwjgl.librarypath to /home/gouessej/.castleforge/natives/1.0/
Thu Dec 13 17:13:17 CET 2012 INFO:Slick Build #274
Thu Dec 13 17:13:17 CET 2012 INFO:LWJGL Version: 2.8.4
Thu Dec 13 17:13:17 CET 2012 INFO:OriginalDisplayMode: 1680 x 1050 x 24 @60Hz
Thu Dec 13 17:13:17 CET 2012 INFO:TargetDisplayMode: 1280 x 720 x 0 @0Hz
Thu Dec 13 17:13:17 CET 2012 INFO:Starting display 1280x720
Thu Dec 13 17:13:17 CET 2012 INFO:Use Java PNG Loader = true
déc. 13, 2012 5:13:17 PM net.java.games.input.DefaultControllerEnvironment getControllers
INFO: Loading: net.java.games.input.LinuxEnvironmentPlugin
java.lang.ClassNotFoundException: net.java.games.input.LinuxEnvironmentPlugin
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:159)
at org.lwjgl.input.Controllers.create(Controllers.java:71)
at org.newdawn.slick.Input.initControllers(Input.java:1032)
at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:382)
at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
at org.nolat.castleforge.App$.main(App.scala:24)
at org.nolat.castleforge.App.main(App.scala)
Thu Dec 13 17:13:17 CET 2012 INFO:Found 0 controllers
Took 4874ms

I don’t think it likes the Unicode in the path to the jar. Can you try deleting ~/.castleforge then rerunning the jar from a path without Unicode in it. I also never tested on Linux so the binaries for lwjgl might not even work. But try running the jar from a location without Unicode first. Also what version of java are you using?