https://github.com/francis-clairicia/pydiamond
PyDiamond engine is a game engine for Python game developers.
https://github.com/francis-clairicia/pydiamond
game game-development game-engine game-engine-2d pygame pygame-library python python3
Last synced: 11 months ago
JSON representation
PyDiamond engine is a game engine for Python game developers.
- Host: GitHub
- URL: https://github.com/francis-clairicia/pydiamond
- Owner: francis-clairicia
- License: gpl-3.0
- Created: 2021-07-18T22:00:21.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-07-07T19:31:43.000Z (about 1 year ago)
- Last Synced: 2025-07-07T22:07:44.911Z (about 1 year ago)
- Topics: game, game-development, game-engine, game-engine-2d, pygame, pygame-library, python, python3
- Language: Python
- Homepage:
- Size: 46.3 MB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyDiamond
[](https://github.com/francis-clairicia/PyDiamond/actions/workflows/build.yml)
[](https://github.com/francis-clairicia/PyDiamond/actions/workflows/test.yml)
[](https://github.com/francis-clairicia/PyDiamond/actions/workflows/lint.yml)
[](https://github.com/pre-commit/pre-commit)
[](https://results.pre-commit.ci/latest/github/francis-clairicia/PyDiamond/main)
[](https://pypi.org/project/pydiamond-engine/)
[](https://github.com/francis-clairicia/PyDiamond/blob/main/LICENSE)

[](http://mypy-lang.org/)
[](https://github.com/psf/black)
[](https://pycqa.github.io/isort/)
PyDiamond engine is a game engine for Python game developers.
The framework uses the popular [pygame library](https://github.com/pygame/pygame/).
## Installation
The installation can be done using `pip`:
```
pip install pydiamond-engine
```
## Usage
Example with the minimal requirements:
```py
from pydiamond.window.display import Window
def main() -> int:
w: Window = Window(title="my window", size=(800, 600))
with w.open():
while w.loop():
for event in w.process_events():
# do some stuff
pass
w.clear()
# draw your objects
w.refresh()
return 0
if __name__ == "__main__":
exit(main())
```
This code will open a small window.
### Documentation
Coming soon. :)
## Development
### Dependencies
PyDiamond is developed based on pygame and Python (obviously). In addition, some features of pygame are available with a specific version of the SDL.
Dependency version:
- CPython >= 3.10
- pygame == 2.1.2
- SDL >= 2.0.16 (vendored in pygame)
- SDL_image >= 2.0.0 (vendored in pygame)
- SDL_mixer >= 2.0.0 (vendored in pygame)
- Other python dependencies referred by `pyproject.toml`
### Setup
Use the following command to install all the necessary dependencies
```sh
python -m devtools repo
```
## Credits
### Vendored-in packages
- [Gradient](https://www.pygame.org/project-gradients-307-.html) module by DR0ID
- [OrderedSet](https://github.com/rspeer/ordered-set) collection by rspeer
## License
This project is licensed under the terms of the [GNU General Public License v3.0](https://github.com/francis-clairicia/PyDiamond/blob/main/LICENSE).