Design of ERA-Engine (Godot)
Briefing of system architecture and design principle of ERA-Engine (Godot).
Design Principle
Finite State Machine (FSM)
Finite State Machine
(FSM
) is a system that has a finite number of states. It is a model of computation used to design both computer programs and sequential logic circuits.
All data, status and other information of the programme can be regarded as a state
, and at any specific given time, the system always have limited possible states, thus this kind of architecture is called Finite State Machine
.
ERA-Engine (Godot) implemented this FSM
pattern into the system, introducing FSM Mode
as a brand-new coding mode for ERA game and other text-based games.
In ERA-Engine, any status can be regarded as a state
, and the status transition can be regarded as a transition
: layout of UI, gaming progress, etc. So in fact, the whole game process can be understanded as a procedure switching between different states
.
MVC Pattern
Model-View-Controller
(MVC
) is a typical design pattern on programming. The programme can be regarded as 3 parts: Model
, View
and Controller
.

Generally, view
is what users will see, model
represents database, and controller
is the code logic of the programme. Anytime when status on view
updates, controller will handle the main logic, and ask to look up data in model
, master on computation and finally update any detail to view
. Thus, the programme is divided into 3 isolated parts, making the programme more mordulised and robust.
System Architecture
Overview
In general, to create a game with ERA-Engine, there are 2 main parts you need to concentrate on:
State
: Your arrangement and content of interfaceData
: All data files, includingcharacter
,kojo
,item
, etc.
Then, based on these two parts, you can customise the logic behind each UI unit
in a state under the FSM
pattern, thus construct the whole logic of your game.