Sombra Engine
Small 3D Game Engine made in Python on top of the pyglet framework (work in progress).
The idea of this engine is:
- to be simple
- to run on lower end PCs
Planned features
- UI library with shaders support (through pudu-ui)
- 3D models through glTF format (and limited support for OBJ)
- OpenGL Renderer and GLSL shaders
- Skeletal animations
- Shadows
- Rigid body physics
- Terrain rendering
- Foliage
- Particle systems
- Water
- Smoke, Fire, GFX
- Pathfinding
Installing
You can get it with pip:
pip install sombra-engine
Example
Here is an example of loading a glTF file, setting an animation and creating a light
from pyglet.math import Vec3
import pyglet
from sombra_engine.models import SkeletalMesh
from sombra_engine.models.gltf import GLTFLoader
from sombra_engine import App
pyglet.resource.path.append("./tests/data/")
pyglet.resource.reindex()
app = App(is_debug=True)
if __name__ == '__main__':
scenes, skeletons, animations = GLTFLoader.load(
filename='CesiumMan.glb',
batch=app.batch
)
scene = scenes[0]
mesh = scene.meshes[0]
if isinstance(mesh, SkeletalMesh):
if mesh.animations:
animation_name = [k for k in mesh.animations.keys()][0]
mesh.set_animation(animation_name)
light_pos = Vec3(10.0, 8.0, 0.0)
light_color = Vec3(1.0, 1.0, 1.0)
scene.create_light(light_pos, light_color)
app.set_scene(scene)
app.run(0)
To run it locally you can download the repo and do:
uv sync
uv run main.py
Metadata
Release files for sombra-engine 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sombra_engine-0.2.0.tar.gz | 25.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sombra_engine-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 73.3 kB
Release files / sombra_engine-0.2.0.tar.gz
| Download URL | sombra_engine-0.2.0.tar.gz |
|---|---|
| Size | 25.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77f95e0dd41c93110e4af0289027a3c6b618b0b2cc208200c9fdc8e6594b7f39
|
|
BLAKE2b-256 checksum How to use checksums |
acfdef3a8b49dedfb2456acfaca044de69c628b235274ff5cf4e3936934bd9fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / sombra_engine-0.2.0-py3-none-any.whl
| Download URL | sombra_engine-0.2.0-py3-none-any.whl |
|---|---|
| Size | 47.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c6c7b658604f9d81fd22c0c9c31ceef328b5f905bceb82aa89009476fc8d59a
|
|
BLAKE2b-256 checksum How to use checksums |
69c6a7cb4d9f8e2eb6ecdb85d4f8a202930ee321c6f92433dee30f976b8e07c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|