You may know I don’t really code when working on games. While I can make short scripts for specific things, or modify scripts when I need a special functionality (like adding PlayStation saving functionality to Adventure Creator), all my Unity programing is done using PlayMaker, a node-based programing tool. Likewise, when using Unreal Engine, I always do my stuff using Blueprints.
During the last couple of months, I have been working on a Killer Dolls game (an alternate version of the game made for the Vita). Since the original Vita game was made in Unity, I decided to simply build on top of that, adding the extra functionality and all that. However, we wanted this game to be “a complete next step” so we wanted to improve many things, including the enemy behavior.
So, after some back and forth between those working in the game, we decided to switch to Unreal Engine 4. I just want to clarify this is not an attack on Unity in any way. On one side, we still have upcoming games that are being developed in Unity, and, on the other side, this is based on my own experience using a very specific setup (Unity + PlayMaker) and making a specific game, so your experience may or may not be similar.
If you’re familiar with PlayMaker, then you know it’s a node-based state-machine programming tool. Basically, to use PlayMaker, you create a state machine component on your object, and then you assign a series of actions (like “get input” or “move to”). The actions can store variables that can be used by other actions in the state machine, or even other state machines in other objects.
For Killer Dolls, I made all the functionality using state machines, including the player functionality and enemy behavior. Since Unity gives you the basic components to create any kind of game you want, I use PlayMaker to create all the functionality from scratch, figuring out the best way to build something based on what I need. For example, if you are creating a moving character, you can either use the character component or a rigid body, depending on your needs (they both support different methods of movement, but some of the stuff you can do in one you can’t do in the other). The picture below shows a view of my player controller state machine, and you can see it’s somewhat complicated.
Unreal Engine is pretty similar, as you have components you can add to your object to get certain functionality. However, UE has a lot of components that make it very easy to do certain things. For example, the character component already has a lot of functionality to make your characters run, jump, swim and fly, while the Unity character component is a basic “moving character” component and doesn’t even have a proper jump functionality.
Enemies were also very easy to reproduce and improve in UE4. A few months ago I wrote about using Unity and PlayMaker to create a behavior tree. That functionality is already part of Unreal Engine. I even created different behavior trees for the different enemy types, and they all share data from a centralized “data storage object” (AKA Blackboard).
Originally, I thought re-programming all the game mechanics was going to take a long time, but in less than two weeks I already had a first version of everything and now I’ve been just fixing bugs and improving some stuff.
Just to create a comparison, this is the basic character functionality in Unreal Engine, including causing damage and receiving damage (the Unity image above was just for moving and attacking).
Now the question is, does this mean I should just move to Unreal Engine and forget about Unity? Well, the answer is no. You can find a lot of different discussions about deciding which engine is the best, but I can’t really tell you “Unreal is better than Unity” or vice versa, because it greatly depends on what kind of game you’re making. For example, this new Killer Dolls game and Just Let Me Go are easier to make in Unreal Engine because the engine has a lot of built-in functionality that make them easier to make (for example, the character configuration tools and AI), but a different kind of game would be better suited for Unity. I have even covered other types of engines, like Ren’Py, an engine specifically designed to make graphic novels. If you were to create that kind of game, maybe Ren’Py would be a better choice than Unity or Unreal.