Skip to content

Turn-Based Toolkit for Unity: A versatile framework designed to streamline the development of turn-based games in Unity. Featuring a state-driven architecture, intuitive player and AI controllers, and flexible game management components, this toolkit empowers developers to create engaging and dynamic turn-based gameplay experiences with ease.

License

Notifications You must be signed in to change notification settings

DeanAviv/unity-turn-base-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Turn-Based Toolkit

A modular and extensible framework for building turn-based games in Unity, featuring a clean state-driven architecture, intuitive input handling, and built-in support for Dependency Injection via Zenject.


✨ Features

  • 🔁 Turn-based round controller
  • 🧠 AI and player turn state system
  • 💡 State-driven design using abstract classes/interfaces
  • 🧩 Plug-and-play architecture with Zenject support
  • 🎯 Great for tactical RPGs, board games, or mini-games

📦 Installation

  1. Clone or download the repository
  2. Import the scripts into your Unity project
  3. Set up the game objects and turn manager prefab
  4. (Optional) Add a Zenject SceneContext and bind your dependencies

🛠️ Usage Example

Create a custom player state:

public class PlayerTurnState : TurnState
{
    public override void Enter()
    {
        Debug.Log("Player's Turn Begins!");
        // Handle player input here
    }

    public override void Exit()
    {
        Debug.Log("Player's Turn Ends.");
    }
}

Use the turn manager to transition:

_turnManager.SetState(new PlayerTurnState());

📁 Structure Overview

TurnBaseToolkit/
├── TurnManager.cs
├── TurnState.cs
├── PlayerTurnState.cs
├── EnemyTurnState.cs
├── TurnContext.cs
└── Installer.cs (for Zenject)

🧩 Zenject Integration

If you're using Zenject:

public class GameInstaller : MonoInstaller
{
    public override void InstallBindings()
    {
        Container.Bind<TurnManager>().AsSingle();
        Container.Bind<ITurnState>().To<PlayerTurnState>().AsTransient();
    }
}

🔍 Use Cases

  • Tactical RPGs (e.g., Fire Emblem style)
  • Board games and chess-like logic
  • Puzzle games with enemy phases

📸 Screenshots / GIFs

Coming soon!


📄 License

MIT © Dean Aviv

About

Turn-Based Toolkit for Unity: A versatile framework designed to streamline the development of turn-based games in Unity. Featuring a state-driven architecture, intuitive player and AI controllers, and flexible game management components, this toolkit empowers developers to create engaging and dynamic turn-based gameplay experiences with ease.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages