AERengine is a modular voxel game engine built from scratch in C#
A Minecraft-like voxel game with destruction mechanics, chunk-based world generation, and a powerful addon system.
- ✅ Voxel World System: Chunk-based world (16x16x16 voxels per chunk)
- ✅ Voxel Destruction & Placement: Left-click to destroy, right-click to place blocks
- ✅ First-Person Camera: WASD movement with mouse look
- ✅ Modular Addon System: Plugin architecture for extending functionality
- ✅ Event System: Event-driven communication between engine and addons
- ✅ OpenGL Rendering: Efficient mesh generation with greedy meshing
- ✅ Multiple Block Types: Grass, Dirt, Stone, Sand, Wood, Leaves, Water
- WASD: Move forward/backward/left/right
- Space: Move up
- Left Shift: Move down
- Mouse: Look around
- Left Click: Destroy block
- Right Click: Place block
- ESC: Exit game
/Core/ - Core engine systems (Engine, Events, Addons)
/Voxel/ - Voxel system (Blocks, Chunks, World)
/Rendering/ - Rendering system (Camera, Renderer)
/Input/ - Input management
/Addons/ - Addon system and sample addons
/SampleAddons/ - Example addons
/Render/ - Legacy rendering code (kept for compatibility)
dotnet restore
dotnet builddotnet runAddons extend the game functionality. Here's how to create one:
- Create a new class that implements
IAddonor extendsBaseAddon:
usingAERengine.Core;usingAERengine.Addons;namespaceMyCustomAddon;publicclassMyAddon:BaseAddon{publicoverridestringId=>"my-addon";publicoverridestringName=>"My Custom Addon";publicoverridestringVersion=>"1.0.0";publicoverridevoidOnLoad(Engineengine){base.OnLoad(engine);// Subscribe to eventsSubscribeToEvent("VoxelDestroyed",OnVoxelDestroyed);Console.WriteLine("My addon loaded!");}privatevoidOnVoxelDestroyed(GameEventevt){Console.WriteLine("A voxel was destroyed!");}publicoverridevoidOnUpdate(floatdeltaTime){// Update logic here}}- Compile your addon as a DLL and place it in the
./Addonsdirectory - Run the game - your addon will be automatically loaded!
The included CustomBlockAddon demonstrates:
- Event subscription (VoxelDestroyed, VoxelPlaced, WorldInitialized)
- Tracking game statistics
- Triggering custom events
- Lifecycle management
Available events:
WorldInitialized- Triggered when the world finishes initializationVoxelDestroyed- Triggered when a voxel is destroyed- Data:
position(int, int, int)
- Data:
VoxelPlaced- Triggered when a voxel is placed- Data:
position(int, int, int),blockType(BlockType)
- Data:
- Language: C# (.NET 6.0)
- Graphics API: OpenGL 4.6 (via OpenTK)
- Future: Vulkan support planned (Silk.NET.Vulkan)
- Architecture: Modular, event-driven design
- Rendering: Greedy meshing for efficient voxel rendering
- OpenTK 4.7.2
- Silk.NET.Vulkan 2.17.1 (for future Vulkan support)
- System.Numerics.Vectors 4.5.0
- Newtonsoft.Json 13.0.3
- Full Vulkan renderer implementation
- Infinite world generation
- Texture support
- Lighting system
- Multiplayer support
- Save/Load world data
- More block types
- Crafting system
- Inventory system
This is a learning project. Feel free to use and modify as needed.
Note: This project demonstrates game engine architecture, voxel rendering, and plugin systems. It's a foundation that can be extended with more features!