Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aermoss/forges
A simple 2D game engine written in Python with SDL2.
https://github.com/aermoss/forges
engine game-development game-engine ptyhon sdl sdl2
Last synced: 3 months ago
JSON representation
A simple 2D game engine written in Python with SDL2.
- Host: GitHub
- URL: https://github.com/aermoss/forges
- Owner: Aermoss
- License: mit
- Created: 2022-02-21T18:54:06.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-27T03:52:31.000Z (5 months ago)
- Last Synced: 2024-11-08T04:23:29.834Z (3 months ago)
- Topics: engine, game-development, game-engine, ptyhon, sdl, sdl2
- Language: Python
- Homepage:
- Size: 1.1 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ForgeS[DL] Engine
A simple 2D game engine written in Python with SDL2.## Getting Started
1) Install Python
2) Open cmd/terminal and type:```
pip install forges
```## Examples
# Creating a window
``` python
from forges import *class Window(forges.Window):
def __init__(self):
super().__init__()def update(self):
passdef on_quit(self):
passdef run(self):
forges.run()if __name__ == "__main__":
window = Window()
window.run()
```# Creating a cube
``` python
from forges import *class Cube(Entity):
def __init__(self):
super().__init__()self.center()
def update(self):
passclass Window(Window):
def __init__(self):
super().__init__()self.cube = Cube()
def update(self):
passdef on_quit(self):
passdef run(self):
forges.run()if __name__ == "__main__":
window = Window()
window.run()
```