top of page

Prototyping Mechanics Part 3

Hazrat

Moving on! I decided to focus on characters special movements, therefore working on how both the characters interact with the environment, i.e. the fire character burning up certain walls.

This was achieved by getting the actors rotation and relative location, breaking it and extracting certain values that I look for, for example tracing for plug holes on the ground. From here I would trace for any hit values and if the condition was true it would move the character to where I needed it to be.

However this would have a variety of outcomes because it breaks the X, Y and Z values (Roll, Pitch, and Yaw) and multiplying it and then adding it to the original location, this little piece of code or math makes it a trial and error process.

Character special movements:

Grate

Pipe

Burn up walls

Slide under doors

Burn stuff

From here both James Broderick and I decided to fuse our documents together create a super blueprint… sort off!

James

As we don’t know how to use source control yet plus access to it on the lab computers are difficult we have to go through the tedious process of merging UE4 files together for now until we can sort out a solution for source control. We do have a written checkout system so we don’t touch the same files in our respective versions, making sure we don’t use overwrite parts of the blueprints or fork off too much, this doesn’t always work though which led to some issues getting Hazrat’s camera to work in the master copy. A section of script had to be redone, but at least it works better than before and we have a few more options to play around with.

After putting everything together we worked on polishing up the gameplay we had, I taken over a blueprint Haz was working on which was destructible crates and he taken on one of mine which was death by water. We were struggling for a solution for the destructable crates for a while as they needed to be able to spread fire if they were set alight, I made a graph with a series of conditions that triggers the crate setting on fire if the one next to it is alight or if the fire guy has come into contact with it directly. This seemed to work, although I had to change the sphere trace by channel to a multi sphere trace as the blueprint wouldn’t work as it kept picking up the wall and floor assets instead of what I wanted.

Also I tried to optimize the blueprint by removing the event tick, which was causing some serious lag! Placing around 5 of these crate blueprints would slow the game down from running at 120fps on my lab computer all the way down to 18 fps! I made a small loop that uses a retriggerable delay and a sequence and the game was running at least 60 fps then even with around 20 crates on fire.

bottom of page