Sgemu
A simple pure-python game engine
Install / Use
/learn @alexcher-im/SgemuREADME
Sgemu rendering engine
Rendering engine in pure python. In development.
Features
- Pure Python + GLSL, using OpenGL 4.3
- Both Blinn-Phong and PBR (Physically-Based Rendering) lighting
- Point lights, Area lights (using Linearly transformed cosines method)
- HDR, Bump mapping, Volumetric fog (cone-shaped primitives)
- Bloom, DOF (Depth Of Field)
- Spatial audio, using OpenAL
- UI library for HUD displays (not used in main.py, shown in gui_t.py)
Running
git clone https://github.com/alexcher-im/sgemu
cd sgemu
pip install -r requirements.txt
git clone https://github.com/KhronosGroup/glTF-Sample-Models
python3 main.py
There may be a pyassimp bug with ctypes structure size (pyassimp v4.1.4), it is already fixed, but still not in PyPi repos. If so, you need to fix this manually or use older assimp dll.
To fix you need to find class String, field length (file structs.py, line 79) and change c_size_t to c_uint32 in pyassimp source code.
Controls for main.py
WASD to move forward, left, backwards and right
arrow up and arrow down to move up and down
shift, ctrl, ctrl+shift to increase moving or DOF cutoff change speed by 10, 100 and 1000 respectively
Q and R to roll the camera
T and Y to change Depth Of Field cutoff length
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
