Skip to content

JohnGroot/GrootSystems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Groot Game Framework Systems

A collection of production-ready Unity game systems showcasing clean architecture, performance optimization, and modern C# patterns.

Overview

This repository contains reusable game systems I've developed over the years for various Unity projects

Systems

Production-ready save/load system with data-first loading architecture

  • Multi-scope persistence (Global/Level)
  • Subsystem organization
  • Auto-save coordination
  • Transaction-based saves

Flexible transaction-based inventory with operations, modifiers, and constraints

  • Item definitions & instances
  • Composable operations
  • Transaction atomicity
  • Constraint validation
  • Event batching

🖼️ UI Framework

Runtime UI builder with component-based architecture that extends Unity's IMGUI system

  • Resource management
  • Layout system
  • Lifecycle management

🛠️ Utilities

Common utilities and extensions

  • Math utilities
  • Debug wrappers
  • Serialization (SimLang format)
  • Extension methods

External Dependencies

Required:

  • UniTask (Cysharp.Threading.Tasks): Used extensively in the SaveSystem for efficient async/await operations. The SaveSystem will not compile without it.
    • Installation: Add via Unity Package Manager using git URL: https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask

Optional:

  • Odin Inspector (Sirenix.OdinInspector): Provides enhanced editor inspectors and serialization. Used primarily in editor scripts.
    • Installation: Available on the Unity Asset Store
    • If not installed, remove #if ODIN_INSPECTOR preprocessor blocks or define symbols

Usage

Each system is documented in its respective README with:

  • Architecture overview
  • Usage examples
  • Performance characteristics
  • Design decisions
  • API reference

Start with any system based on your needs - they're designed to work independently or together.

Code Samples

Save System

// Auto-loads global data on init
await SaveManager._Instance.InitAsync();

// Save with dirty tracking
MarkDirty();
await SaveManager._Instance.SaveDirtyScopeAsync(SaveScope.Global);

Inventory System

// Atomic transaction
var transaction = new InventoryTransaction();
transaction.AddOperation(new SubtractValueOperation(ItemIDs.GOLD, 100));
transaction.AddOperation(new AddValueOperation(ItemIDs.SWORD, 1));
inventory.ExecuteTransaction(transaction);

Core Architecture

// Cached component access - no GetComponent calls
public class MyComponent : MonoBehaviourHeavy
{
    void Update()
    {
        _Transform.position += Vector3.forward * Time.deltaTime;
        _Rigidbody.AddForce(Vector3.up);
    }
}

License

MIT License - see LICENSE file for details.

These systems are provided as portfolio samples demonstrating production-quality Unity development. Feel free to use, modify, and learn from this code.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors