Difference between revisions of "Danmaku RPG/Engine/Danmaku"

From Touhou Wiki
Jump to navigation Jump to search
(Initial documentation)
 
(Character)
Line 31: Line 31:
 
=====Hitbox Graze=====
 
=====Hitbox Graze=====
 
The graze hitbox is the actual CircleCollider2D that determines if there is a bullet near the player.  It is not visible in the game and is about the size of the circle of the snowflake like hitbox.
 
The graze hitbox is the actual CircleCollider2D that determines if there is a bullet near the player.  It is not visible in the game and is about the size of the circle of the snowflake like hitbox.
 +
 +
====Player Shot Spawner====
 +
The player shot spawner spawns the player's bullets when the '''[OK] - Z''' key is pressed or held down and spawns the player's spell card when the '''[Cancel] - X''' key is pressed.  It contains PlayerBulletSpawner components for each bullet type the player spawns and a PlayerSpellSpawner for the character's spell card.
  
 
==Canvas==
 
==Canvas==
 
[[File:DanmakuRPGDanmakuGUI.png|350px|thumb|right|Example danamku GUI Overlay]]
 
[[File:DanmakuRPGDanmakuGUI.png|350px|thumb|right|Example danamku GUI Overlay]]
 
The Canvas contains the GUI elements which are drawn first and are always on top of everything game-related.  It is very useful as it shows your score, lives, spells, graze and points.  It also shows the enemy health, name, timer and [[spell card]] name if the current attack is a spell card.
 
The Canvas contains the GUI elements which are drawn first and are always on top of everything game-related.  It is very useful as it shows your score, lives, spells, graze and points.  It also shows the enemy health, name, timer and [[spell card]] name if the current attack is a spell card.

Revision as of 00:29, 28 September 2017

The Danmaku module is where 2D danmaku battles take place. It implements many of the mechanics from the classic era Touhou games such as Embodiment of Scarlet Devil and Perfect Cherry Blossom

Scene[edit]

The scene contains the setting and configuration for the danmaku stage.

Stage Controller[edit]

The Stage Controller controls the flow of the stage. It contains a BossStack script which has a stageEnemies array. Upon loading a stage the first enemy in the stageEnemies array is spawned. Once that enemy is defeated the next one is spawned and so on. Once the end of the array is reached the stage is completed.

Background Controller[edit]

The Background Controller manages the active background, scripts can call SetBackground2D(GameObject background) from the BackgroundController component which changes the active background. 3D backgrounds are currently not implemented.

Object Boundary[edit]

The Object Boundary is a invisible box outside the visible playing area. Any bullet that leaves it is instantly destroyed, this saves resources by not updating off screen bullets.

Character[edit]

The Character is the player controlled character and is made up of various elements.

Hitbox - Hitbox Type Controller[edit]

The Hitbox is both the visible hitbox that you see if you hold Focus and also the hitbox that determines if you are touching a bullet. The HitboxTypeController component controls the type of visible hitbox that appears when you hold Focus. Currently there is 4 hitbox styles: EoSD, PCB, GFW and ISC.

Hitbox Primary[edit]

The primary hitbox is the visible hitbox you see when you hold Focus. It usually rotates clockwise.

Hitbox Secondary[edit]

The secondary hitbox is a second visible hitbox that appears when you have selected a modern hitbox style, it usually rotates counter clockwise or does not rotate at all as seen in Great Fairy Wars

Hitbox Physical[edit]

The physical hitbox is the actual CircleCollider2D that determines if the player is touching a bullet. It is not visible in the game and is slightly smaller than the core of the primary visible hitbox.

Hitbox Graze[edit]

The graze hitbox is the actual CircleCollider2D that determines if there is a bullet near the player. It is not visible in the game and is about the size of the circle of the snowflake like hitbox.

Player Shot Spawner[edit]

The player shot spawner spawns the player's bullets when the [OK] - Z key is pressed or held down and spawns the player's spell card when the [Cancel] - X key is pressed. It contains PlayerBulletSpawner components for each bullet type the player spawns and a PlayerSpellSpawner for the character's spell card.

Canvas[edit]

Example danamku GUI Overlay

The Canvas contains the GUI elements which are drawn first and are always on top of everything game-related. It is very useful as it shows your score, lives, spells, graze and points. It also shows the enemy health, name, timer and spell card name if the current attack is a spell card.