L4 - Game Logic

Game Logic Architecture

Implementing game logics is can involve highly complex decisions and depends on many circumstances such as scalability and portability. Monolithic game managers which handle all game logic internally might be easy to start but can become quickly intractable. It is important to allow flexible structures, where components can be easily connected and maintain transparency at the same time.

Unity Events

Unity Events are one great meachanic to handle actions and perpetuate the effects through out the game. Here a quick overview on events in Unity.

Scriptable Objects

Read the introduction to Three ways to architect your game with ScriptableObjects.

Copy those scripts into your project:

  • FloatVariable.cs
  • RuntimeValue.cs (you have to include “using System”)
  • GameEvent.cs
  • GameEventListener.cs

Example Game Logic

Basic Unity Event

Scriptable Object Float

Game Event

Chaining Events

Trigger Volume

Previous
Next