System Architecture - azya404/SUNSET16 GitHub Wiki

CORE_PERSISTENT MANAGERS drawio

GameManager

  • single point of control for the game state
  • should __init all other managers on start up
  • coordinates high level game flow (e.g main menu -> cutscene -> gameplay -> ending)
  • provide access points for other systems/sub systems to communicate

im visualizing it in the assets/scripts/core/ as a GameManager.cs (Undecided as The other subsystems still need to be planned)

[TO ADD DEMO SCRIPT HERE] AND COMMENTS

  • in terms of scenes, it would live in the core scene (never unloaded, always there aka persistent)

  • for game object an empty one named the same in the core scene heirrachy

  • and the script will be attached to that object

  • THIS HAS TO BE A SINGLETON (mainly to make sure there is only one gamemanager gloabbaly in existsnce)

  • need to find something that ensures it satys alive between scene transitions

  • Dependancy injection wise, it should provide references to other managers instead of having systems finding eahc other by themsleves

Timeline wise: created first, initialized eveyrhting else
first thing that runs when game starts

// intergation points GameManager.Instance.StartNewGame(); //how other scripts could access it GameManager.Instance.TriggerEnding(true);

need to brain storm tests soon