Hello! Sprint 2 is coming to a close, and lots of progress has been made.
The first thing I did this sprint was finishing up the Deck’s functionality: destroying cards from the deck. Miles wants it so that the player has the ability to not only gain cards as you progress but also remove unwanted cards. This concept is similar to Slay the Spire, and I think the mechanic will make for interesting decisions to be made for the player.
I then worked with Alex Lopez to connect the UI with the Deck. He shared his screen, and I helped explain to him how to get the cards to show up with the right information.
I then dealt with the Status effects applied to the enemy. The enemies are given a random status effect, which causes the enemy to change color. The problem with my implementation was that it didn't allow status effects to stack on enemies, so I had to come up with a different approach. I decided to create a somewhat complicated data structure: a list of pairs. Each pair will contain both the status effect and the lifetime left of the effect.
When a status effect is applied to an enemy, it is added to the list along with a lifetime. Then, every frame, each status effect will decrement its lifetime. Once its lifetime hits zero, it is removed from the list. Here is a screenshot of the code:
As of now, the status effects do nothing but change the color of the enemy. However, this can easily be expanded to encompass a wide range of effects.
The console log shows the stacking status effects on the single enemy. The enemy changes color based on the top-most status effect applied.
Following that up, we needed to get the player to move across different rooms. Originally, we wanted to make it similar to Binding of Isaac in that there is a maze of rooms to traverse through, and the room transitions being similar to old Zelda games. This sprint however, we decided to change it to be more like Hades, where the player has one or two options of which room to go to after defeating all of the enemies in the room.
To make room transitions happen, I started by simply making it so that the player can press E on the keyboard near a door, and that will transfer the game to the next scene. To show the player that they can activate the door, I changed the color of the door to red when they are in an intractable range.
Basic room/scene transitions
This meant scrapping a lot of the code that Josh had relating to the Zelda-like room transitions. I think this will turn out good though.
Afterward, I ensured that the enemies must be defeated. To show the player this, I added a basic lock sprite to the door and made it disappear once the door opened. Furthermore, I added a basic “reward”-type object that will spawn once the player has defeated all of the enemies. And - like in Hades, the reward of the next room is shown on the door.
In Hades, the player can easily see what the reward is for the next room.
Putting it all together: the lightning bolt spell applies a Zap status effect. Once the enemies are defeated a chest will spawn and the door will unlock. Once the player enters the new room and defeats those enemies, a heart reward is spawned.
Card Complete List
- As a player, I would like a system in place that allows me to destroy cards from my deck, so that I may manage my deck and come up with a build (1).
- As a designer, I would like a function for applying a status effect to an enemy (3).
- As a player, I would like a door system that when interacted with, sends players to the next room (3).
- As a designer, I would like a base enemy class to be made, so that we may apply stats and debuffs easily to each enemy (3).
- As a designer, I would like the deck system to work with the UI for visual display and player feedback (3).
- As a player, I would like doors to randomly generate a reward for the next room, and having that reward spawn once all enemies are dead (1).



No comments:
Post a Comment