This workspace contains a minimal 2D game engine and a visual editor built with Python's Tkinter (no external libraries). It's intentionally small but structured so you can extend it.
Files
main.py- entrypoint (launches editor)editor.py- Tkinter-based visual editor (place entities, edit properties, save/load, run)engine/core.py- Engine class that runs update/draw loop in a Tkinter windowengine/entity.py- Entity container with componentsengine/components.py- Basic Transform, Sprite, Physics componentsscene.py- Scene management and serialization
How to run
Run the editor:
python main.pyUsage
- Add entities in the left panel. Select them to edit position, sprite and physics.
- Save scenes as JSON and re-open them later.
- Click "Run Scene" to open a separate window running the scene.
Notes and next steps
- This is a starting point. Suggested improvements:
- Add image sprite support (PhotoImage)
- Add more components and a behavior scripting system
- Implement undo/redo and transform gizmos
- Add collision callbacks and tilemap support