{"id":29001717,"url":"https://github.com/libsdl2pp/libsdl2pp-tutorial","last_synced_at":"2025-08-25T01:36:05.210Z","repository":{"id":29053343,"uuid":"32581067","full_name":"libSDL2pp/libSDL2pp-tutorial","owner":"libSDL2pp","description":"Tutorial for libSDL2pp, C++11 bindings/wrapper for SDL2","archived":false,"fork":false,"pushed_at":"2022-10-24T16:29:34.000Z","size":76,"stargazers_count":78,"open_issues_count":2,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-27T11:17:56.036Z","etag":null,"topics":["c-plus-plus","lesson","libsdl2pp","sdl","sdl2","tutorial"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libSDL2pp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-20T11:52:47.000Z","updated_at":"2024-03-10T02:09:42.000Z","dependencies_parsed_at":"2023-01-14T14:02:24.649Z","dependency_job_id":null,"html_url":"https://github.com/libSDL2pp/libSDL2pp-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/libSDL2pp/libSDL2pp-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libSDL2pp%2FlibSDL2pp-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libSDL2pp%2FlibSDL2pp-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libSDL2pp%2FlibSDL2pp-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libSDL2pp%2FlibSDL2pp-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libSDL2pp","download_url":"https://codeload.github.com/libSDL2pp/libSDL2pp-tutorial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libSDL2pp%2FlibSDL2pp-tutorial/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261841968,"owners_count":23217920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","lesson","libsdl2pp","sdl","sdl2","tutorial"],"created_at":"2025-06-25T09:12:02.729Z","updated_at":"2025-06-25T09:12:03.494Z","avatar_url":"https://github.com/libSDL2pp.png","language":"C++","readme":"# libSDL2pp tutorial\n\n[![Build Status](https://travis-ci.org/libSDL2pp/libSDL2pp-tutorial.svg?branch=master)](https://travis-ci.org/libSDL2pp/libSDL2pp-tutorial)\n\n---\n\n![Screenshot](screenshots/lesson07.png)\n\nHere's tutorial for [libSDL2pp](https://github.com/libSDL2pp/libSDL2pp),\nC++11 bindings/wrapper for SDL2. It covers core functionality of\nthe library, including initialization and window construction,\nloading image files, sprite and text rendering, animation, and event\nhandling trying to demonstate library features in as little code\nas possible.\n\n## Lessons\n\nThe tutorial is split into lessons, which demonstrate gradual\ndevelopment of a simple application resembling a platformer game.\n\n* **[lesson00](lesson00.cc)**: SDL library initialization, window creation, image loading and rendering\n* **[lesson01](lesson01.cc)**: picking specific sprite from an image atlas\n* **[lesson02](lesson02.cc)**: main loop, event processing\n* **[lesson03](lesson03.cc)**: timing and animation\n* **[lesson04](lesson04.cc)**: keyboard control\n* **[lesson05](lesson05.cc)**: texture generation\n* **[lesson06](lesson06.cc)**: alpha blending and color modulation\n* **[lesson07](lesson07.cc)**: text rendering\n\nEach lesson adds some lines to the code and, thus, functionality\nto the application. You can explore these lessons sequentially\nstarting from the first one (in which you might find e.g. ```git\ndiff lesson00.cc lesson01.cc``` helpful to see what was added by\nthe next lesson), or just jump straight to the last one and see\nall bits at once.\n\n## Building\n\nTo build executables from these lessons, you need **cmake**, **SDL2**,\n**SDL2_image** and **SDL2_ttf** libraries and corresponding development\nfiles.\n\nTo build the tutorial, run\n\n    cmake . \u0026\u0026 make\n\nwhich will produce a set of binaries: lesson00 .. lesson07.\n\n## Author\n\n* [Dmitry Marakasov](https://github.com/AMDmi3) \u003camdmi3@amdmi3.ru\u003e\n\n## License\n\nLesson code is licensed under [CC0](COPYING). Bundled data files\nhave separate licenses, see COPYRIGHT files under data/.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibsdl2pp%2Flibsdl2pp-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibsdl2pp%2Flibsdl2pp-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibsdl2pp%2Flibsdl2pp-tutorial/lists"}