Design Document - LayeredPlatformer/LayeredPlatformerUnity GitHub Wiki
Layered Platform Unity Project
This Design Document provides design guidance for the the full project (both Minimum Viable Product and a Semester Milestone goal). The team will use the guidance in this document to produce a product that meets the standards described in the Requirements Document for this project.
Each design section is referenced by its corresponding requirement number. This document references Version 2 of the Requirements Document.
This game will have several distinct screens. Each of these screens has a distinct UI, though the design (fonts, etc) should be consistent between screens.
The behavior of this game can be represented as a state machine, with several screens representing these distinct states. The game will be in one state at a time, and transitions between these states are governed by a set of finite behaviors. The possible path through the use of this app is as follows:
The screens above are now described in detail, along with mock-up designs created using stock images.
This is the screen that will show during actual gameplay. The player will be able to see the immediate surroundings of the character. The camera will automatically follow the character as he navigates the level. This screen will provide the player with the following controls:
- Transparent joystick at the bottom left for character movement. The player will be able to move their thumb on this joystick, and by so doing control the direction in which the character moves on the screen, as well as their speed. Moving the joystick at an upward angle should cause the character to jump, and the character should stop moving as soon as the player removes their thumb from the joystick.
- Character abilities will display on the bottom right. These abilities will gray out when on “cooldown” and not available for use. Coloration should return to these abilities when they are ready to be used again. New gears will be added when new abilities are learned.
- The top left of the screen should contain health information, displayed as gears. Empty gears can be used to show health that is not currently available. This health should flash when the character is damaged, showing that the health total has decreased.
- A pause button at the top right of the screen, which when used transitions the game into the “paused screen” state.
- These controls are all overlaid on top of the “game world,” remaining constant in their position and relation to each other as the character moves.
- This screen will have a “right/left handed mode”, which switches the position of the joystick and player abilities but maintains everything else.
This screen is displayed as the game opens, and greets players each time they return to the app. It contains a few different menu options, each of which transitions the user to a different screen, depending on the option selected. These menu buttons should be located at the bottom of the screen, and be sized large enough that they display well even on low-resolution screens. The remained of the screen can contain an image, perhaps a large image of the main character. The menu options required are:
- New Game: When used, this button immediately creates a new, empty save-state, then transitions the user to the in-game-screen to begin gameplay.
- Load Game: When used, this button presents the user with a list of previous save-states created during gameplay. Touching any one of them loads that state and transitions into the in-game-screen to begin gameplay.
- Settings: When used, this button transitions the player to a settings window in order to alter the game’s settings.
This screen appears whenever the game is paused. When activated, all actions, time, and gameplay is suspended, removing all the interface items of the in-game-screen. This screen applies a simple blurring effect to the game in progress, allowing players to see their progress while simultaneously focusing on the menu options available to them in this screen. Game music and sounds will suspend while the game is paused. The options available to a player on the paused screen are:
- Resume: Exits the pause screen and returns to the in-game-screen at exactly the point the player was in when gameplay was suspended.
- Settings: Transitions into the settings screen without ending suspended gameplay. In this way, the player can alter game settings while playing. When they are done changing their settings, the player will return to this screen instead of the main menu.
- Save and Quit: When used, this option saves the current save state, then ends gameplay and returns the player to the main menu. Unlike the settings screen, a player who uses this button must re-load the game, they cannot resume play immediately from the transitioned screen.
The story screen is a narrative device for the game, allowing narration, dialogue, and other text to play. When this screen opens, a blur effect is applied to the current gameplay window, similar to the effect that appears during the pause screen. Like the pause screen, game progression is suspended until the user exits this screen. This screen must contain the following items:
- Two places for images, one on each side. These show portraits for the character you’re talking to, and your own character.
- An auto scrolling text area in the center. Pressing the text area causes the scroll speed to increase, but does not skip it.
- A “skip” button below the text area. This causes the user to leave the story screen and return to the in-game screen immediately.
Once the text has scrolled off the screen or the user presses the “skip” button, the game transitions back into the in-game-screen and in-game time resumes.
This screen displays once gameplay is complete. In addition to scrolling text containing the game creators and contributors, an image displays in the background, and music plays over the scrolling text. Tapping the screen twice skips the credits. Either when the credits are skipped or they finish scrolling, the game transitions to the main menu.
- (Requirement 3.2.1) Left/right movement:This movement will be comparable to left/right movement capabilities in standard 2D platformers. Players indicate which direction they wish to move by holding down a touchable button on their device, and the character walks or runs along in that direction at a constant velocity so long as the character is not obstructed.
- (Requirement 3.2.2) Jump: When on the ground, the player may jump, causing them to travel in an upward arc, maintaining momentum from the speed of their travel at the time of the jump. If they were not moving forward, the jump will carry them straight upward. As in similar platformers, the character can change-course somewhat in midair, though this ability is still bounded by their velocity when they began a jump.
- (Requirement 3.2.3) Basic attacks: The player can attack enemies with a basic short range and a basic long range attack. These attacks will both be untargeted attacks that damage enemies within a certain radius. Once an attack has been initiated, another cannot be made until the animation finishes. Collision detection will be used to gauge whether an attack overlapped an enemy’s space. If an overlap is achieved, a different animation will play indicating a successful hit, and the enemy’s pool of hit points will be reduced by the amount of the attack.
- (Requirement 3.2.4) Health: The player has a finite pool of health that will display on the user interface. This pool can be replenished by locating items throughout the map to replenish it. The health state is retained when loading from a saved-state. When the player’s health is reduced to zero, the character’s death animation will occur, and the player will be forced to start gameplay from their most recently discovered checkpoint
- (Requirement 4.3.1) Special Abilities: As the game progresses, the character will obtain new abilities that the player can use. A new button will appear in the In-game screen, indicating that the player can use it. Each ability will each be cooldown based, meaning that after using an ability, the player must wait a set minimum time before being able to use the ability again. The buttons will indicate when an ability is ready to be used.
- (Requirement 3.3.1) There are three layers: These layers can be thought of as multiple two-dimensional “slices” which exist in parallel at all times.The level may not always show all three layers, but there will not be more than three or less than one layer shown at any time.
- (Requirement 3.3.2) Each layer represents a time period: These time periods are Ice Age, Industrial, and Apocalyptic. These periods will affect the color scheming of the age, the shapes used, the enemies that are encountered, and each era will have a consistent theme.
- (Requirement 3.3.3) Layers are translucent: Future time period layers are visible as low opacity overlays displayed over the current layer. Past layers are visible in the background and scroll along with the current layer as the player moves.
- (Requirement 3.3.4) LayerJump: The player may move between these layers with the LayerJump ability. This ability comes immediately to the player and is a core gameplay aspect. It is expected the player will rely on this ability to solve many of the problems they encounter during gameplay. The player will only be able to LayerJump to a different layer if the place they are attempting to jump to is not an obstacle.
- (Requirement 3.4.1) Shadow trail: The player will have a time shadow that will indicate where the character was exactly a few seconds prior to their current state. This shadow will be a translucent image of the player, and it will be untargetable to enemies. Anything that collides with the shadow that would normally affect the character will have no effect.
- (Requirement 3.4.2) ShadowBlink: The player can teleport to the layer and position of the shadow using the ShadowBlink ability, replacing the shadow. After a few seconds has occurred, a new shadow forms.
- (Requirement 3.5.1) Plot introduction: This level will introduce the main character and the basic premise of the game's plot (as described in Requirement 3.7). This part of the story should provide a player with enough understanding of what’s going on without boring them or filling their screen with more text than they want to read.
- (Requirement 3.5.2) Control tutorial: This level will teach the player how to use the controls and how to meet basic objectives, such as pushing buttons. It will require the player solve puzzles by jumping between layers and using their ShadowBlink ability. It will also contain an enemy for the player to fight or avoid.
- (Requirement 3.6.1) Minor enemies: This level will contain many minor enemies for the player to defeat. Their number will increase over time, and their placement will become more strategic in order to create difficulty over time and encourage the player to develop a greater mastery over game mechanics.
- (Requirement 3.6.2) Puzzles: This level will have a few puzzles for players to solve using the main player abilities. For example, the level might contain areas that cannot be passed on the starting layer, and require the player to travel between layers in order to progress.
- (Requirement 3.9.1) Terrain: Each layer will have a unique set of terrain images that will be used as the ground that the player and enemies. The terrain will be made of repeatable tiles that have collision detectors so that neither the player nor enemies can move through them. These tiles will be used in level building. In order to add to the uniqueness of each layer, the terrain will follow given color and shape schemes.
- Ice Age: The colors used in the Ice Age layer will be blues and whites. The shapes used will be primarily triangles and jagged edges.
- Industrial: The colors used in the Industrial layer will be browns and yellows. The shapes used will primarily be squares and hard edges.
- Apocalyptic: The colors used in the Apocalyptic layer will be greys and blacks. The shapes used will primarily be circles and rounded edges.
- (Requirement 3.9.2) Player Sprite: The player sprite will have a single sprite for when the character is standing still. There will also be a sprite sheet for each animation, including running, jumping, attacking, dying, and using abilities. Each animation will also have corresponding sound effects.
- (Requirement 3.9.3) Enemy Sprites: Each enemy will also have a sprite, as well as using sprite sheets for each animation, including movement, attacks and death. Each animation will also have corresponding sound effects. Each enemy will also follow the shape and color scheme of the layer they belong.
- (Requirement 3.9.4) Background: Each layer will also have a corresponding background. The character and enemies don’t interact with the background. It will be there to help the player recognize which layer they are in.
- (Requirement 3.9.5) Music: There will be music for each layer while the player is in game. The music will reflect the era that the character is currently in, and it will share musical themes between layers of the same level. As the character changes layers, the music of the current layer will fade out as the music of the new layer is introduced. There will also be music for the start screen and credits screen.
- (Requirement 3.10.1) Basic Enemies: Each layer will have a unique set of enemies. They will each have a simple attack that reduces the player’s health upon contact with the character. Direct contact between the character and enemies also reduces the player’s health. Basic enemies will also have a small amount of health. Their remaining health will be displayed based on how damaged they appear. As an enemy takes damage, modifications are made to their sprite to show the player that the enemy has taken damage. When their health is reduced to zero, a death animation will play and the enemy will be removed from game. Each enemy will also have a simple pattern of movement and attack.
- (Requirement 3.10.2) Charity: Charity will be the boss at the end of level one. Charity has the attributes of basic enemies, except she will have more intelligent patterns of movement and attack, as well as more health. She will also have the ShadowBlink ability, which she will use as an attempt to avoid incoming attacks.