https://github.com/satvikg7/sdl2-game-template
SDL2 Starter Game Template implemented using OOPs Principles
https://github.com/satvikg7/sdl2-game-template
cpp game-template sdl2
Last synced: over 1 year ago
JSON representation
SDL2 Starter Game Template implemented using OOPs Principles
- Host: GitHub
- URL: https://github.com/satvikg7/sdl2-game-template
- Owner: SatvikG7
- License: gpl-3.0
- Created: 2022-06-09T04:39:24.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-09T04:49:44.000Z (about 4 years ago)
- Last Synced: 2025-01-22T20:27:20.115Z (over 1 year ago)
- Topics: cpp, game-template, sdl2
- Language: C++
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SDL2 Game Template
[](http://libsdl.org/)
## Introduction
This repository contains the template for a SDL2 project which does the following things:
- Implements Game loop for 60 fps
- Creates window
- Sets window icon and title
- Creates and Renders background texture
- Creates and Renders sprite
- Handles keypress events
## Requirements
- MinGW toolkit (g++) (required)
- Python (>=3.8.x) (optional)
## Libraries Required
- SDL2
- SDL_image
## How to compile?
1. Install and Extract
- SDL2 development libraries from https://libsdl.org/download-2.0.php
- Compiler specific development libraries of SDL_image from https://www.libsdl.org/projects/SDL_image/
2. Copy
- SDL2/bin/* to bin/debug/ and bin/release/
- SDL2/include/* to include/
- SDL2/lib/* to lib/
- SDL_image/bin/* to bin/debug/ and bin/release/
- SDL_image/include/* to include/
- SDL_image/lib/* to lib/
3. ```sh
make res
make run # to build and run debug executable
# or
make release # to build release executable
```
4. (Optional) You can make changes to generate_sprite.py files to make changes to sprite
```sh
python generate_sprite.py
make res
```
5. Feel free to open an issue in this repo if you get any error