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:
- "gameType" : A string identifier that tells the
GameManagerwhich Unity scene to load. - "globalSettings" : Universal configurations applied to every game (e.g., master volume, multiplayer networking toggles).
- "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)
{
"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 }
]
}
]
}
}