none
HUD pains



UDK came with integrated Scaleform support. This ment that we had the possibility to create the game's HUD using Flash. I haven't personally worked with it myself, but I've heard stories of constant moaning about how bad it is. On the other hand, at least it worked to some degree. We have a fully functional HUD in the UDK version of the game, which is not butchering the framerate too much.

Unreal Engine 4, however, does not come with Scaleform support. You can buy a license for it, but it costs a few thousand dollars, which is a budget we do not have for just a basic user interface. The HUD rendering capabilities of UE4 aren't that exciting either. You can draw textured rectangles, some text and that's about it, all in absolute canvas coordinates.



Because of this primitive way of rendering, creating a proper HUD is very tedious and very hard to maintain. Hence, we looked into various HUD middleware for UE4, so that we wouldn't be spending too much time on whole ordeal. Sadly, there is only one HUD middleware for UE4: CoherentUI. While the premise of creating the HUD through HTML5 + Javascript sounds promising, the licensing costs of CoherentUI do not. To put things in perspective, its licensing price per developer cost more than that of the entire engine itself, back when it wasn't free. Therefore, we ran into a dead end.



Our only option was to flock to free HUD / UI plugins written by the Unreal community. Except, all but one were abandoned. I took a look at BLUI, which also got a dev grant like us. The single developer of this plugin got $1000 less than we got. To put things in perspective, we are around 8 to 10 people creating an entire game.

The quality of the plugin was pretty bad, and I had to do numerous optimisation myself to get some kind of working UI. Slowly but surely we came to the realisation why CoherentUI was so expensive: creating a good and responsive UI in HTML5 for games is undoable. Chromium embedded framework is just too slow. As an example, I am currently developing on an i7 4790K and a GTX970. Rendering three small planetariums (as quick benchmark) on top of the game brought my framerate back from 120+ FPS to ~60FPS. On top of that, there was noticeable stuttering and lag; as the game had to wait for CEF's single threaded software renderer was drawing everything and copying back and forth huge amounts of data. Besides, the input lag of CEF had too much of an impact, which is unacceptable on high-level play. CEF just wasn't made with games in mind, and it shows.

It seemed that our only option was to either use Unreal Motion Graphics, UMG in short, or the primitive HUD rendering abilities of the engine itself. While in theory UMG sounds nice, it does not give us the features we need for a complex HUD like the middle radar, or minimap.

Our only option left was also the worst option. If that wasn't bad enough, we also had to keep in mind that our HUD should be working with VR equipment. While we don't have any VR equipment ourselves (still waiting for a response from Valve, we're not counting on it), we figured that we at least could render our HUD to a texture, and then show the texture in the 3D world. This would hypothetically solve some of the problems David experienced with Supraball back when he had the chance to test the Oculus.

However, rendering to texture and then onscreen seemed to be quite problematic. We were getting all kinds of problems regarding translucency and blending modes. Asking the community for help regarding these kinds of rendering problems is like asking a bunch of seagulls what soh-cah-toa means. Don't expect any support from Epic Games either. So even in the latest version of the engine (4.8), we do not know how to solve these problems.

We've spend too much time on it already, and now we're back to square one of rendering directly to the screen using the primitive rendering capabilities. It's tedious and not easy to maintain, but it's our only option and we'll just have to deal with it. I'm done with it and just want to get over with it at this point; it's draining too much of our resources for something that should have been relatively easy. I hate frontend development and miss my backend. Uuuuauaurgh!!