Skip to content

TLBail/MinecraftCloneSilk

Repository files navigation

wakatime

MinecraftCloneSilk

MinecraftCloneSilk is a project aimed at recreating the famous game Minecraft using Silk.NET, a powerful C# library that interfaces with OpenGL for graphics rendering.

Build

Use the following command to compile the project in release mode for Windows 64-bit, creating a single, self-contained file:

dotnet publish -r win-x64 /p:PublishSingleFile=true --self-contained -c release /p:trim=true

Architecture

The project utilizes an Entity-Component-System (ECS) architecture, which enhances modularity and ease of maintenance. It is divided into several modules:

Benchmark: This module tests different approaches and evaluates their performance to select the fastest and most effective solutions. App: The main module containing the game and its core functionalities. UnitTest: This module includes unit tests to ensure the proper functioning of different game components, with or without running the game in the background. ResourceGenerator: A C# source generator dedicated to creating paths to resources (Assets), thus improving the efficiency of resource loading in the game.

Controles

Basic commands for navigating in the game are:

ZQSD: Move the character. T: Activate chat to enter commands. E: Open inventory. F1: Toggle mouse activation/deactivation.

In-Game Commands

For a complete list of available commands, type /help in the game chat.

Sauvegarde

World data (chunks) are stored in the currentFolder/Worlds/newWorld directory. Using LMDB (Lightning Memory-Mapped Database) optimizes file size and efficiently bundles chunks into a single file.

Son

Sound is handled via OpenAL and stored as .ogg files in currentFolder/Assets/Sounds, using the NVorbis library for decoding.

Profiling

in debug mode, methods annotated with [Timer] are profiled. Results are saved in currentFolder/trace.json and can be viewed by opening this file in chrome://tracing.

Crédits

A big thank you to LearnOpenGL

Photo

capture

Vidéo

Watch the video

About

minecraft clone with Silk.NET

Resources

License

Stars

Watchers

Forks

Packages

No packages published