MauryDev.KoGaMa.Utils
1.0.0
dotnet add package MauryDev.KoGaMa.Utils --version 1.0.0
NuGet\Install-Package MauryDev.KoGaMa.Utils -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MauryDev.KoGaMa.Utils" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MauryDev.KoGaMa.Utils" Version="1.0.0" />
<PackageReference Include="MauryDev.KoGaMa.Utils" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MauryDev.KoGaMa.Utils --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MauryDev.KoGaMa.Utils, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MauryDev.KoGaMa.Utils@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MauryDev.KoGaMa.Utils&version=1.0.0
#tool nuget:?package=MauryDev.KoGaMa.Utils&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MauryDev.KoGaMa.Utils
A specialized utility library designed for parsing, unpacking, and managing binary data associated with KoGaMa world objects and runtime events. This project focuses on high-performance binary deserialization using a custom Big Endian implementation.
🚀 Technical Specifications
- Framework: .NET 10.0
- Language: C# 14.0
- Architecture: Binary Stream Processing
📁 Project Structure
🛠️ Memory Management (/Memory)
Low-level primitives for handling binary data streams.
BytePacker: A wrapper aroundStreamandBinaryReaderthat ensures data is read in Big Endian format. It includes helper methods forInt32,Int16,Single,Double, and specialized 7-bit encoded integers for strings.ByteUnpacker: The counterpart toBytePacker, allowing the creation of binary streams in Big Endian format.
📦 KoGaMa Data Models (/KoGaMaData)
High-level representations of game world entities.
Handler: The main entry point for deserializing a full data set. It coordinates the reading of prototype data, world objects, links, and runtime events.MVWorldObject: Represents an object instance in the world, containing transformation data (Position, Rotation, Scale), IDs, and dynamicRuntimeDatastored as HashTables.MVPrototypeData&MVCube: Define the geometric blueprints of objects.MVCubeincludes logic for handling shared corner and material data to optimize space.MVLink&MVObjectLink: Manage connections between different world objects.IntVector: A lightweight struct for 3D integer coordinates.
⚡ Runtime Event System (/KoGaMaData)
A factory-based system for processing dynamic game events.
BaseRuntimeEvent: Abstract base class for all events, providing common properties likeEventTypeandPosition.RuntimeEventFactory: Implements the Factory Pattern to instantiate the correct event class (e.g.,ExplosionEventorSingleCubeFineGrainedEvent) based on a type identifier read from the stream.RuntimeEventType&RuntimeEventObjectType: Enums that categorize the vast array of possible game events.
📚 Collections & Extensions (/KoGaMaData/Collections)
Specialized logic for complex data structures.
BytePackerExtensions: ExtendsBytePackerto support the reading of complex HashTables and generic arrays. It usesHashtableDataTypeto determine how to deserialize values dynamically.HashtableDataType: Defines the supported types within a binary HashTable (Int32, Single, String, Boolean, Nested HashTables, etc.).
🛠️ Usage Example
Reading World Data
using MauryDev.KoGaMa.Utils.Memory;
using MauryDev.KoGaMa.Utils.KoGaMaData;
// Open the binary stream
using var stream = File.OpenRead("world.dat");
var packer = new BytePacker(stream);
var handler = new Handler(packer);
// Parse all data
handler.Read();
Reading a Custom HashTable
using MauryDev.KoGaMa.Utils.KoGaMaData.Collections;
// Assuming bp is an instance of BytePacker
Dictionary<object, object> data = bp.ReadHashTableFromBytePacker();
📝 Key Implementation Details
- Endianness: The project strictly adheres to Big Endian for numeric types to maintain compatibility with the target data source.
- Memory Efficiency: Uses
ReadOnlySpan<byte>inBytePackerto minimize allocations during numeric reads. - Extensibility: The
RuntimeEventFactoryallows for easy addition of new event types by adding a new enum member and updating the switch expression.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 107 | 5/30/2026 |