Cepheus
The game
This game is a narrative-driven 2D retro action adventure with pausable real-time combat. The goal is to encourage strategic thinking, with gameplay that features special attacks and extraordinary items. At times we where a team of 4 people. I was leading the development efforts. Game Design, UX, UI and Leadership where done by Phil Burling.
It’s a challenging project from a developer's perspective due to its need for:
- Extensibility
- Cross-platform input handling
- Performance optimization (targeted for mobile)
The actor system
The core component is the Actor
class. It must be highly flexible to support various roles:
- Peaceful NPCs (peasants, traders)
- Hostile entities (raiders, bandits)
- User-controlled characters
These all share logic for movement, animation, etc., but differ in behavior and interaction.
The diagram shows how the actor class integrates with various "behavior modules" and a controller containing AI logic. A state machine governs transitions and restricts behavior as needed.
The input system
The input system uses a facade pattern to unify inputs from:
- Touchscreens
- Game controllers
- Keyboard/mouse
This abstraction is processed by a UserController
, which feeds inputs into the actor system.
The actor state machine
A common design pattern here is the state pattern, which avoids cluttering logic with conditionals and supports extensibility.
Instead of hardcoding all transitions, each actor’s state gets its rules passed in as delegates. This allows per-actor customization and clean lifecycle injection.
GUI
The game’s user interface includes:
- A HUD showing vital player stats
- Dynamic views using C# events
The system roughly follows the MVC pattern, and each controller is tied to specific views and models.
Animations
This video shows the inventory system. Items are shown, previewed, and used via animated transitions.