mission change + demo

This commit is contained in:
koneko 2024-10-07 20:37:09 +02:00
parent 464ca751a8
commit 32f615f5a9
3 changed files with 198 additions and 166 deletions

View File

@ -2,6 +2,8 @@
_The Watchers Lament_ _The Watchers Lament_
[latest demo](https://youtu.be/x9l2zzIlhNE)
# Game description and functionality # Game description and functionality
Bastion is a Tower Defense type of game. Bastion is a Tower Defense type of game.
@ -58,6 +60,7 @@ The Mission screen has the following content:
## Game screen ## Game screen
Every game screen (Buy or Combat phase) has the following content: Every game screen (Buy or Combat phase) has the following content:
- Game map - Game map
- Options button - Opens the Options panel - Options button - Opens the Options panel
- Sidebar - Content changes based on the phase - Sidebar - Content changes based on the phase
@ -70,6 +73,7 @@ Example:
The map is covering the majority of the screen (80%). There is no zooming or panning. Depending on the map aspect ratio, the map may be cropped on the sides. The map is a grid where the player can place towers and through which the creeps will travel. The map is covering the majority of the screen (80%). There is no zooming or panning. Depending on the map aspect ratio, the map may be cropped on the sides. The map is a grid where the player can place towers and through which the creeps will travel.
There are two types of ground on the map: There are two types of ground on the map:
- Path - The path where the creeps will travel - Path - The path where the creeps will travel
- Buildable - The ground where the player can place towers - Buildable - The ground where the player can place towers
- Non-buildable - The ground where the player can not place towers - Non-buildable - The ground where the player can not place towers
@ -117,6 +121,7 @@ _(razmisljam o tome da se gemovi na pocetku buy phasea moraju kupit i/ili mogu s
_(takodjer razmisljam da ima market tower koji se moze buildat)_ _(takodjer razmisljam da ima market tower koji se moze buildat)_
## Game screen - Combat phase ## Game screen - Combat phase
During this phase the player has no input (excep the Options menu) and the game is played 'automatically'. During this phase the player has no input (excep the Options menu) and the game is played 'automatically'.
At specific points in time the creeps will spawn at the entrance of the map and start moving towards the exit traversing the preset path. At specific points in time the creeps will spawn at the entrance of the map and start moving towards the exit traversing the preset path.
If a tower has an ability to attack a creep it will do so automatically. Type of attack depends on the tower type and the Gems empowering it. If a tower has an ability to attack a creep it will do so automatically. Type of attack depends on the tower type and the Gems empowering it.
@ -125,6 +130,7 @@ Player may invoke the Options menu at any time during the combat phase. This wil
Combat phase will end when all creeps are dead / passed the exit or the player's HP reaches 0. Combat phase will end when all creeps are dead / passed the exit or the player's HP reaches 0.
### Sidebar - Combat phase ### Sidebar - Combat phase
In the combat phase the sidebar displays same information but it is disabled. In the combat phase the sidebar displays same information but it is disabled.
## Towers ## Towers
@ -137,20 +143,25 @@ Towers on their own can not be upgraded, only the Gems that are empowering them
Not all towers can be empowered (via Gems) and they would serve more for utility purposes instead of attacking creeps. Not all towers can be empowered (via Gems) and they would serve more for utility purposes instead of attacking creeps.
### Tower effects ### Tower effects
There are several possible tower effects which describe the general behavior of the tower: There are several possible tower effects which describe the general behavior of the tower:
#### Shooter #### Shooter
This is standard effect available to each tower. This is standard effect available to each tower.
It enables the tower to attack the creeps by shooting projectile(s) at them. It enables the tower to attack the creeps by shooting projectile(s) at them.
#### Trap #### Trap
The tower places a trap on the ground which will deal damage to the creeps that pass over it. The tower places a trap on the ground which will deal damage to the creeps that pass over it.
The trap is placed in the range of the tower randomly The trap is placed in the range of the tower randomly
#### Necromancer tower #### Necromancer tower
This tower spawns creeps which will attack the other creeps. The spawned creeps will have a limited lifespan and will die after a certain amount of time. When this anti-creep meets another creep then one of them will 'die' instantly depending on the their health. This tower spawns creeps which will attack the other creeps. The spawned creeps will have a limited lifespan and will die after a certain amount of time. When this anti-creep meets another creep then one of them will 'die' instantly depending on the their health.
### Shooting Tower ### Shooting Tower
Basic tower that shoots 1 projectile at the closest creep. Basic tower that shoots 1 projectile at the closest creep.
- Damage: 1 - Damage: 1
@ -167,7 +178,9 @@ Basic tower that shoots 1 projectile at the closest creep.
### Chain tower [WIP] ### Chain tower [WIP]
### Damage types ### Damage types
We have several types of damage within the game: We have several types of damage within the game:
- Physical (default damage type) - Physical (default damage type)
- Divine - Divine
- Fire - Fire
@ -184,6 +197,7 @@ Creeps may go through another creep if they are faster (they may overlap).
Creeps may have special attributes. Creeps may have special attributes.
### Creep resistance and weaknesses ### Creep resistance and weaknesses
Creep may be resistant or weak to a specific type of damage. Creep may be resistant or weak to a specific type of damage.
For each creep there will be a percentage of damage reduction/increase for each damage type. For each creep there will be a percentage of damage reduction/increase for each damage type.
@ -218,6 +232,7 @@ Requires tower to be empowered with a divinity gem to deal damage, otherwise imm
- FrostFire: 100% - FrostFire: 100%
## Creep waves ## Creep waves
Each round may have multiple waves of creeps. Each round may have multiple waves of creeps.
Each wave may have different types of creeps and different amounts of creeps. Each wave may have different types of creeps and different amounts of creeps.
A new wave may start at any time, even if the previous wave is not finished. A new wave may start at any time, even if the previous wave is not finished.
@ -234,6 +249,7 @@ The player starts the game with 200 Gold and can not go below 0 Gold.
Gems are not a number resource like Gold is, rather you earn one of the possible Gems upon completing a round. They are placed in your Gem bag which is accessible via the sidebar. Gems are not a number resource like Gold is, rather you earn one of the possible Gems upon completing a round. They are placed in your Gem bag which is accessible via the sidebar.
Gem has the following properties: Gem has the following properties:
- Name - Name
- Color (used for visual representation) - Color (used for visual representation)
- Description - Description
@ -241,9 +257,10 @@ Gem has the following properties:
- Game effects (used for empowering towers) - Game effects (used for empowering towers)
- Level - Level
#### Possible gem effects #### Possible gem effects
Games can only be sloted in towers. When slotted the gem may provide following effects for that tower: Games can only be sloted in towers. When slotted the gem may provide following effects for that tower:
- Increase damage - Increase damage
- Change the damage type - Change the damage type
- Increase attack speed - Increase attack speed
@ -252,10 +269,12 @@ Games can only be sloted in towers. When slotted the gem may provide following e
- Increase number of projectiles - Increase number of projectiles
#### Gem level #### Gem level
Gem level is a number from 1 to 5. Each level of a Gem enhances the effect of the Gem. The higher the level the more powerful the Gem is. Gem level is a number from 1 to 5. Each level of a Gem enhances the effect of the Gem. The higher the level the more powerful the Gem is.
The actual effect of the level depends on the Gem type. The actual effect of the level depends on the Gem type.
#### Gem types #### Gem types
Currently there are 6 Gems: Currently there are 6 Gems:
1. Fire Gem (#FF0000) (fire) 1. Fire Gem (#FF0000) (fire)
@ -294,6 +313,7 @@ If the player loses the game, the score is always 0.
# Data structures and algorithms # Data structures and algorithms
## Mission definition ## Mission definition
- Name - Name
- Description - Description
- Map image - Map image
@ -302,20 +322,24 @@ If the player loses the game, the score is always 0.
- Array of Gem definitions (random type given to player at mission start) - Array of Gem definitions (random type given to player at mission start)
### Game map definition ### Game map definition
- Grid size (width, height) - Grid size (width, height)
- 2d array of terrain types (Path, Buildable, Non-buildable) - 2d array of terrain types (Path, Buildable, Non-buildable)
- Array of paths (array of rows and column which represent the path, first cell is the entrance, last cell is the exit) - Array of paths (array of rows and column which represent the path, first cell is the entrance, last cell is the exit)
### Mission round definition ### Mission round definition
- Array of waves - Array of waves
- Array of Gem types (which the player can get at the end of the round - only 1 picked out of 3) - Array of Gem types (which the player can get at the end of the round - only 1 picked out of 3)
### Wave definition ### Wave definition
- Tick when first creep is generated (calculated once all creeps of the previous wave are generated) - Tick when first creep is generated (calculated once all creeps of the previous wave are generated)
- Ticks between creeps - Ticks between creeps
- Array of creep definitions (identified by creep definition name) together with number of creeps per type - Array of creep definitions (identified by creep definition name) together with number of creeps per type
## Mission instance ## Mission instance
- Mission definition - Mission definition
- Current round index - Current round index
- Array of waves - Array of waves
@ -327,16 +351,19 @@ If the player loses the game, the score is always 0.
- Current tick - Current tick
## Game map instance ## Game map instance
- Game map definition - Game map definition
- Array of tower instances - Array of tower instances
- Array of creep instances - Array of creep instances
- Array of fired bullets - Array of fired bullets
## Wave instance ## Wave instance
- Wave definition - Wave definition
- Array of creeps left to be generated (once the array is empty the wave is finished) - Array of creeps left to be generated (once the array is empty the wave is finished)
## Tower definition ## Tower definition
- Name - Name
- Cost (Gold amount) - Cost (Gold amount)
- Gem slot count (0 if not empowerable) - Gem slot count (0 if not empowerable)
@ -348,8 +375,8 @@ If the player loses the game, the score is always 0.
- Array of initial tower effects (enumeration) - Array of initial tower effects (enumeration)
- Array of allowed Gem types (enumeration) - Array of allowed Gem types (enumeration)
## Tower instance ## Tower instance
- Tower definition - Tower definition
- Grid row and column (position on the map) - Grid row and column (position on the map)
- Gems (array of Gems) - Gems (array of Gems)
@ -360,6 +387,7 @@ If the player loses the game, the score is always 0.
- Array of tower effects (enumeration) - Array of tower effects (enumeration)
## Trap instance ## Trap instance
- Position (x, y in Grid units) - Position (x, y in Grid units)
- Damage type - Damage type
- Damage amount - Damage amount
@ -368,6 +396,7 @@ If the player loses the game, the score is always 0.
- Image (sprite) - Image (sprite)
## Bullet instance ## Bullet instance
- Current position (x, y in Grid units) - Current position (x, y in Grid units)
- Target position (x, y in Grid units) - Target position (x, y in Grid units)
- Damage type - Damage type
@ -375,6 +404,7 @@ If the player loses the game, the score is always 0.
- Image (sprite) - Image (sprite)
## Creep definition ## Creep definition
- Name - Name
- Maximum HP - Maximum HP
- Speed - Speed
@ -383,6 +413,7 @@ If the player loses the game, the score is always 0.
- Special attributes (hardcoded attribute types) - Special attributes (hardcoded attribute types)
## Creep instance ## Creep instance
- Creep definition - Creep definition
- Current position (x, y in Grid units) - Current position (x, y in Grid units)
- Current HP (also represents damage dealt to player if reaches exit and damage dealt to other creeps if it is an anti-creep) - Current HP (also represents damage dealt to player if reaches exit and damage dealt to other creeps if it is an anti-creep)
@ -391,6 +422,7 @@ If the player loses the game, the score is always 0.
- Anti-creep damage type (if anti-creep) - Anti-creep damage type (if anti-creep)
# Future work # Future work
- Add leaderboard functionality to [Mission screen] - Add leaderboard functionality to [Mission screen]
- Ability to restart at the current round of the mission [Options panel] - Ability to restart at the current round of the mission [Options panel]
- When in combat phase the 'Go' button should be replaced with 'Speed up' toggle button [Sidebar - Combat phase] - When in combat phase the 'Go' button should be replaced with 'Speed up' toggle button [Sidebar - Combat phase]

View File

@ -3,29 +3,29 @@
"description": "This is the first mission", "description": "This is the first mission",
"gameMap": { "gameMap": {
"rows": 15, "rows": 15,
"columns": 15, "columns": 20,
"cells": [ "cells": [
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 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