Home Contact Me Tutorials

SDL2 C++ Base Code



Note: This document is for SDL 2.
For the SDL 1.2 version, click here.

SDL2 example that allows user to move an object using arrow keys. This is meant to be used as a convenient single-file starting point for more complex projects.

Code is now hosted at https://github.com/andrew-lim/sdl2-boilerplate

Here is a screenshot of what the program looks like when it runs: