From a0eccdf1a216515b8fe3444edc6c083711f30d6e Mon Sep 17 00:00:00 2001 From: max Date: Tue, 24 Mar 2026 22:47:13 +0100 Subject: [PATCH] Added readme, removed thread sleep in render loop --- Core/Window.cs | 1 - README.md | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Core/Window.cs b/Core/Window.cs index 8472b99..b035d48 100644 --- a/Core/Window.cs +++ b/Core/Window.cs @@ -68,7 +68,6 @@ namespace Voxel.Core Renderer.Render(); SwapBuffers(); - Thread.Sleep(5); } protected override void OnFramebufferResize(FramebufferResizeEventArgs e) diff --git a/README.md b/README.md index e69de29..75fe1ed 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,18 @@ +# Voxel Engine Reference + +C# / OpenTK 4 Voxel Engine (Minecraft clone). + +## Core Systems +- **Rendering**: SSBO-based (Shader Storage Buffer Objects) for packed face data and GPU meshing. +- **Data**: 1D Flat arrays for blocks, bitwise indexing for speed. +- **Updates**: Dirty-flagging for chunk and neighbor mesh rebuilding. + +## Key Links +- [Collision & AABB](https://medium.com/@andrebluntindie/3d-aabb-collision-detection-and-resolution-for-voxel-games-5fcbfdb8cdb4) - Voxel-specific physics resolution. +- [Minecraft Jump Physics](https://www.mcpk.wiki/wiki/Jumping) - Movement constants and logic. +- [OpenTK Learn](https://opentk.net/learn/) - OpenGL bindings and setup. + +## Performance Notes +- Use `UpdateNeighborsAtBoundary` to mark adjacent chunks dirty. +- Call `RebuildDirtyChunks` at the end of the update loop. +- Avoid per-block `GL.BufferSubData` calls, batch into one SSBO update. \ No newline at end of file