Game Gen - Week 4


This week, we really dove into many more of the deeper mechanics of Unreal Engine blueprinting and gameplay. We focused mainly on further developing the player character before moving on to start the actual gameplay loop mechanics. This involved delving into the math for curves, with which I'm not super familiar. However, Vives did an awesome job helping me understand, as did my girlfriend, who is way better at math than I am! Ha!

This week I had a lot I accomplished, but here are the highlights:

Improved character mechanics:
    • We added a cooldown on the attack to prevent the character from freezing. This involved the mechanics of a cooldown paired with connecting it to the UI.
Improved the map layout:
Improved the AI's path-finding ability:
    • I added the use of an Environment Query System using Pathing Grids and looking for the Distance to the Flag or Player based on the behavior path.



Created functionality for rounds, waves per round of enemies, and the number of enemies to spawn per spawner per wave per round. 
    • This is where the math came into play. I spent time creating functions to use for the way I wanted different aspects of the game to curve over time, making the game practically uncapped as far as rounds the player can play. 
    • Vives taught me how to utilize the Master Spawner to control the rounds, waves, and amount and types of enemies to spawn. This then communicates with the Enemy Spawners in the level and distributes the number of enemies to spawn for each round. 
    • Further math is done inside the enemy spawners to keep track of each wave and the number of enemies to spawn per wave. 
    • I'm still working on the functionality here, but I think it seems to be working correctly from what I can tell so far.





I also spent a lot of time learning more about the mathematics of level and difficulty curves. Here's some of the math I worked out for my game curves to start testing in the gameplay mechanics:
    Health and Damage Progression Function:
  • This function calculates the progression of health or damage over rounds based on an initial value, a rate of increase, and the number of rounds. 
  • The formula used is:
  • f(r) = x + (x * y)
  • Where:
    • f(r) is the damage per hit at round r,
    • x is the initial damage value,
    • y is the rate of damage increase per round.
    Waves Per Round Function:
  • Determines the number of waves per round, which increases every 5 rounds. 
  • The formula is: w(r) = 2 * (r / 5) + 1
    • Where w(r) is the number of waves in round r.
    Enemies Per Wave Function:
  • Calculates the number of enemies per wave based on the round number and wave number. 
  • The formula is: e(w) = 5 + r + w
    • Where e(w) is the number of enemies in wave w, r is the round number, and w is the wave number.
    DPS (Damage Per Second) Calculations:
  • For the player:
    player_dps=player_damage/hit_time
  • For enemies (considering all enemies across all waves in a round):
    enemy_dps=(enemy_damage×total_enemies_per_round)/hit_time

    Total Enemy Health Per Round Function:
  • Calculates the total health of all enemies in a round. The formula is:
    total_enemy_health_per_round=enemies_per_round×enemy_healthtotal_enemy_health_per_round=enemies_per_round×enemy_health

    Potential Health Regain Calculation:
  • Calculates the potential health a player can regain through potion drops. 
  • The formula is:
    potential_health_regain=potion_drop_rate×health_per_potion×total_enemies_per_round

    Composite Difficulty Calculation:
  • A formula combining various factors to calculate a "composite difficulty" metric for each round. It considers the total enemy health, enemy DPS, and the number of enemies per wave relative to the number of waves. 
    From these I was able to create some Graphs to visualize what the progression curves might look like, for this I used Python.




Comments

Popular posts from this blog

Game Gen - Week 1

Game Gen - Week 2