Design Blog 2


In comparison to the first sprint, I feel much better about my work output for the game. For the second sprint, my goal was to have the systems that form our core gameplay loop functional. This included both the foundation of the game’s combat system and economy. Significant design changes are also being added to the game in response to feedback from our first prototype. Over the course of the next few sprints we will add enemy variants, a minimap system to help players better navigate, and a feature where players have the choice to spend their health pool to gain an advantage. 


The tasks I was assigned to create the basis for the game’s combat were, creating a punch attackm, kick attack, cooldowns for each attack, health and currency tracking, and 3 cards for the basic AI behaviors of patrol, aggro, and attack. The punch and kick attacks were easy to implement. In its current state the punch and kick attacks turn on an additional hitbox for a short amount of time before turning off again. After they turn on they start the cooldown for when the player can attack again. I chose to use colliders for the players attacks so it is possible for the player to hit multiple enemies at once. However, if players are not liking the current way their attacks are working this can easily be changed to a raycast in the future. 


On the other hand, melee attacks for enemies do use raycasts to determine whether or not they have hit the player. Right now however, enemies do turn on an additional white hitbox to visuall display that they are attempting to attack the player. Enemy movement was setup using Unity’s NavMesh system and its components. The ground plane for the game has a mesh attached so the game’s NPCs can walk to any point on the surface and not move outside of it. Additionally, enemies will instantiate a money pickup for the player’s to take as a reward for defeating them and to use as a stepping stone for them to beat levels. 


The buy and sell system is built around two major features. First, all of the prices are semi-randomized and that store drops and resell opportunities are only open for a limited time. The cards I was assigned to complete this mechanic were creating a shop were players can buy items, making the shop open on a limited schedule, creating homes with offers for players to sell too, randomizing which stores and homes were open, and rounding all prices to the nearest 10. For the store, my plan is to have images that show what is being sold next to a price, but right now I have world space text with prices that pops uo when a player is by a store. I wanted semi-randomized prices to add more decision making opportunities for players. To round these prices I divided the raw random price by 10 and multiplied it again by 10, since these were integer values after division the value goes to a whole number. To randomize which locations are open I put all possible stores or homes into an array, then randomly selects which locations are open. Additionally, if a location was already selected the randomization loop iterates again until it finds a place that isn’t open. Keeping stores open for a limited time proved more challenging because stores would closed, open, and then not close again. I was able to fix this by having dueling Coroutines that are performed within each other start at the beginning of the scene. 

While the game’s core loop is not complete yet, the foundational systems that will make it are done. In the next sprint, I will add a way for the player to win the game as well as add the aforementioned features into main scene for the game so we can have a playable electronic prototype. 

Get The Drop

Leave a comment

Log in with itch.io to leave a comment.