GitHub repository
This tutorial is based on the SDL lazy' foo tutorials series.
# | Title | Description |
---|---|---|
00 | Installation | In this tutorial we will be setting up the SDL library. |
01 | Hello SDL | In this tutorial we will be creating our first window. |
02 | Getting an Image on the screen | Now that we can get a window to appear, lets blit an image onto it. |
03 | Event Driven Programming | Here we'll start handling user input by allowing the user to X out the window. |
04 | Key Presses | Here we'll learn to handle keyboard input. |
05 | Optimized Surface Loading and Soft Stretching | Now that we know how to load and blit surfaces, it's time to make our blits faster. We'll also take a smaller image and stretch it to fit the screen. |
06 | Extension Libraries and Loading Other Image Formats | Here we'll be using the SDL_image extension library to load png images. |
07 | Texture Loading and Rendering | A big new feature in SDL 2.0 is hardware accelerated texture based 2D rendering. Here we'll be loading an image to render it using textures. |
08 | Geometry Rendering | Another new feature in SDL 2.0 is hardware accelerated primitive rendering. Here we'll be using it to render some common shapes. |
09 | The Viewport | SDL 2.0 also lets you control where you render on the screen using the viewport. We'll be using the viewport to create subscreens. |
10 | Color Keying | Here we'll use color keying to give textures transparent backgrounds. |
11 | Clip Rendering and Sprite Sheets | Using clip rendering, you can keep multiple images on one texture and render the part you need. We'll be using this to render individual sprites from a sprite sheet. |
12 | Color Modulation | We'll be altering the color of rendered textures using color modulation. |
13 | Alpha Blending | Here we'll be using SDL 2.0 new hardware accelerated alpha blending. |
14 | Animated Sprites and Vsync | Here we'll be using a sequence of sprites to animate them. |
15 | Rotation and Flipping | Here we'll be using SDL 2.0's new texture rotation and flipping. |
16 | True Type Fonts | Here we'll be rendering text from true type fonts using SDL_ttf . |
17 | Mouse Events | Here we'll learn to read mouse input using mouse events. |
18 | Key States | There are other ways to read the keys besides event polling. Here we will get the current state of the keyboard using key states. |
19 | Gamepads and Joysticks | Here we'll learn to read input from a game controller. |
20 | Force Feedback | Another new feature for SDL 2.0 is rumble support using the SDL haptics. We'll make our controller rumble when a button is pressed. |
21 | Sound Effects and Music | Here we'll be using SDL_mixer to add music and sound to our SDL App. |
22 | Timing | Here we'll be using SDL's time capabilites. |
23 | Advanced Timers | Here we'll extend SDL time capabilities to make our own custom timer. |
24 | Calculating Frame Rate | Here we'll use the timers we built to measure frame rate. |
25 | Capping Frame Rate | If you need a constant frame rate when vsync isn't available, frame rate capping can be used as a fall back. |
26 | Motion | Here we'll be taking what we learned about rendering and handling input to make a dot move around the screen. |
27 | Collision Detection | Here we'll have two objects interact with each other using bounding box collision detection. |
28 | Per-pixel Collision Detection | Here we'll have two objects collide using per-pixel collision detection. |
29 | Circular Collision Detection | Here we'll learn to detect collisions with circles and boxes. |
30 | Scrolling | Here we'll be implementing a camera to scroll levels larger than the screen. |
31 | Scrolling Backgrounds | Here we'll be using a scrolling background to give the illusion of an infinite level. |
32 | Text Input and Clipboard Handling | Here we'll be using SDL 2.0's new way of handling text input and its new clipboard handling feature. |
33 | File Reading and Writing | Here we'll be using SDL's RWOps API to do binary file IO. |
34 | Audio Recording | SDL 2.0.8 supports audio recording. Here we'll be copying from the audio device to record and copying to the audio device to play back. |
35 | Window Events | Here we'll be handling events from a resizable window. |
36 | Multiple Windows | A new feature in SDL is the ability to support more than one window. Here we'll make an application that has 3 windows. |
37 | Multiple Displays | Another new feature of SDL 2.0 is the ability to handle more than one physical display. Here we'll make our window jump from display to display. |
38 | Particle Engines | Here we'll use a simple particle effect to create a simple trail effect. |
39 | Tiling | Here we'll make a simple level using a tiling engine. |
40 | Texture Manipulation | Here we'll be directly accessing and manipulating a texture's pixels. |
41 | Bitmap Fonts | Here we'll be using a texture as a font using bitmap font techniques. |
42 | Texture Streaming | Here we'll be rendering from a streaming data source using texture streaming. |
43 | Render to Texture | Here we'll be taking a scene and rendering it to a texture. |
44 | Frame Independent Movement | Here we'll be making the dot move independent of the current frame rate. |
45 | Timer Callbacks | SDL has another timing mechanism called timer callbacks. Here we'll be setting a function to be called back after a certain amount of time. |
46 | Multithreading | Multithreading allows your program to do things simultaneously. Here we'll make things print to the console from outside our main thread. |
47 | Semaphores | A major issue in multithreaded applications is that you need to make sure that they don't try to access the same data at the same time. Semaphores are a way to make sure only a certain amount of threads are performing an action at the same time. |
48 | Atomic Operations | Atomic operations are another way to synchronize threads. Here we'll be redoing the previous tutorial with atomic counters. |
49 | Mutexes and Conditions | Mutexes and conditions are yet another way to synchronize threads. Here we'll be using the added benefit that they allow threads to communicate with each other. |
50 | SDL and OpenGL 2 | SDL is a powerful tool when combined with OpenGL. If you're just starting out with OpenGL or want to maximize compatibility, you can use SDL with OpenGL 2.1. In this tutorial we will make a minimalist OpenGL 2.1 program. |
51 | SDL and Modern OpenGL | SDL 2.0 now has support for OpenGL 3.0+ with context controls. Here we'll be making a minimalist OpenGL 3+ core program. |