Sprint 4: Potions User Testing and Update - UQdeco2800/2022-studio-2 GitHub Wiki

Potions

The main updates to potions were based off potion types which were popular in user testing during the 3rd sprint which were slightly buggy, non-functional, or too similar to other potions.

User Testing

According to User Testing, the number of potions per level per unique potion was found to be in the range of 4 to 6, due to this 6 potions of each type were implemented in the level.

image

Since this was focused on only really fixing bugs for this update and final implementation and balance of potions in the game. The main and only question for potions was to ask for the number of potions per level.

Code

Placing Potions into the game roughly followed this pattern where the entity name, type and GridPoint 2 locations are changed per potion

private void spawnSpeedPotion() { Entity speedPotion = PotionFactory.createSpeedPotion(); itemsOnMap.add(speedPotion); spawnEntityAt(speedPotion, new GridPoint2(90, 11), true, true); }

The last of the potions were updated to be functional. These included Defence Potion and Stamina Potion

Defence Potion

public static Entity createDefencePotion() { Entity potion = createBasePotion() .addComponent(new TextureRenderComponent("images/Potions/defence_potion.png")) .addComponent(new PotionEffectComponent(PhysicsLayer.PLAYER, "damageReduction")); potion.getComponent(TextureRenderComponent.class).scaleEntity(); potion.scaleHeight(1.5f); return potion; }

The defence potion works by making the player block a specific amount of damage. This replaced DamageReductionPotion as it essentially worked the same way. The texture used for the potion was taken from Sprint 1 team's art designs for the initial potions which came in very useful

defence_potion

The Defence Potion is for the lower levels, so the scary, spooky version of the different potion types was used. This implies that although extremely powerful, there is some cost that the player will eventually pay for drinking this unholy potion.

Stamina Potion

public static Entity createStaminaPotion() { Entity staminaPotion = createBasePotion() .addComponent(new TextureRenderComponent("images/Potions/swiftness_potion.png" )) .addComponent(new PotionEffectComponent(PhysicsLayer.PLAYER, "stamina")); staminaPotion.getComponent(TextureRenderComponent.class).scaleEntity(); staminaPotion.scaleHeight(1.0f); return staminaPotion; }

The stamina potion worked in a similar manner to health potion in that it increased the players stamina by a specific amount instead of health. This is useful for the lower levels to allow the player to dash at important time during the final boss fight. The texture used for the potion was taken from Sprint 1 team's art designs for the initial potions which came in very useful

swiftness_potion

A simple blue potion that is not too different from the speed potion cosmetic, as it improves stamina it is expected that it should be obvious that it is a movement based potion type

Future Directions

The Future Directions for potions may include, animations and visual effects for different potions so its obvious that the player is still under the effect of some potion. Additionally for this, there may be some visual effect gifs above the quickbar that show a timer for how long the potion still has remaining. In conjunction with armour, perhaps some armour may interact with potions in some ways for aesthetic effects. Also additionally the implementation of sound effects

Changes to plan

https://github.com/UQdeco2800/2022-studio-2/wiki/Sprint-4:-Armour-and-Potions-Changes-to-Plan

Author

Lachlan McDonald, 45320932 (merty009#1029, https://github.com/Lukeyone)