I have a number of old stuff kicking about in my UE4 Projects folder. Most of them unfinished, abandoned or buggy ideas I’ve tinkered with.
This particular post is about Ball Game, which is a hybrid between Halo’s Grifball mode and Rocket League.
While following along with a series of Unreal Engine tutorials on Udemy I discovered solutions to problems that persisted during my time developing Ball Game. Particularly, getting the PvP attacks to not hit the guy throwing the punch.
As you can see in the above gif, this is now fixed. My old approach involved a bunch of overlapping collider events (with a big box in front of the camera). This was just messy and incredibly inconsistent. This new approach involves getting all actors in a sphere around the player (excluding the player throwing the punch) and applying whatever function needs to be called for them:
- In the case of players, this kills the opposing player.
- In the case of balls this punches the ball in the direction the player is facing.
That being said, the blueprint as it stands is not my finest work:
Further Than You’d Expect
I was surprised by just how much was already done in this project from a programming standpoint. There are a number of core features already implemented:
- Ball Spawners
- Scoring (with UI updates)
- Friendly Fire
- Double Jump
- “Jump Juiciness” (camera shake and chromatic aberration on jump)
- Throwing the Ball
- Dropping the Ball
- Catching the Ball (although this now broken with the new collision detection)
- Zoom mode (with adaptive Depth of Field)
This thing just might see the light of day.