Wandslinger
At PreMortem I worked mostly on the general gameplay, and the different menus. Here are some highlights from the eight months I worked on the Wandslinger demo. At PreMortem we were two programmers, two artists and one designer.
Area effects
Structure
I set up the area effects in the game by making a C++ class which was inherited by a more general blueprint class which was then again inherited by the specific element classes. I made it this way to be able to implement the core features in C++, while also giving the designer and myself the ability to change small things for every element without having to do the same thing in every element subclass.
The approach with having the specific classes as blueprint child classes of one more general blueprint class which was inherited by one C++ class was how I worked with most of the stuff I did on Wandslinger. I set up the projectiles and the enemies the exact same way.
To differentiate blueprint classes from C++ classes we decided to use BP_ as a prefix for the blueprint classes and no prefix for the C++ classes.
This page will be continuously updated with more stuff I did on Wandslinger.
Implementation
The area effects are made of a closed spline. I used Unreal’s spline component, to let the designer use the tools that already exist in Unreal to shape the area effects.
To know if an actor was inside an area effect, I first made a box around the spline to see if the actor was close to the spline. If the actor was outside of the box, the actor was outside of the spline area. If it was inside the box I fetched the closest point on the spline and calculated if the actor was to the right of the point or not. If it was to the right it was inside and otherwise not.