Lightcaster-Studios / Lightcaster-Studios/Beamerman
Powerup Refactor
Open
@iskandarzulkarnaien is already working on this.
Since Aug 25, 2021.
Feature.Powerups
For Discussion
Task.Refactor
- Dominant language
- C++
- Stars
- 1
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Suggested Architecture:
Player:
- Motivation: Player should not be very concerned with powerups, and are only responsible for things such as incrementing their own stats
- No longer deals with spawning powerup-related effects
- No longer has any behavior dictating how it should respond to being hit based on temporary armor effects (responsibility of the effect actor)
- Only increments their stat when ordered to
- Only remembers the current armor effect actor (if any) that is attached (so other powerups can override or refresh it)
Powerups:
- Motivation: Powerups should handle most of their behavior themselves, whether its the temporary armor effects, or the spawning VFX/SFX
- Split into 2 base BPs: InstantPowerup, TempPowerup
- TempPowerup has
durationvariable, so we can set a default global duration, or tweak individual powerups durations (correspondingly, this duration is removed from the player) - InstantPowerups should just tell the player to increment their specific value
- TempPowerups should spawn an EffectActor attached to the player, that has a lifespan of
duration - Test to see if the player already has a powerup of the same class, and if so, refresh the lifespan
EffectActor (for TempPowerups):
- The armor effect will manifest as an actor (this is currently how it is implemented visually)
- Add a capsule collider bigger than the player to take the lazer hits for the player
- Invoke necessary behavior on player/lazer
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.