Danmaku RPG/Engine

From Touhou Wiki
Jump to navigation Jump to search

The game engine for Danamaku RPG is split in to modules for code separation and easy expansion for adding completely new game modes. The game engine always has the Kernel Module loaded and loads other sub modules as necessary.

Module[edit]

Every "Game-Mode" the kernel loads is considered a module. All modules share some basic functionality which is explained in the main article. All modules are within a folder bearing the name of the module.

Main article: Module

Kernel[edit]

The Kernel manages everything such as storing permanent variables, saving and loading, changing modules, loading and exiting the game. It has full access to load and unload all other modules. It is located in the Kernel folder

The Kernel also contains the windowing subsystem that displays windows on the screen based on a Stack, the most recently opened window is at the top of the stack and pressing [Cancel] closes it and goes back one window

Menu[edit]

The Menu module is the second most powerful module in the game. It can modify variables and view data from any module. It might appear as just a menu collection but its more of a master variable controller.

Field[edit]

The Field module is where the RPG Story and main game take place. It has a 2D and 3D variant of which currently only the 2d one is available. The field module loads modular scene files in which the RPG story takes place.

The field module has an integrated scripting language called FieldScript which is largely based on Fungus

Battle[edit]

The Battle module is where the time-guage battles take place. It also has a 2D and 3D variant of which currently only the 2d one is available. The battle module loads modular battle scenes in which a battle takes place. It has a Battle State Machine which controls the state of the battle such as Setup, Battle/Increment TimeGuages, Victory and Defeat

Each player character and enemy has their own state machine which controls their states such as Waiting for Turn, Select Action, Action in queue and Performing Action.

The enemies currently select their attacks randomly and the player uses the mouse to select their attacks from the windows that appear.

Danmaku[edit]

The Danmaku module is where 2D danmaku battles take place. It loads modular scenes which contain a StageController which has a stack of enemies that you have to defeat, the stage is over once the enemy stack has been depleted. Additionally each enemy contains a Spell Card/Attack stack which you have to deplete to defeat that enemy.

Main article: Danmaku

BarrierBreaker[edit]

The BarrierBreaker module is a 2D breakout style game. It works like Touhou Highly Responsive to Prayers where you control a character (usually Reimu) and have to flip barrier tiles in order to *break/dispel* the barrier. This game module currently unavailable.