CAGD 470 - Sprint 4

Sprint Blog 4


Hello, this is the 4th sprint blog. I was away from home for all of Spring Break, so I only had about one week to work on this project.


While I do not have that many “cards completed” or “points”, I feel like I did a lot of work that was not included in any card. For example, while creating the playtest version of the project, Miles noticed the walking enemies (not the flying enemies) were not moving properly. I realized that it was an issue with the AI pathfinding. The walking enemies move in a pathfinding grid, and when Polawat was creating the levels, he didn’t expand the grid to be the size of the level. So, I fixed that.


Olivia Yee kept asking (while she was playtesting), “WHAT ARE THESE TINY DOTS ON THE GROUND?”. Those “tiny dots” were the spawning location of the enemies, and I added those for us - the developers - to indicate that. I had to remove those since it is distracting for the player. Yee also had trouble interacting with the doors. Normally, interaction is bound with the ‘E’ button, but with Ace of Spells it is ‘Q’. I argued to switch it to ‘E’ to accommodate the player’s expectations and ended up changing it myself.


Nature is a spell type that was officially removed this sprint. To clean up the project, I removed all of the Nature spell code.


As for an actual card assigned: I added the “Ice Counter” mechanic into the game. How it works is if an enemy has three ice counters applied to them, they become frozen. When working on this, I realized our Spell script is becoming a demon monster blob of bad code, so I’ve begun working on incorporating Inheritance. (See figure 1)


Figure 1: See how LightningStrikeSpell inherits from the original Spell script. This script takes all of Spell’s functionality and tweaks it simply whenever need be.


Anyway, this ice counter mechanic by itself isn’t so complicated. (See figure 2 below to see the Ice Counter working in action)


Figure 2: The enemy is hit by a frost bolt three times - each time applying one ice counter to it. Once the third hit strikes, the enemy becomes frozen.


Another outside-of-cards-assigned thing I did was organize the Unity project. It has become a mess: scripts are in the Assets folder, prefabs are in the Scripts folder, etc. I can’t stand that sort of thing, so I took the liberty of organizing the project myself. I also removed some of the Universal Render Pipeline stuff that has lingered in the project since the beginning.


Furthermore, I changed all of the spells to contain triggers, rather than regular colliders. This is because sometimes when an enemy is hit with a spell, they are flung across the room like bowling pins. For some odd reason, each spell prefab had three collider components, so I removed two of them and made the final one a trigger.


I then worked on the second Frost spell: Ice Spear. (See figure 3) If an enemy is frozen, then the enemy will take times two damage from Ice Spear. Pretty neat. And easy to implement as well with the new Spell Inheritance system. 


Figure 3: The large blue orbs are Freeze Earth, and the thin light blue sticks are Ice Spear. You can’t see it, but Ice Spear deals about two damage, and if the enemy is frozen (from Freeze Earth) they will take four.


Freeze Earth was to naturally follow, as it is hard to test Ice Spear without a fast way to freeze an enemy. Or so you’d think. I started to work on modifying the way enemies detect the player. You see, if a player is in range of the enemy detection circle, the enemy will chase the player. This implies some sort of Circle Collider 2D trigger component on the enemy. The problem is, is that there is already a Circle Collider 2D trigger attached… for the enemy hitbox. I had to change the hitbox from a collider to a trigger so the enemies don’t fling like bowling pins (remember?). So, I gave each enemy prefab a detection radius child game object with a new EnemyDetectionRadius.cs script attached. Relatively easy fix, but it’s time not working on cards assigned, yet again.


Yet another issue arose with giving the enemies triggers instead of colliders. For some odd reason, when enemies are spawned exactly… as triggers on top of each other, they become stuck together. (But when they were colliders it was fine? ... I don’t get it). However, when they are spawned plus or minus one value in the x or y-axis, they move away from each other until they aren’t colliding. So, I had to change the way the enemies spawned in very slightly random locations so they don’t merge and look funny.


Is it time to talk about the Freeze Earth spell effect yet? Yes - finally. How Freeze Earth works is that a huge orb is launched, freezing all enemies in the path. (See figure 3). This is an awesome spell in my opinion. The only issue that arose from it was when the enemies became frozen they slid around, rather than stopping completely! To fix this, whenever the enemy is not allowed to move, I force the enemy’s velocity to Vector3.zero.


After these ice spells were finished, I worked on some of the Lightning spells: Lightning Strike and Charge.


Charge is similar to Freeze Earth except that it doesn’t move very much, it applies Shock instead of Freeze, and its initial position is based on the mouse instead of the player’s position.


Lightning Strike applies a lot of damage in a small area and applies Shock to the enemy upon a short delay. (See figure 1, again). Next sprint, I will make it so the damage is higher based on the number of lightning cards in the player’s hand. This spell is also based on the mouse’s position and doesn’t move at all.


See you in the next sprint!


Cards Complete: 

  • As a designer, I would like Ice counters to be implemented as a spell block and on enemy stats. (1)

  • As a designer, I would like 3 Frost Spells to be added. (3)

  • As a designer, I would like a couple of spell mechanics to be designed. (3)



Cards In Progress:

  • As a designer, I would like 3 Lightning Spells to be added. (3)


No comments:

Post a Comment