Game-Design / README.md
README.md
Raw

Game-Design

"Sigma males can't be bothered" -Professor Boggus

Code Metrics Maitainability: 83

Code Metrics Quanitify how easy is to maintain the code in a certain project. These metrics take levels of inheritance, coupling, and cyclomatic complexity into account. A good score for code maintainability is anywhere from 20 to 100, and our group received an 83 out of 100 which we are quite happy with. Out code metrics calculations quanitified every file used inside of the Sprint 5 with the lowest maintainability score at 47 and a high score of 100. The average of all these file scores ends up being 83 which shows that the majority of our code has high maintainability.

Sprint 5 Code Details

NOTE: ALL CODE FOR SPRINT 5 IS IN THE Sprint3_actual DIRECTORY. Our group has added new and difficult to implement features for this final sprint. Each group member worked on their own, individualized components, and we combined all of our features at the end of this sprint. All of us took a deep dive into adding elaborate new in-game fights and new room generation.

Procedural Room Generation

Once the first two dungeons are cleared, the game enters an endless mode of procedurally generated dungeons. In order to generate these levels, a grid of new kind of room nodes were used to keep track of how the rooms connected to each other. The connections were made using a modified depth-first search algorithm. This allowed for a more maze-like structure and allowed me to keep track of how far the nodes was from the start. This allowed us to always put a boss room far away from the start and create a challenging level. Once the boss room has been cleared, a triforce piece is dropped and a new dungeon is generated. The methods that are used to keep track of map positions are slightly modified to get info from this new kind of map.

Dungeon 2

Our group decided to implement dungeon 2 as another level that our users could play. This dungeon includes new level layouts, new NPC's, new items,etc. This dungeon introduced Stone Statues and the moldorm. The stone statues are a block type that can be found in dungeon 1 but these statues can shoot fire balls at link. The moldorm is a snakelike NPC made of fire. We created a new roomArray matrix that included the layout of the new dungeon. We had to refactor our code to be able to incorporate both dungeon layouts and switch between the two. Our implementation was set up so that we could also add more dungeons with ease without refactoring too much of our code. It was difficult to rebase our code with main since our sprint 4 implementation was in a sense hardcoded for one dungeon. However, while working through these difficulties we made our code more maintainable and well suited to include multiple dungeons. Our group really enjoyed creating a brand new dungeon and if we had the chance we would implement even more dungeons.

A New Boss Fight

There is a new boss lurking in the first dungeon! Meet the Old Woman, a powerful magic user waiting in a new room. She can be found in the room furthest right from the starting room, and is a more challenging fight than Aquamentus! Defeating her will be more complicated than other enemies - she cannot be harmed by normal means, and must be beaten in a battle of endurance. Surviving her attacks gives Link a chance to deal damage between attacks! As for the Old Woman's attacks:

Electric Heavens

Keep running! Danger icons periodically appear on Link's current position, and after a few seconds a lightning bolt is called down from above! Lightning magic damages Link, and also launches mini shock projectiles in the 4 cardinal directions, so don't run away in only one direction!

Spike Mayhem

Watch your feet! Holes open around the room, and after a short time, large and dangerous spikes rise out of the ground! These spikes only deal damage when fully emerged, so move out of the way before they appear!

Skyfall

Watch your head! Ghastly falling blocks appear along the top wall of the room, soon falling towards the bottom wall where a line of fire awaits Link. Dodge left and right to avoid being pushed into the fires by the falling blocks, or push your way straight through these manifested semi-blocks to survive the attack!

There will be more added in the future! We want to add a special item dropped by the Old Woman with a special effect (maybe making Link a little faster?) and maybe more attacks! We definitely want to revisit the mechanic of dealing damage to the boss, since it is rather basic as is.

New Sounds

vine boom

Zelda Dungeon Trap Remix produced, mixed, and mastered by Shay Fabrizio

The Frito-Lay Doritos Easter Egg

Hello. From the beginning of the game, unlock the top door. From here, walk into the room and utilize a bomb on the right wall. Walk through and pick up your reward to double Y-Y noscope Ganon.

Moldorm and Mobs with Multiple Nodes

One new NPC that was added in Sprint 5 was the Moldorm boss. Alhough its role is pretty small in relation to the entire scope of our project, this may have been one of the most conceptually challenging implementations made in the entire project. This was the first item displayed on the screen which had to have multiple nodes accounted for at once. In other words, all other NPCs, blocks, items, and players only have one position object to keep track of whereas Moldorm had five of those objects to be accounted for. This meant that there needed to be collision checking for all of said nodes with players, walls, doors, etc. However, the most difficult part of this implementation was updating the position of each individual node based on collisions. Since each node moves by following the lead of the node before it, each node must change direction individually. This required for iterating through multiple linked lists keeping track of sprite position, body position rectangles, ad direction vectors to be updated independently for each node of Moldorm. In the end, the linked list implementation worked, but the code code be improved by using another collection structure to keep track of infinitely many previous positions. These previous prositions (and previous directions) are what allowed the nodes of Moldorm to change position and direction at the correct time intervals. Thanks to this implementation, there is now logic added in collision checking for mobs with multiple nodes. If the mob does have multiple nodes, then it is processed in the multiple node handler.

Bug Fixes from Our Last Sprint

Fixed some enemies being unkillable, moblin boomerang functionality is correct now. As of 12/8/21: Fixed link stuttering when walking into walls, bombs no longer stack damage sound effect

Controls

  • Move - WASD
  • Use equiped item - Z
  • Attack - N
  • Inventory - I
  • Navigate cursor in inventory - Arrow Keys
  • Mute dungeon music - , Key

Gameplay

Dive through the dungeons collecting triforce pieces. The first two dungeons are the first two dungeons from the original games, and every level after that is procedurally generated.

Bugs

Confirmed Bugs:
  • LIST ANY NEW BUGS FOUND
  • Movement in inventory screen for cursor can sometimes move over a slot quickly or not move, takes another click to move sometimes.
  • Entering inventory does not stop the updating of the game
  • (Not really a bug) Link Health is coded so it only draws full and half hearts. Empty hearts are not drawn to show link's previous max health
  • In very specific locations, Moldorm will collide with a wall and phase out of the room (usually when colliding with the top wall on the middle of the left side)

Potential Bugs:

  • Most bugs addresses in Confirmed Bugs

Idea for the future:

Improve maintainability of Room and Inventory classes. Providing better abstraction in these classes will allow for a higher code metrics score. Magic numbers should also be refactored in files which still contain them. We are also considering adding custom sounds for special collisions and potentially adding a second dungeon for people to play our game in. Also consider adding more checking for different mobs with multiple nodes.