Detailed Design - acy005/Team-19 GitHub Wiki

========================== Game Information

  • 8-bit Arena

  • Mish Mash

  • Note - (?) <--- Items indicating this is a feature we COULD add if we have time!

========================== Main Class (Game State Manager)

  • Load MainMenu object

  • Load OptionsMenu object

  • Game State Management

    • Integer GameState initalized to 1
      • 1 : MainMenu
      • 2 : OptionsMenu
      • 3 : TeamSelection
      • 4 : GameInProgress
      • 5 : EndGame
    • Switch statement
  • If new game clicked

    • Create team selection and set gamestate to 3
  • If options clicked

    • Set game state to 2 etc etc

========================== Object hierarchy

				             GameObject
	      ___________________________________|_________________________________________________________
                  |              		         |						           |
	TerrainObject		     	    PlayerObject		  		           ProjectileObject
				  _______________|_____________________     			  |		   |	
				  |	         		      |	   		    	  |		   |
				Melee		 		    Ranged	     	      BasicAttack    SpecialAbilitY
				  |				      |
			Individual Champion Class	   Individual Champion Class	
  • Differentiating different melee champions from ranged chamions helps to streamline coding
    • IE: Each tank shares a similar HP pool / attack damage
    • In this scheme individual champions only need their special ability coded

============================== GameObject

- Collision Detection
- Positional coordinates (X / Y, or which tile this object occupies)
- Sprite drawing / animation

PlayerObject

- Statistics
	- Name
	- Role (What type of role in the team they occupy, tank/assassin/support, etc...)
	- HP pool
	- Energy pool
	- Attack range (how many tiles in each adjacent direction the object can attack)
	- Movement points
		- Pathfinding
			- Unit speed ( how quickly they move from tile A to tile B)
		- Radius rather than 2 directional			

- Directional facing
	- North / South / East / West
	- Sprites for facing each direction

- Actions
	- Basic Attack (ranged or melee)
	- Special Ability
		- Name for the special ability
		- Cooldown parameter ( after using the ability, it cannot be used for X amount of turns)
		- Will have its own attack range

	- Move

- Combat
	- Attack damage
	- Critical hits (chance for an attack to do normal damage * 50%-100%)
	- Dodge / Evasion (?)

- Unit State
	- Healthy (Normal unit state, no buffs/debuffs)
	- Dead
		- Leave a corpse sprite on the tile it died on
		- Disable unit collision for this object
		- Disable unit interaction

	- Silence - No ability use for X amount of turns
	- Snare - No moving for X amount of turns
	- Stun - No action for x amount of turns
	- Damage over time
	- Alignment (Which player controls this unit, IE differentiating between friendly/enemy units)

- Collision detection special rules
	- Tilebased
		- Don't allow units to move onto tiles that are occupied

- Stats to track
	- Damage Done
	- Units killed
	- Healing done
	- Spaces moved
	- OBstacles destroyed(?)
	- Neutral Buffs recieved (?)

MeleeObject

  • Combat special rules

    • Only attack in the 4 tiles adjacent
  • Melee based differentiations(?)


RangedObject

  • Extra statistic

  • Combat special rules

    • Spawns basicattack objects on attack

  • Individual Champion Object

  • Code individual special abilities
  • Alter specific statistics

Terrain Objects

- Different terrain based neutral buffs (?)
- Destructible (?)

Projectile Objects

- Unit Speed (velocity)
- Collision detection

- Combat
	- Attack Damage

- BasicAttackObject

	- Collision detection special rules
		- Projectiles fizzle when colliding with friendly units		

	- Combat
		- Critical hits

	- Unit State
		- Self delete on collision OR off screen

- SpecialAttackObject

	- Collision detection special rules
		- Cannot execute offensive special abilities on friendly occupied tiles
				- Status Delivery
	- Combat
		- Status delivery
			- Stun / Snare / Silence / DoT

Map Class (gameboard)

- Pre-set maps
- Have a map class from which the children will be individually built maps
	- Grid size
		- Map for first release will be 15x15
		- Specify where to the terrain objects (obstacles)
		- Specify placement zone (the zone where each player can place his units before turn begins) 

========================== GameManager (Manages game action)

  • Pregame (unit placement)

    • One player puts 1 piece down at a time in their placement zone
    • The placement zone tiles will blink : Red for player 1, blue for player 2
    • Pregame ends when both teams have set all their units on the board
    • Player 2 gets to move first
  • Turn mechanics

    • Turn ends when current player selects Wait, 1 minute expires, OR an attack or special ability is used
    • Clicking an enemy unit flashes that enemy's movement range and Unit Panel (a small HUD that displays this units current HP/Energy and possibly a portrait)
    • Clicking a friendly unit brings up the, Unit Menu (Move / Attack / Special Ability), highlight blue the tiles that it can move on, and the Unit Panel for this unit - Clicking Move: - The next tile within the flashing radius you click, the unit will pathfind to - Clicking Attack: - Flashes all tiles the unit can attack - Only tiles occupied by enemies within the accepted range will be attacked - Turn ends after attacking - Clicking Special Ability - Flashes all tiles on which the ability can be used - If the ability is a friendly spell (for instance a heal) - Can only be used on tiles occupied by friendly units - If the ability is an offensive spell - Can only be used on tiles occupied by enemy units - Usage of ability ends turn - Clicking the global Wait button ends turn
    • At the end of each turn check an integer counter for number of units left on the board for a particular player. If counter = 0, game ends with the opposite player the victor
    • If counter != 0, Turn cycles to next player and repeat until all units of a player are eliminated or the game is exited
  • End game

    • Do something to celebrate, timer or something
  • Interface

    • HUD in the top left corner of the screen
      • Options
      • Wait
    • Unit panels display on the bottom left
    • Unit menu displays in upper right

========================== MainMenu

- Start Game
	- Give option to Blind pick or Draft pick (?)
	- Loads and initiatlizes Team selection object
- View Champion Roster (?)
- Options
- Exit

========================== OptionsMenu

- Exit 
- Disable sound
- Disable music
- Disable turn timer

========================== TeamSelection

  • Display roster of champions in the middle of the screen

  • Player 1 team roster aligned vertically on the left side of the screen

  • Player 2 team roster aligned vertically on the right side of the screen

  • Both teams can draft 1 of each champion

  • Both teams can share each champion

  • Player 1 gets to pick his entire team first

    • Player 1 team picking turn ends when he's selected 5 champions
  • Then player 2 gets to pick his team

  • After team picking ends, player 1 gets to pick a map

  • After map is pick, team selection ends and the Game manager is loaded/initialized