top of page

Week 4 - I Put a Spell on You

  • maguire-r28
  • Feb 28, 2022
  • 3 min read

After a slightly disappointing week 3, I started Week 4 with the intention of getting my game's main mechanic off the ground. This mechanic was the ability to cast spells.

Master of Magic!

In my game, The player will have an array of different spells, each with different effects and characteristics. In order to be able to efficiently add new spells to the game, I thought it best to create a parent-child hierarchy. Having all spells be in this hierarchy meant that I wouldn't have to repeat code unless absolutely necessary. Instead, each blueprint could reach back through to a parent blueprint to access code that was mutually applicable.


The above image shows an example of how this hierarchy would work. Initially, I had not intended on having the projectile blueprints, as seen at the bottom. During the development of this mechanic, I realised that it would be easier to spawn and attach the currently equipped spell blueprint to the character model. The problem was that some of the spells needed to be moving, such as the projectile spells. This caused issues for attaching them to the character. This resulted in creating a child of such spells that had all the movement functionality.


The main aim of this hierarchy was to make it easier for me to create more spells in future. To test this method, I used the spell "Fireball" and "Droplet". These spells were essentially identical in functionality. First I got the Fireball spell working, then duplicated it and its child. After making a few modifications, I had doubled my number of projectile-based spells!


Structure and Form

While creating my spells, I was aware of the increasing number of variables that each spell would need to keep track of. These variables included damage, range, what class of projectile would be spawned upon casting, etc. In order to keep these variables organised, and make altering them easier in future, I combined them into a data structure


Johnny 5 needs more input!

While creating functionality for the spells, I started adding more input controls for the player.

Now aware that I needed to keep both controller and keyboard in mind for these inputs, I made sure to include both anytime I added a new input. This week, I added the essential input for casting a spell, as well as some more inputs for mechanics that I knew I would be working on soon such as swapping spells and interacting with game objects.


This Week in Review

This week has been a lot of groundwork. I feel like I have invested a lot of time into these mechanics' core systems.

While I feel like I could have used this time to make a much more diverse array of spells, I think that rushing into making all these different spells will cause more trouble in future. having a stable core system means that I will spend less time in the future patching issues.


Outside of creating this game, I have spent a lot of time playing "The Binding of Isaac". It is a fantastic twin-stick shooter and a huge inspiration for my game. The more I work on my own project, the more I see how it is drifting away from The Binding of Isaac.

This is not a bad thing, it is just interesting to see how they are starting to differ more and more despite a lot of my ideas and inspiration coming from that game.

While playing, I often find myself noting how I want the mechanics to differ, and then wondering about how such changes are going to affect the dynamics of the gameplay.



 
 
 

Comments


bottom of page