30

I know the basics of C and I'm looking into SDL. What I need at this point are some tutorials, documentation or perhaps a book about using the SDL libraries in C, especially about graphics.

The problem is that every online resource that I have found deals with C++, where I am looking for resources in C.

I have looked at gpwiki.org, which had an entire section on C but mingw won't compile it because some of the includes are C++ libraries (I only installed the C compiler). Other sources like sol.gfxile.net/gp/ say that they are a C tutorial, but "use C++ for its conveniently loosened variable placement rules.". Most of the tutorials on the SDL site itself are based in C++.

Does anyone know of a good learning resource in C for SDL programming?

Bottle Rocket
  • 357
  • 1
  • 4
  • 6

1 Answers1

27

Have a look at this tutorial series at Parallel Realities. It covers SDL with C.

scable
  • 4,064
  • 1
  • 27
  • 41
  • Looks promising, thanks a lot! – Bottle Rocket Jul 07 '11 at 23:10
  • 10
    The link seems dead. Luckily, the tutorials seem still alive [over here](http://www.parallelrealities.co.uk/2011/09/basic-game-tutorial-1-opening-window.html) – Ancurio Mar 16 '12 at 21:17
  • 2
    @Ancurio both the links are now dead. Do you have new ones? – Keatinge Jul 15 '18 at 10:59
  • @Keatinge the old page is still available through waybackmachine, however I would strongly advice against using it due to being for SDL1.2; SDL2 changed quite a bit of the API. Most of the code [here](http://lazyfoo.net/tutorials/SDL/index.php) should be independent of C++ – Ancurio Jul 16 '18 at 18:17
  • 6
    updated link for these tutorials - https://www.parallelrealities.co.uk/tutorials/ (they note that they're out of date) – Aidenhjj Aug 17 '18 at 13:56
  • https://www.parallelrealities.co.uk/tutorials/shooter/shooter1.php – david david Aug 16 '20 at 15:11