Want to use the Slick game engine for your next game?
Well, here's some few notes you should know about this engine before starting:
1. The engine uses the LWJGL (http://www.lwjgl.org/) library which utilizes OpenGL technologies. LWJGL is a JNI binding for the native OpenGL and OpenAL API.
2. The engine also makes use of JNI bindings for JInput (https://jinput.dev.java.net/) so that you could use your nifty controllers in the game. JInput is an abstract controller interface. Although I'm not pretty sure, I believe there is an extension is hanging around for you to be able to use your Nintendo Wii controllers.
3. The current (as of this posting) LWJGL implementation is a bit buggy and hardware/driver-dependent, so some of those older video cards (GeForce 3 below) and cards with abysmal support on OpenGL drivers (some old laptops) would crash your game and sometimes even NOT RUN your game.
Well, even for a few minor drawbacks, Slick contends highly among any other 2D Game Engines around. Being extremely flexible and having an active development community makes up for the somewhat buggy implementation of its parent library, LWJGL.
Grabbing a Copy of the Engine
Slick is available almost immediately in its homepage. You may want download the full distribution at this URL (http://slick.cokeandcode.com/downloads/slick.zip) or grab a fresh copy of the source code from SVN (https://bob.newdawnsoftware.com/repos/slick/trunk/Slick). You may want to use TortoiseSVN (http://tortoisesvn.net/) to do the trick. Download the whole SVN contents and proceed to build the libraries off the source.
Building from the SVN Source Codes in the NetBeans (6.0.1) IDE
Building the libraries off the source in NetBeans is a no-brainer, as the Ant Build Script is provided to you (as any Java distributed library source code should). Simply follow the steps below to compile the library:
1. Create a New Project (Java > Java Project with Existing Ant Script) and click Next.
2. Set up the following properties in Name and Location panel:
Location: (browse for the downloaded SVN directory)
Build Script: (browse for the downloaded SVN directory)/build.xml
Project Name: slick (by default)
Project Folder: (browse for the downloaded SVN directory)
3. Select dist in the Build Project and/or Clean Project property and click Next.
4. Add Folder to (browse for the downloaded SVN directory)/src/ in the Source Package Folders panel and click Next.
5. Add JAR/Folder to (browse for the downloaded SVN directory)/lib/ and all *.jar under the(browse for the downloaded SVN directory)/lib/ in the Java Sources Classpath panel and click Finish.
6. Click either the Build or Clean and Build button on the Build toolbar just below the menu bar depending on the action taken in step 3.
Congratulations, you have just build your Slick library from the SVN source! If there are any updates in the Slick library, simply do an SVN Update and rebuild (by opening this same project and re-doing step 6), its all that simple!
Setting up Slick for the NetBeans (6.0.1) IDE
Now its time to get some real game programming action taking place!
1. Create a New Project (Java > Java Application) for your new game of course.
2. In the Projects toolbar (where your project heirarchy is seen), right click on the Libraries folder (just below the Source and Test Packages Folder) and select Add Library.
3. We currently do not have any settings for Slick yet, so build one by selecting New Library and adding a new library definition for Slick with the Library Type set to Class Libraries.
4. Select the newly created Slick library and add all *.jar files in the lib/ folder of your downloaded Slick folder on the Classpath panel. Add the src/ folder (optionally, the tools/ and examples/ folder) in the Sources panel and the javadoc/ folder in the Javadoc panel.
5. Since Slick relies on LWJGL and JInput native bindings, you need to copy the 4 *.dll's (lwjgl.dll, OpenAL32.dll, jinput-dx8.dll and jinput-raw.dll) in the project's home folder. Also, if you are going to distribute your game as a *.jar in the future, make sure these 4 *.dll's sit along beside it.
6. After all is done, simply select the created Slick library and add it in your project.
Done!
Monday, April 7, 2008
QuickStart: Slick
Here, you'll find a set of posts on tutorials regarding the Slick, a Java 2D game engine, found at http://slick.cokeandcode.com/. This QuickStart tutorial will guide to use the game engine in a few minutes.
1. Getting Started - Setting Up
2. BasicGame and GameContainers
3. Shapes, Images and Stuff
4. Movement and Linear Interpolation
5. Input Handling
6. Basic Collision Detection
7. Putting up together a Pong game
Feel free to post any comments and suggestions!
1. Getting Started - Setting Up
2. BasicGame and GameContainers
3. Shapes, Images and Stuff
4. Movement and Linear Interpolation
5. Input Handling
6. Basic Collision Detection
7. Putting up together a Pong game
Feel free to post any comments and suggestions!
Me First Post
Anything must start somewhere right? Well, here it is guys, hope my posts really do help you build your dream games anytime soon.
See you around!
See you around!
Subscribe to:
Posts (Atom)