Skip to content

kathankuchekar/Modular-Game-engine-using-JSON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Data-Driven Unity Mini-Game Engine using Unity Web Integrating.

A modular, data-driven game engine built in Unity. Instead of hardcoding game logic and level design, this engine reads a single JSON configuration file at runtime to determine which mini-game to load, what rules to apply, and how to populate the scene.

Features

JSON-Driven Architecture: Swap out a single text file to completely change the game type, rules, and content. Dynamic Scene Loading: Automatically routes players to the correct Unity scene based on the "gameType" parameter. Scalable Framework: Easily add new mini-games without altering the core engine routing logic.

How It Works

The engine relies on a three-part JSON structure to dictate the gameplay loop:

  1. "gameType" : A string identifier that tells the GameManager which Unity scene to load.
  2. "globalSettings" : Universal configurations applied to every game (e.g., master volume, multiplayer networking toggles).
  3. "gameSpecificData" : A flexible data block parsed specifically by the loaded scene's internal manager.

Supported Mini-Games (Examples)

Survey Trivia: A Family Feud-style quiz game where the JSON dictates the number of teams, rounds, and custom survey prompts. Platformer: A 2D/3D jumping game where the JSON controls enemy counts, map generation seeds, and player physics (jump force, speed). and many more to be added. Getting Started

Prerequisites Unity 6000.0.43f1 LTS (or newer) Newtonsoft.Json** package (Required for dynamic JSON parsing)

๐Ÿ“„ Example JSON Configuration

{
  "gameType": "SurveyTrivia",
  "globalSettings": {
    "gameTitle": "Main Stage Event",
    "enableMultiplayerNetworking": true
  },
  "gameSpecificData": {
    "numberOfTeams": 2,
    "pointsPerCorrectAnswer": 10,
    "questions": [
      {
        "prompt": "Name a popular game engine.",
        "surveyAnswers": [
          { "text": "Unity", "points": 50 },
          { "text": "Unreal", "points": 30 }
        ]
      }
    ]
  }
}

About

Submission for TapTap GameEngine Hackathon by Team Waffles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors