Magic Forge game - a finished prototype

13 November 2019

Category: Learning Projects

Hello everyone,

Let me introduce to you my side project called Magic Forge. I have created this project based on new techniques, mainly blend shapes, that I have learnt in Animation Course for Unity. I had been looking for stuff like this for quite a long time, and I couldn’t find it, so I was very excited to finally learn this. I also wanted to create a mini-game which would be my original idea and design, to create a project from scratch, and to finish it (even if “finish” means just a working prototype).

So voila! Magic Forge was born. It’s a simple game where the player has to match the given shape with the one he/she creates by choosing the right spells from scrolls. When the player makes the right match with “cast spell” action, he/she gains score, and a new shape is formed to be matched. It took some time because I wanted to code this thing right and to try a fully composite design with game flow being driven by UnityEvents and animation events. I’m happy that it all worked out, and that the game is oh-so-much more stable and predictable than my previous designs. Debugging is easier, and bugs are not hiding so viciously under some unpredictable coupling between classes.

Another thing that I want to discuss here is the blend shapes themselves. There I faced challenges I did not fathom before. It’s not so easy as one might think because shapes need to blend in an orderly manner; otherwise artifacts occur in Unity. You can see such artifacts on one blend shape (a square with horizontal and vertical parts). I spent hours trying different layouts to fix this, but I have not succeeded. This problem probably took most of the time, together with all the 3D letters you can see in the game. They are all instances of one object, which is just set up differently and controlled by a script.

Everything in this project is animated in some way. Most of these animations are triggered by events in objects’ individual controllers. Honestly, it would be hell to make this work without events. One little change would require a massive rewriting. This way, it’s super easy to plug or unplug a component.

Furthermore, I’m happy to have implemented my first asset, the AnalogClockController, which is a complex asset to control time, either an actual clock with hands, or as a heart which controls the game flow with its ticking. This asset will soon be (and probably already is by the time you read this) available for purchase in the Unity asset store. To conclude, I liked working on this project a lot, I have learnt a lot, and I like the result very much. You can play the WebGL version in the Games section on my page. If you have any feedback to give me on this project, I would be more than happy.