How tychohenzen/searchitbreakher works
Project type and purpose
• This is a desktop voxel‐based game (“BreakerGame”) built on the MonoGame framework.
• It consists of three .NET projects:
• SearchitBreakher: The main game application, containing the game loop, input handling, and orchestration of rendering.
• SearchitLibrary: A shared library encapsulating core voxel data structures, chunk management, and low-level graphics primitives.
• SearchitTest: A unit test suite validating library functionality (voxel parsing, chunk management, camera math, etc.).
File structure
• Top‐level solution (SearchitBreakher.sln) ties together the three projects.
• SearchitBreakher/
• Program.cs, BreakerGame.cs: Entry point & game core.
• Graphics/: High-level renderers (VoxelRenderer, TriangleRenderer, ChunkRendererManager, MonoGameCamera).
• Content/: MGCB pipeline assets (fonts, .gox voxel chunks).
• SearchitLibrary/
• Graphics/: Core data types and utilities (Voxel, ChunkLoader, VoxelChunkManager, VoxelShader).
• Constants.cs, Helpers.cs: Shared constants and math/helper functions.
• SearchitTest/: Unit tests targeting SearchitLibrary classes and behaviors.
README (empty)
• .csproj references MonoGame.Framework for SearchitBreakher.
• MGCB content pipeline file → assets feeding into renderers.
• SearchitLibrary is referenced by both the game and the tests.
Main components & interactions
a. Components
1. Game Application (SearchitBreakher)
– Game loop & input subsystem
– High-level rendering controllers
2. Core Library (SearchitLibrary)
– Voxel data model
– Chunk loading & management
– Camera math & transformation utilities
3. Content Pipeline
– MGCB tool processing .vox (.gox) files & spritefonts
4. Rendering Subsystem
– MonoGame.Graphics (underlying framework)
– Custom shaders (VoxelShader)
5. Unit Test Suite (SearchitTest)
– Validates library correctness
b. Relationships / Data Flow
• Game App → loads assets via Content Pipeline → passes raw data to Library’s ChunkLoader.
• Library builds VoxelChunks, manages them via VoxelChunkManager.
• Game App’s renderers (ChunkRenderer, VoxelRenderer, TriangleRenderer) consume chunk data + shaders.
• MonoGameCamera transforms world coordinates to screen space for the renderer.
• Tests invoke Library APIs in isolation: no MonoGame dependency.
c. Architectural patterns
– Modular separation: core logic in a class library, UI/render loop in the executable.
– Dependency inversion: game depends on abstractions in SearchitLibrary.
– Content pipeline separation: assets precompiled at build time.
d. Key technologies
– .NET Core / .NET Framework
– MonoGame.Framework
– MGCB content pipeline
– Custom HLSL shaders (VoxelShader)
– NUnit/xUnit/MSTest (depending on csproj) for unit tests