Architecture Discussion


Hello everyone,

Today we want to present to you, the technical structure of our project. 

MiroBoard: https://miro.com/app/board/uXjVKZGz5wo=/?share_link_id=273428512034



Legende

First, let's start with the legend that shows you what each of the following elements means.



Core Elements: GameManager & DataBus

As our core, we have two singletons, the GameManager and the DataBus. The DataBus is transported through all the game scenes and menus and transports the relevant data for the fight (difficulty, enemies of the selected dish, winning image). The GameManager takes this data at the start of the scene and saves it with a lot of other information, like the current player object or the current enemy. He is the main source of truth for the game where every other element takes their needed information. 



Player

The players logic is encapsulated in three main scripts: the PlayerHealthScript (Health and Knockback Management), the PlayerMovementScript (Walking and Jumping Management), and the PlayerActionScript (Hitting, Blocking, and Item Management). Every one of them handles exactly one major aspect of the player. If one of their functionalities requires a matching animation, they all call the PlayerAnimationScript, which handles the animations (which can interrupt which one and how to do that.


Enemy

The enemy logic is like the player's logic, split into multiple small scripts. This helps to keep the code reusable, modular, and adaptive too. Here, the enemy has some essential scripts (these are part of almost every enemy) and other optional scripts. Most of these scripts are self-explanatory, but maybe some of them need a bit of explanation:

  • Enemy Data Script: Data about the name of the enemy and if the player has already seen it. (important for the dish selection (black&white/colored) coloring of the enemy) 
  • Enemy Flip Script: Lets the enemy flip in the direction of the player. (It can be deactivated temporarily or permanently)
  • (Abstract) Enemy Attack Script: Handles the time between attacks and calls the more specific enemy script for the attacks.
  • Enemy Cutscene Script: Manages the spawning pattern of the enemy

Minions and Projectiles use some of these scripts too, but on a different scale and some changes.



GUI

All the GUI logic is managed through the GUI script, which takes the data from the GameManager to update the GUI elements. 


Ingame Menus

All the in-game menus handle themselves alone. Like in all the other menus outside the fight, there is a ButtonHandler script that manages which buttons can be pressed, which one is the first one, and which one navigates back (important for the back-hotkeys and switch between controller and keyboard navigation).

Get Cooking Souls

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

(+1)

Interesting breakdown of your game's technical structure! It's great to see how you've organized core elements like GameManager and DataBus, as well as the encapsulation of player and enemy logic into modular scripts. Looking forward to seeing more updates on Cooking Souls!