<< Chapter < Page Chapter >> Page >

You should also be relatively comfortable with the command-line interface, directory or folder trees, batch or script files, etc.

Finally, you should also be comfortable downloading and installing software on the machine and operating system of your choice.

What you will learn

In this module, you will learn how to download and install Slick2D on a Windows XP, Vista, or Windows 7 machine and how to compile and execute a very simple Slick2D program. (If you are using a different operating system, you will need to translate this information to your system of choice. However, since Java is platformindependent, the code details that I will discuss will apply to all or most platforms.)

Viewing tip

I recommend that you open another copy of this module in a separate browser window and use the following links to easily find and view the figuresand listings while you are reading about them.

Figures

  • Figure 1 . Output from Slick2D during program startup.
  • Figure 2 . A default Slick2D game window.

Listings

  • Listing 1 . Slick2D program named Slick0100a.java.
  • Listing 2 . The file named CompileAndRun.bat.

Preview

Most of the Slick2D tutorials that you will find on the Internet will begin by telling you to download and install a high-level IDE such as Eclipse orNetBeans. I won't do that.

While high-level IDEs are great for improving productivity for experienced programmers, I consider them to be overkill for students just learning how toprogram. Not only are they overkill, they also hide many details that beginning programmers need to understand.

Therefore, I will show you how to install Slick2D in such a way that you can easily compile and execute Slick2D programs from the command line with no need fora high level IDE. All you will need is a text editor (preferably color coded for Java syntax) , the free Slick2D distribution, and the free Java Development Kit from Oracle.

Download the required software

Text editors

There are numerous free text editors available on the Internet, some with and some without Java syntax color coding. (In a pinch, even Windows Notepad will suffice.) Here are links to a few of them.

The Slick2D distribution

I will be using this material in some of the Java OOP programming courses that I teach. I expect that changes and improvements will be made to the Slick2Dlibrary over time. However, it can be very confusing when different students in the same programming course are using different versions of software,particularly if changes to the software are made that are not backward compatible.

Therefore, to ensure that my students all download and use the same version of the software in my courses, I will make a copy of a particular version of the Slick2D distribution available byclicking here . (Note: as of 06/06/15, this is a 64-bit version ofthe distribution. The older 32-bit distribution is available here .)

If you are not one of my students, you may prefer to go to the Slick2D main page and select the link to download the latest version of the distribution. Save that file because I will have more to sayabout it later.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Anatomy of a game engine. OpenStax CNX. Feb 07, 2013 Download for free at https://legacy.cnx.org/content/col11489/1.13
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Anatomy of a game engine' conversation and receive update notifications?

Ask