Starting SDL !!!


Its been quite sometime since I started to study SDL with my friend. I am going to summarise somethings about SDL as a beginner.

First let me tell the steps for configuring SDL with DevC++ IDE After installing DevC++ IDE, download the SDL Library

Download the SDL development library for Mingw32
(might be changed in the future)
SDL Library official site is

Place it in your C:\ Drive root.

You can also place it whereever you want to store, but here I am going to make further explanation assuming that we are extracting the downloaded file in C:\. If you are extracting at a different location make changes in the path as necessary in the below example

  • Extract the contents.
    It will create a folder called SDL-1.2.12.
    Rename the folder to 'SDL' for simplicity sake.
    Now extracted contents are in C:\SDL
  • To verify check if there are folders by name
    bin, build-scripts, lib, include etc.
    under the path C:\SDL
  • Now open the DevC++ IDE
    Go to Tools Compiler Options.
    • Under Compiler Tab
      Check the 'Add these commands to the linker command line' checkbox.
    • Then enter
      '-lmingw32 -lSDLmain -lSDL'
      in that textbox without the single quotes.
  • Next go to Directories Tab.
    • Under Libraries add the path C:\SDL\lib
    • Under C/C++ includes add the path 'C:\SDL\include\SDL'

Now you are all set to begin SDL !!

How to begin game programming ??

I remember I asked my father how games were made when I was in UKG after I got my ATARI 2600, and has been always trying to find out since then.

(Throughout my school life, I never owned a computer at home, only thing they taught in school was LOGO and very very limited amount of Basic. When I was in 9th or 10th standard I met this awesome thing called "Flash" which was Flash 5 then, and Flash CS4 now !)

This is something that I took years to find out. The first thing I started was to program with Flash. Soon I realized Flash's capabilities.I agree that you can make decent games with flash too. But still how do these people program real AAA titles like Half Life, Quake 3 etc ??

Then I came to world of turbo C, started ambitiously later found its slow and screen was flickering, then came Java with double buffering, I got a tutorial about tile based games and realized this is how games like Super Mario was made. Used it in Java, got some smooth scrolling, but could not make other things happen, too many bugs and I was not clear about many other tile concepts much.

That time my classmate, a super cool brainy guy started out with the same set of tutorials, and made a mixture of Contra, Mario (I had the sprites there !!) But finally the game after all those efforts was too slow. Then I learn t that people make use of something called hardware acceleration to create those super fast high graphics games. I learn t that
there are APIs to use the H/W acceleration and create games.

You can click links to learn more the terms, they all link to Wikipedia pages. Then I started to learn DirectX, the first step in becoming a real game programmer. Fortunately even though I am a diploma holder, I got job in a company to program CAD Applications, I learnt DirectX.NET there and realised it was hard to use it for CAD applications there, then came the world of OpenGL. I liked it mainly because of three things
  • Its a open industry based standard as opposed to DirectX which was Microsoft's.
  • John Carmack, my role model uses that to create Quake 3, Doom 3 etc.
  • Its really simple and powerful, and better than DirectX in many ways.
  • OpenGL code is very very portable.
Then came SDL, when I started to program games in ubuntu linux. I made a small tetris clone, playable but no scores etc. Remember I told I am lazy.

Now I like SDL, I am planning to learn and make some platformers using it, make is open source and make binaries for linux as well as windows. Lets see whether I am able to do it ???