I added some missiles with blueprints initially and they worked decently well. However, I don’t like visual scripting because it can get messy and out of hand very quickly so I wanted to know how to do these code way.
After an entire day and much pain, I finally wrote a code-based version of the missiles. Both types of missile are present in the video, although they look nearly identical. The blueprint missiles are longer and cylindrical. The code missiles are stubbier and elongated cubes.
The code missiles are not 100% code. It would be silly to specify things like positions and models through hardcoding. Instead it’s similar to how I would write in Unity. All the logic of how the missiles work is handled in code, but using the blueprint component editor you set things like which speed, flame/smoke effect to use, what model to use, and the relative positioning of all these things. It’s very easy to create multiple missiles with different models, effects, and basic parameters.
And with that, my weekend spent with Unreal Engine comes to a close. My biggest takeaway is that programming in Unreal vs Unity is painful.
WARNING: THE FOLLOWING IS THE OPINION OF A 2 YEAR UNITY HOBBYIST ABOUT A WEEKEND’S WORTH OF UNREAL ENGINE 4
Even if I were as familiar in Unreal’s workflow as I am Unity, it’s impossible to ignore that the speed and ease with which code is written in Unreal doesn’t compare. Unreal’s architecture and C++ based nature means there are a plethora of gotchas and things to keep in mind when writing even simple code.
There’s a lot of boilerplate book keeping that has to happen before you can start writing logic and that’s something I really don’t like. Another big problem, and I mentioned this before, is that I’m spoiled by how tightly integrated the C# scripting is with Unity. It is fantastically responsive and the turnaround time for testing is practically instant. It’s something I never fully appreciated until now.
Visual Studio’s Intellisense is also an incredibly frustrating part of writing code for Unreal. Having a delay of five seconds for almost every time you want to open the autocomplete to learn something will drive anybody mad. I’ve read that this is partially due to the way Unreal is setup, and the solution from everybody is always to buy Visual Assist to replace Intellisense.
Having to restart the Editor after every compile became the least of my concerns after having to put up a barely working Intellisense.
Blueprints are certainly worth a mention. They are Unreal’s answer to Unity’s C# scripting and they are fantastically integrated into the Editor. They are everywhere, they are easy to use, and a very powerful extension to code written with C++. For simple prototypes and very basic logic/functionality, they are very fun to work with.
However, like all visual scripting languages they don’t scale well and it’s easy for them to get completely out of hand for anything remotely complex. You’re going to want to program complicated logic and managers yourself.
Other than that, I think it’s a very cool and powerful engine. It’s definitely improved in usability since UDK and has completely shaken the “shooter first, everything else last” mentality and feeling when working with it.
I know it sounds like I probably hate the thing after all the above, but aside from the graphical aspects, the programming workflow is really the only place where Unreal makes a significant departure from Unity. While the engines are very different and work on fundamentally different principles, I didn’t find the Unreal or Unity approach to everything else to be definitively better. They’re often just different ways to attack a similar problem.
Oh yeah, and Unreal’s graphics totally blow Unity’s out of the water. Like holy crap my jaw dropped when I noticed the lights on my ship were illuminating the smoke particles around me. It’s a particle system to die for.
What Unreal gains in graphical fidelity, it loses in approachability and ease of use. The two engines balance out pretty evenly, and whether you use one or the other should mostly depend on how well you are able to leverage the graphical fidelity that Unreal gives.