This repository contains a Python port of a game originally developed in C/C++ using SDL3.
The original project can be found here: constref/sdl3-gamedev
- The original game is written in C/C++ with SDL3.
- This version reimplements the game logic and functionality in Python.
- The port aims to preserve the gameplay and feel of the original while taking advantage of Python’s simplicity and flexibility.
- Complete game logic reimplemented using Python and SDL3 bindings.
- Faithful recreation of the original gameplay mechanics.
- Newly added features in the Python port:
- Infinite gameplay – the game continues endlessly, offering replay value.
- Player HP and Enemy HP system for combat dynamics.
- Random terrain generation on every run to increase replayability.
- 4 background music tracks – switchable.
- Extended control scheme:
A– Move backwardD– Move forwardJ– Fire weaponK– JumpF11– Toggle fullscreenF12– Open debug windowF10– Choose debug mode
- Easier to customize and extend due to Python’s high-level nature.
-
Install required dependencies (using
pip,pipx, or your preferred method):sdl3sdl3.SDL_imagesdl2.sdlmixerctypesglmnumpy
-
Run the game:
python3 game.py
-
Troubleshooting:
- If the game fails to run, check that all dependencies are installed and their paths are properly set in your environment variables.
- SDL-related libraries may require additional setup depending on your operating system.
This project is licensed under the MIT License.