https://github.com/libsdl2pp/libsdl2pp-tutorial
Tutorial for libSDL2pp, C++11 bindings/wrapper for SDL2
https://github.com/libsdl2pp/libsdl2pp-tutorial
c-plus-plus lesson libsdl2pp sdl sdl2 tutorial
Last synced: about 2 months ago
JSON representation
Tutorial for libSDL2pp, C++11 bindings/wrapper for SDL2
- Host: GitHub
- URL: https://github.com/libsdl2pp/libsdl2pp-tutorial
- Owner: libSDL2pp
- License: cc0-1.0
- Created: 2015-03-20T11:52:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-10-24T16:29:34.000Z (almost 3 years ago)
- Last Synced: 2024-03-27T11:17:56.036Z (over 1 year ago)
- Topics: c-plus-plus, lesson, libsdl2pp, sdl, sdl2, tutorial
- Language: C++
- Size: 74.2 KB
- Stars: 78
- Watchers: 3
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# libSDL2pp tutorial
[](https://travis-ci.org/libSDL2pp/libSDL2pp-tutorial)
---

Here's tutorial for [libSDL2pp](https://github.com/libSDL2pp/libSDL2pp),
C++11 bindings/wrapper for SDL2. It covers core functionality of
the library, including initialization and window construction,
loading image files, sprite and text rendering, animation, and event
handling trying to demonstate library features in as little code
as possible.## Lessons
The tutorial is split into lessons, which demonstrate gradual
development of a simple application resembling a platformer game.* **[lesson00](lesson00.cc)**: SDL library initialization, window creation, image loading and rendering
* **[lesson01](lesson01.cc)**: picking specific sprite from an image atlas
* **[lesson02](lesson02.cc)**: main loop, event processing
* **[lesson03](lesson03.cc)**: timing and animation
* **[lesson04](lesson04.cc)**: keyboard control
* **[lesson05](lesson05.cc)**: texture generation
* **[lesson06](lesson06.cc)**: alpha blending and color modulation
* **[lesson07](lesson07.cc)**: text renderingEach lesson adds some lines to the code and, thus, functionality
to the application. You can explore these lessons sequentially
starting from the first one (in which you might find e.g. ```git
diff lesson00.cc lesson01.cc``` helpful to see what was added by
the next lesson), or just jump straight to the last one and see
all bits at once.## Building
To build executables from these lessons, you need **cmake**, **SDL2**,
**SDL2_image** and **SDL2_ttf** libraries and corresponding development
files.To build the tutorial, run
cmake . && make
which will produce a set of binaries: lesson00 .. lesson07.
## Author
* [Dmitry Marakasov](https://github.com/AMDmi3)
## License
Lesson code is licensed under [CC0](COPYING). Bundled data files
have separate licenses, see COPYRIGHT files under data/.