https://github.com/ssloy/sdl2-demo
sdl2 platformer game blank repository
https://github.com/ssloy/sdl2-demo
Last synced: about 1 month ago
JSON representation
sdl2 platformer game blank repository
- Host: GitHub
- URL: https://github.com/ssloy/sdl2-demo
- Owner: ssloy
- License: wtfpl
- Created: 2021-09-12T19:15:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-22T12:40:28.000Z (over 3 years ago)
- Last Synced: 2025-04-05T13:23:14.663Z (2 months ago)
- Language: C++
- Size: 1.78 MB
- Stars: 49
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# A blank for a SDL2-based platformer game
Attention, this repository does not contain (and never will) a playable game. The goal is to show basic principles to my students, so it is only a demo repo. Here is an example of what is inside:
**[Check the wiki](https://github.com/ssloy/sdl2-demo/wiki) for the detailed description of how the project is built.**
At the moment of this writing the repository contains less than 300 lines of code:
```sh
ssloy@khronos:~/sdl2-demo/src$ cat *.cpp *.h | wc -l
296
```# Compilation (tested on linux and windows, macos is yet to try)
```sh
git clone --recurse-submodules https://github.com/ssloy/sdl2-demo.git &&
cd sdl2-demo &&
mkdir build &&
cd build &&
cmake .. &&
cmake --build . -j &&
./sdl2-demo
```You can open the project in Gitpod, a free online dev environment for GitHub:
[](https://gitpod.io/#https://github.com/ssloy/sdl2-demo)
On open, the editor will compile & run the program as well as open the resulting image in the editor's preview.
Just change the code in the editor and rerun the script (use the terminal's history) to see updated images.
Note how awesome Gitpod is, it allows to run SDL2 games directly in the browser!