Chapter 1: Introduction, installation and configuration

The introduction is short. SDL library gives you the ability to develop powerful applications for many different operating systems (OS, e.g. Linux, Windows, MacOS) only by learning one set of commands. The SDL library takes on the assignment to translate your commands to the specific OS commands. It's especially meaningful to use the SDL library if you plan to develop two-dimensional games or similar software. Role-playing-, Real time/turn based strategy-, side-scrolling-, arcade-, board-, card-, simulation-, multi-user dungeon-, puzzle games and so on are possible as long as you don't plan to do them three-dimensional. But even if you plan on creating a first person shooter you shouldn't ignore SDL because it is the first choice for any two-dimensional task, even in a shooter project.

Now something about the licensing: Both, Freepascal and the SDL library are free and your created work can be used in commercial programs! The license of Freepascal is: modified LGPL and the license of SDL: GNU LGPL.

Before you proceed reading the manual installation of the SDL units for the Freepascal compiler (FPC) I'd like to let you know that since version 2.2.2 of FPC the pure, pre-compiled JEDI-SDL units are released along with the compiler so actually there is no need to install the SDL units manually anymore.

However, for beginners and inexperienced users I still recommend to install the units manually because this way you can better keep control of your FPC/SDL environment and learn how units, SDL features, SDL functions and DLL files are related. The individual chapters assume you did the manual installation. Furthermore many demos, the documentation and some special units (not needed for the tutorial though) are missing in the provided SDL unit package of FPC. Since the provided units are pre-compiled you aren't able to browse through the source code of the SDL units, which was one way to understand SDL for me. However, anything will also work if you rely on the FPC-included, pre-compiled units and skip the manual installation (go on with chapter 1a then).

If you decide to do the manual installation there are two different unit packages which allow the development of SDL applications with the Freepascal environment. If you don't know which to choose I recommend strongly to choose the package of the JEDI-SDL Project! It is more advanced and supports a greater variety of features.

LINUX USERS: The following description of the configuration is related to the MS Windows OS. The further chapters (except chapter 1 and 1a) will work for Linux OS, too. (If you want to contribute a configuration tutorial for Linux OS let me know; you would be mentioned as author of course.)

Which package of SDL units you want to install (MS Windows OS)?

JEDI-SDL (recommended)

SDL4FP





M. Molski





















to mainpage



Creation/Updates: 13/4/2009; 25/1/2007
There is no guarantee that things will work! You do everything described here on your own risk! © M. Molski 2005-2009. All product and company names, brand names, trademarks and logos are the property of their respective owners.