Stark/TLJ Design notes

From ScummVM :: Wiki
< Stark
Revision as of 11:43, 14 October 2020 by Aquadran (talk | contribs) (Created page with "==Design notes== The engine was designed trying to follow the Single Responsibility Principle. ===Parts=== The engine is split in high level parts : * The game world: The res...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Design notes

The engine was designed trying to follow the Single Responsibility Principle.

Parts

The engine is split in high level parts :

  • The game world: The resources used to assemble the scenes
  • The user interface: The screens presented to the player in the menus and in game
  • The services: Globally available singleton, and mostly stateless objects used to manage the game state.
  • The file format readers
  • The rendering code

Services

Some notable services are :

  • GameInterface: Facade object exposing high level operations to manipulate the game world from the other parts of the engine. Example: Using an inventory item on a scene item, or telling April to move to a set of coordinates.
  • UserInterface: Facade object exposing high level operations to manipulate the user interface from other parts of the engine. Example: Opening the inventory, or Playing a Full Motion Video.
  • StateProvider: Used to store the state of the game resources while they are not currently loaded in memory.
  • ResourceProvider: Used to make sure the currently loaded resources are those required by the current level and location.
  • Global: Used to access global state data such as the current level, the inventory, ...