Cutie Systems: Difference between revisions
(Base structure) |
|||
(46 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Game | |||
= Game System = | |||
== Game Manager == | == Game Manager == | ||
=== Save System === | The game manager has 3 part: | ||
=== | # Game Manager gameObject: that is launched at startup. | ||
# Game Manager ScriptableObject Singleton: that is instantiated by the gameObject | |||
# Game Manager ScriptableObject | |||
=== Game Task Subsystem === | |||
* lists of game tasks | |||
* Game tasks are scriptable objects that can be synchronous or async | |||
For example: at the start of the game, the only initiated process is the Game Manager. | |||
It then starts a list of game tasks: | |||
* Start the first scene | |||
* Load other subsystems | |||
* Initialise the saving mechanisms | |||
* etc. until the game menu waits for player input. | |||
== Save System == | |||
* Affects: | |||
** Player Preferences | |||
** Player State | |||
** All Levels States | |||
* Functions: | |||
** Load | |||
** Save | |||
https://youtu.be/_hAzWgQupms | |||
https://youtu.be/aUi9aijvpgs | |||
=== Save === | |||
Local save | |||
* Save Redundancy (date, and backups / 5 slots backups) | |||
* Fallback system | |||
* Autosave based on checkpoints (background thread) | |||
* Separate | |||
** Player Preference (in playerprefs) | |||
** Game Data (as a Json + Hash) | |||
== Player Preferences == | |||
* Langage (Localisation) | |||
* Controls (Key configuration, joystick/keyboard...) | |||
* Accessibility (Colour blindness, Sticky rolls, Sticky Breaks...) | |||
* Volume Control (music, sound effects, menu) | |||
== Game State == | |||
=== Game Restoring Parameters === | |||
Current State of the game: | |||
* Current Scene | |||
* Latest Checkpoint | |||
== | === General Stats === | ||
=== Game | *Game time | ||
= Player Systems = | = Player Systems = | ||
== Input System == | |||
=== Player Controler === | |||
The Input system is event based: | |||
# Key Action triggers event | |||
# Subscribers do their thing | |||
## Motion | |||
## Animation | |||
## Sound | |||
## Special FX | |||
Events : https://youtu.be/oc3sQamIh-Q | |||
=== Input Manager === | |||
Pair of InputManager class and InputManagerSO Scriptable Object that stores the keymap values for each action as a pair of : | |||
* Key Function | |||
** Jump | |||
** Breaking | |||
** Left | |||
** Right | |||
* One or more Keycode associated with the function | |||
=== Keymapping and Binding === | |||
* https://youtu.be/YHC-6I_LSos | |||
* https://youtu.be/TD0R5x0yL0Y | |||
* https://youtu.be/t1HXzqDrtxQ | |||
== Control == | |||
=== Player Control === | |||
==== Jump ==== | |||
Jump is controlled using a Vector2 impulse and different parameters for orientation and feel | |||
* Orientation is dependant on surface normal | |||
* Feel as a component for slower take offs and faster landing which is handled by gravity: https://youtu.be/7KiK0Aqtmzc?t=303 | |||
==== Break ==== | |||
=== Board Control === | |||
* Left / Right -- For snappiest control, choosing the gravity orientation has to be lerped. | |||
== Player State == | == Player State == | ||
= Level System = | = Level System = | ||
== Game Map == | |||
Contains informations relative to a Biome : | |||
* The reference scene, made up of proxies | |||
* The Portals (in what checkpoint do you spawn depending on where you come from) | |||
=== Portals === | |||
Special class of checkpoint that transitions between biomes. | |||
=== Scene Poxies === | |||
Scene Proxies are GameObjects with a 2D Collider that loads a scene on enter, and unloads it on leaving. | |||
== Level State == | == Level State == | ||
The level state is a accumulation of | |||
* The Collectible state | |||
* The GameEvents State | |||
== Items System == | == Items System == | ||
= Camera System = | |||
== Gameplay Camera == | |||
=== Camera Follow === | |||
Cutie Position affects the camera position. | |||
=== Camera Roll === | |||
Gravity Orientation affect Camera Roll. | |||
== Camera Handoff == | |||
= UI System = | |||
== Menus == | |||
https://youtu.be/6DcwHPxCE54?si=KD3q5odexX-RqZEk | |||
=== Main Menu === | |||
* Play | |||
* Load | |||
* Options | |||
* Exit | |||
=== Options Menu === | |||
https://youtu.be/eki-6QBtDAg | |||
* Graphics | |||
* Music/Sound | |||
* Accessibility | |||
==== Graphics ==== | |||
* Fullscreen | |||
* Vsync | |||
* Resolution | |||
==== Sound/Music ==== | |||
==== Accessibility ==== | |||
= Event System = | |||
Deals with game events as Scriptable Objects | |||
== Game Events Subsystem == | |||
Same as gametasks but player driven | |||
* '''Game Event''' are scriptable object defining what the event is. One SO for each Game Event | |||
* '''Game Event Listener''' are things that react to a trigger. | |||
* '''Game Event Trigger''' are things that trigger an event. | |||
=== Reference === | |||
https://www.youtube.com/watch?v=95eFgUENnTc | |||
=== Collectible === | |||
Collectibles are a sub-class of Events. | |||
They are : | |||
* Consumed on collision | |||
* They have an associated sprite (mostly for the UI, but may be for other use cases) | |||
* They have a temporary cache system for the ones who can be lost when the player gets hurt | |||
* Have two events: | |||
** OnCollect | |||
** OnLoss | |||
* Can be respawned on loss (for PowerUps for example) | |||
=== Checkpoint === | |||
Checkpoints are a subclass of Triggers : | |||
* They trigger the move to "collected" of the collectibles | |||
* They register themselves as latest checkpoint in the game manager. | |||
= Dialogue System = | |||
== Speech System == | |||
= Sound System = | |||
== Background Music == | |||
== Sound == | |||
= Localisation System = | |||
== Current Langage == | |||
The current langage is defined in the Player Preference. | |||
Default langage is the English (hard coded). | |||
== Langage Scriptable Object == | |||
Is basically two synchronised lists: | |||
* Key list for TextMeshPro items in the game | |||
* Value list for Strings that is the translation to the langage of the original TextMeshPro | |||
== Langage Component == | |||
Has a player preference hard-link to know what the current langage is. | |||
On Awake, langage component interrogate the langage scriptable object to get | |||
== Utility - Scene Translator Window == | |||
On Opened, will look for all the TextMeshPro component without a langage component and add it. | |||
Then offers window with two panels: | |||
# Original text | |||
# Translated text | |||
[[Category:Cutie BoingBoing]] | [[Category:Cutie BoingBoing]] |
Latest revision as of 03:19, 13 June 2024
Game System
Game Manager
The game manager has 3 part:
- Game Manager gameObject: that is launched at startup.
- Game Manager ScriptableObject Singleton: that is instantiated by the gameObject
- Game Manager ScriptableObject
Game Task Subsystem
- lists of game tasks
- Game tasks are scriptable objects that can be synchronous or async
For example: at the start of the game, the only initiated process is the Game Manager. It then starts a list of game tasks: * Start the first scene * Load other subsystems * Initialise the saving mechanisms * etc. until the game menu waits for player input.
Save System
- Affects:
- Player Preferences
- Player State
- All Levels States
- Functions:
- Load
- Save
https://youtu.be/_hAzWgQupms https://youtu.be/aUi9aijvpgs
Save
Local save
- Save Redundancy (date, and backups / 5 slots backups)
- Fallback system
- Autosave based on checkpoints (background thread)
- Separate
- Player Preference (in playerprefs)
- Game Data (as a Json + Hash)
Player Preferences
- Langage (Localisation)
- Controls (Key configuration, joystick/keyboard...)
- Accessibility (Colour blindness, Sticky rolls, Sticky Breaks...)
- Volume Control (music, sound effects, menu)
Game State
Game Restoring Parameters
Current State of the game:
- Current Scene
- Latest Checkpoint
General Stats
- Game time
Player Systems
Input System
Player Controler
The Input system is event based:
- Key Action triggers event
- Subscribers do their thing
- Motion
- Animation
- Sound
- Special FX
Events : https://youtu.be/oc3sQamIh-Q
Input Manager
Pair of InputManager class and InputManagerSO Scriptable Object that stores the keymap values for each action as a pair of :
- Key Function
- Jump
- Breaking
- Left
- Right
- One or more Keycode associated with the function
Keymapping and Binding
Control
Player Control
Jump
Jump is controlled using a Vector2 impulse and different parameters for orientation and feel
- Orientation is dependant on surface normal
- Feel as a component for slower take offs and faster landing which is handled by gravity: https://youtu.be/7KiK0Aqtmzc?t=303
Break
Board Control
- Left / Right -- For snappiest control, choosing the gravity orientation has to be lerped.
Player State
Level System
Game Map
Contains informations relative to a Biome :
- The reference scene, made up of proxies
- The Portals (in what checkpoint do you spawn depending on where you come from)
Portals
Special class of checkpoint that transitions between biomes.
Scene Poxies
Scene Proxies are GameObjects with a 2D Collider that loads a scene on enter, and unloads it on leaving.
Level State
The level state is a accumulation of
- The Collectible state
- The GameEvents State
Items System
Camera System
Gameplay Camera
Camera Follow
Cutie Position affects the camera position.
Camera Roll
Gravity Orientation affect Camera Roll.
Camera Handoff
UI System
Menus
https://youtu.be/6DcwHPxCE54?si=KD3q5odexX-RqZEk
Main Menu
- Play
- Load
- Options
- Exit
Options Menu
- Graphics
- Music/Sound
- Accessibility
Graphics
- Fullscreen
- Vsync
- Resolution
Sound/Music
Accessibility
Event System
Deals with game events as Scriptable Objects
Game Events Subsystem
Same as gametasks but player driven
- Game Event are scriptable object defining what the event is. One SO for each Game Event
- Game Event Listener are things that react to a trigger.
- Game Event Trigger are things that trigger an event.
Reference
https://www.youtube.com/watch?v=95eFgUENnTc
Collectible
Collectibles are a sub-class of Events. They are :
- Consumed on collision
- They have an associated sprite (mostly for the UI, but may be for other use cases)
- They have a temporary cache system for the ones who can be lost when the player gets hurt
- Have two events:
- OnCollect
- OnLoss
- Can be respawned on loss (for PowerUps for example)
Checkpoint
Checkpoints are a subclass of Triggers :
- They trigger the move to "collected" of the collectibles
- They register themselves as latest checkpoint in the game manager.
Dialogue System
Speech System
Sound System
Background Music
Sound
Localisation System
Current Langage
The current langage is defined in the Player Preference. Default langage is the English (hard coded).
Langage Scriptable Object
Is basically two synchronised lists:
- Key list for TextMeshPro items in the game
- Value list for Strings that is the translation to the langage of the original TextMeshPro
Langage Component
Has a player preference hard-link to know what the current langage is. On Awake, langage component interrogate the langage scriptable object to get
Utility - Scene Translator Window
On Opened, will look for all the TextMeshPro component without a langage component and add it. Then offers window with two panels:
- Original text
- Translated text