A 2D game engine written in V, built as a project to explore game engine internals and understanding how it works under the hood.
mv takes heavy inspiration from Godot's design - scene trees, node composition, canvas layers, animation players - reimplemented from scratch in a fast, simple, compiled language.
- Scene tree: Godot-inspired node hierarchy with propagation, notifications, and tree manipulation
- Scene save / load: JSON-based scene persistence with a typed
SceneRegistry; save and reload live scene trees at runtime - Transform system: matrix stack-based 2D transforms with
CameraNodeandDrawLayersupport - Physics:
SpatialHashbroad phase, AABB / circle / capsule shapes,move_and_slideandmove_and_collidefor kinematic bodies - Input map: action-based input mapping with
StringName-interned keys - Audio: multi-bus
AudioServerwith background thread, Raylib audio and PXTone music sources - Animation: generic keyframe tracks, easing library, call events, and ping-pong loop support
- Scene instancing: Godot-style scene references; a node subtree saved as its own file can be instantiated by reference inside another scene, with per-instance overrides for position, scale, and rotation
- Wren scripting: embedded scripting via Wren with foreign class bindings for nodes, transforms, input, and Raylib draw calls; supports entry-script scenes and V-node script attachment
- Resource management: rres-backed asset loading for textures, fonts, and data
- Serialisation:
typeinfotype registry with JSON encoder / decoder;serdefield walker using@[export]struct attributes
Besides V for building, the project depends on vlang/raylib to provide bindings for Raylib.
| Project | Role |
|---|---|
| V | Implementation language |
| Raylib | Core framework |
| Wren | Embedded scripting language (with bindings by larpon) |
| rres | Resource packaging format |
| libmpxtn | PXTone file playback |
| cute_c2 | Collision detection routines |
| Godot Engine | Architectural inspiration |
Currently still early into development. Functional, although the API itself will be subject to change.
Unless otherwise stated, mv is licensed under the zlib License.