This an eclipse project containing all the files necessary to begin developing games with Slick 2D. You can fork this repository, clone it on your disk and start to work in Eclipse.
After having cloned the repository to your disk you have to follow these few steps:
- Open Eclipse.
- Create a new java project selecting the local cloned folder.
- Right-click on the project and select Properties.
- Click on Java Build Path.
- Expand lwjgl.jar.
- Select Natives Library Location and click the Edit button.
- Click the Workspace button.
- Select the native folder in your project.
- Click OK until you get back to the default eclipse window.
- Select SimpleSlickGame.java from the Package Explorer and press play to check it it works.
To generate an executable version of the game you will need to use JarSplice and follow these steps:
- Right-click on the project and select Export.
- Click on Java and select Runnable JAR File.
- Select your main class in the Lunch configuration drop-down menu.
- Select Extract required libraries into generated JAR and press the Finish button.
- Download JarSplice at http://ninjacave.com/jarsplice and execute it (double-click on it).
- Select 1) ADD JARS, press the Add Jar(s) button in the bottom and select the previously exported JAR file.
- Select 2) ADD NATIVES, press the Add Native(s) button in the bottom, go to you projects native library and select all the files inside it.
- Select 3) MAIN CLASS, and in the Enter Main Class area type in the name of your main class including the name of the package (e.g. examples.SimpleSlickGame).
- Select 4) CREATE FAT JAR and press the Create Fat Jar button.
- The Jar you generated can be distributed and played on Windows, Linux and Mac.