# SDL Tutorials There are a number of SDL tutorials available from different sources. If you know of a tutorial about SDL 2.0 that should be linked here please let us know either [editing this page](https://wiki.libsdl.org/SDL2/Tutorials/edit) or [submitting an issue about it](https://github.com/libsdl-org/sdlwiki/issues/new?title=New%20SDL2%20tutorial%20for%20wiki.libsdl.org/Tutorials). Thanks! ## Multi-Subject - [thenumb.at SDL2 Tutorials](https://thenumb.at/cpp-course/index.html#sdl) Excellent starter for C++ users (although the SDL tutorials are _mostly_ C code). - [SDL2 Game Tutorials](https://www.parallelrealities.co.uk/tutorials/) Tutorials on building 3 complete games using SDL 2.0 - [C++/OpenGL/SDL Game Engine Tutorials](https://www.reddit.com/r/learnprogramming/comments/2ebfn1/copenglsdl_game_engine_tutorials_for_an_absolute/) SDL game engine tutorials for absolute beginners - [SDL Made Easy](https://www.youtube.com/playlist?list=PLHJE4y54mpC5_eEz9gCqIkNpU-n_2eyNt) A collection of video tutorials on various SDL topics - [Beginning Game Programming v2.0](http://lazyfoo.net/tutorials/SDL/index.php) A collection of detailed tutorials for game programming using SDL 2.0 with C++ - [TwinklebearDev](http://twinklebear.github.io/pages/sdl2/) Tutorials covering a wide variety of introductory topics with SDL 2.0 - [Remaking Cavestory in C++](https://www.youtube.com/watch?v=ETvApbD5xRo&list=PLNOBk_id22bw6LXhrGfhVwqQIa-M2MsLa) Video tutorial series on recreating Cave Story using SDL - [Beginners Guide to SDL2 in C](https://www.youtube.com/watch?v=ibVihn77SY4&list=PLO02jwa2ZaiCgilk8EEVnfnGWA0LNu4As&index=1) Great starting point as long as you know C basics - [Migrating a C++ game from SDL 1.2 to SDL 2.0](https://web.archive.org/web/20180117074719/http://blog.stuff-o-matic.com/post/2013/09/15/ASGP-s-Android-Port-Part-II%3A-from-SDL-1.2-to-SDL-2%2e) (Archived) An example of a project upgrade from SDL 1.2 to SDL 2.0 - [C++/SDL2 RPG Physics Based 2D Platformer for Beginners Tutorial](https://www.youtube.com/playlist?list=PL2RPjWnJduNmXHRYwdtublIPdlqocBoLS) A playlist of beginner SDL2 tutorials, focusing on the basics for setting up a RPG 2D platformer. Also features tutorials on how to set up SDL2 on Windows and Linux. - [SDL2 Tutorials](https://glusoft.com/sdl2-tutorials/) A collection of SDL2 tutorials ranging from beginner to expert level. - [Gigi Labs SDL2 Tutorials](https://gigi.nullneuron.net/gigilabs/writing/sdl2-tutorials/) A set of tutorials to cover the basics of several areas of SDL2. ## Setup - [How to setup Codeblocks mingw SDL2.0](https://www.youtube.com/watch?v=wWGtuc5uqF4) A video tutorial showing how to setup SDL 2.0 with codeblocks mingw32 compiler - [How to setup Codeblocks mingw, SDL2.0 Opengl 3+ and GLEW simple project included.](https://www.youtube.com/watch?v=UwpZOwT9nVc) A video tutorial showing how to setup SDL 2.0 with codeblocks mingw32 compiler with OpenGL 3.0+ & compiling GLEW libraries - [How To Get Started with SDL2 OpenGL C++ Programming on Linux](https://www.youtube.com/watch?v=JXdqh0INIBI) A video showing how to get started with SDL2 and OpenGL on Linux, using Visual Studio Code and Cmake. Some prior knowledge of C++ and Linux is required. - [SDL2 and C++ Video Tutorial Series](https://www.youtube.com/playlist?list=PLvv0ScY6vfd-p1gSnbQhY7vMe2rng0IL0) A YouTube series of videos showing how to setup SDL2 with C++ and various other beginner to intermediate level topics on using SDL2. ## Android - [HowTo: SDL on Android](http://www.dinomage.com/2013/01/howto-sdl-on-android/) An example of setting up SDL on Android - [Building an Android application using the SDL](https://web.archive.org/web/20180127022200/http://blog.stuff-o-matic.com/post/2013/10/20/ASGP-s-Android-Port-Part-IV%3A-building-the-APK) (Archived) An example of building an Android application using the SDL ## Audio - [Using SDL_AudioStream](Tutorials-AudioStream) A guide to the new audio stream API ## Video - [Streaming textures with SDL 2.0](http://slouken.blogspot.com/2011/02/streaming-textures-with-sdl-13.html) A quick guide to streaming textures - [Using GLSL with SDL](http://rainwarrior.ca/dragon/sdl_glsl.html) A tutorial on enabling and using GLSL extensions with SDL Check out https://github.com/libsdl-org/SDL/blob/SDL2/test/testshader.c also ### OpenGL - [OpenGL 3 Samples Pack](http://www.g-truc.net/post-0204.html) Using SDL 2.0 beta with OpenGL 3 - [OpenGL 3.2 and SDL](http://www.opengl.org/wiki/Tutorial1:_Creating_a_Cross_Platform_OpenGL_3.2_Context_in_SDL_(C_/_SDL)) Using SDL 1.3 alpha with OpenGL 3.2 Context - [OpenGL ES for iPhone : A Simple Tutorial](http://iphonesdkdev.blogspot.com/2009/04/opengl-es-for-iphone-simple-tutorial.html) A brief introduction to OpenGL ES ## Haptic - [SDL Haptic in depth](https://web.archive.org/web/20130728040700/http://bobbens.dyndns.org/journal/2010/sdl_haptic) (Archived) Covers the basics of how to create and playback simple force feedback effects with SDL ## Input - [Text Input](Tutorials-TextInput) Using SDL for text inputs with specific consideration for international users ## Threads - [Condition variables in SDL](https://web.archive.org/web/20180625073639/http://ansuz.sooke.bc.ca/software/sdl-condvars.php) (Archived) A good discussion of condition variables (in computer science rather than gaming context), some mention of mutex and semaphore use ## libSDL2pp - [libSDL2pp](https://github.com/libSDL2pp/libSDL2pp-tutorial) Tutorial for libSDL2pp, C++11 bindings/wrapper for SDL2