Using Slick2D Game Library for Java

If you have some experience in Java programming and want to learn how to use the Slick2D game library, then this tutorial will teach you the basics of setting up and making a game, getting input from the user, displaying graphics, firing guns, etc.

Videos will be hosted on YouTube, and source code will be hosted on Google Drive

  1. 01 - Basic setup and directory structure

    We will create our directory structure and install the library.

  2. 02 - Creating the first class

    We just create the empty methods that we need for the game to work and create our import statements.

  3. 03 - Basic Graphics and Input

    We draw a few strings to the screen, immediately followed by a couple rectangles. Then we discuss two methods of getting user input in Slick2D - polling and events. Both can be used in tandem, switching between them depending on the situation. We also increment a variable in the update() method, to illustrate how our game code will be organized.

  4. 04 - Quick image and player control

    Sorry for the delay. Finals and Christmas, etc. I'm with family for the holidays and can't make videos, but I've set up the lecture in pdf with screen shots and all the code you need to add.


Basic knowledge of imports, mutli-classing, basic math, and static/non-static, etc.

Basic shell scripting might be useful, because I will work using the Linux command line, and sometimes I forget to explain some of the functions that I'm using. If I do this, though, then please shout at me in the comments, and I'll try to be more clear.


Materials: Computer,

Code editor (Eclipse will work, but I will be using vim),

Java compiler (If you are using Eclipse, don't worry about this. I use javac)

The class is starting now! I will post video lectures and supplement with copies of my source code with comments explaining new lines that have been added.

Videos will be less than 10 minutes each, so short attention spans are welcome!

Additional information

I am using Linux and interacting with command line utilities. I'm creating directories this way, as well, but you can follow along with a GUI interface, if you fell more comfortable with that.

Teacher qualifications

Computer science student with prior experience with Slick2D.

Latest Update