Building god-game Sacrilege with UE4

CEO and Creative Director of Joy Machine Trent Polack company has recently shared an incredibly detailed look into the development of his

CEO and Creative Director of Joy Machine Trent Polack company has recently shared an incredibly detailed look into the development of his upcoming game Sacrilege. In this article he talked about the production of game environments, the usage of Unreal Engine 4, the creation of special effects and the usage of additional tools like SideFX Houdini & PopcornFX (both of these tools are awesome btw). It’s a great look into the development of high-quality indie titles.

Introduction

Hi! Joy Machine is, basically, my side-company that essentially falls under the umbrella of “work I do at night and on weekends to make the kinds of games I’ve always wanted to make but aren’t necessarily commercially viable. Until they’re released, at which point I hope they’re monumental successes. Or at least fund the next not necessarily commercially viable project I want to work on.”

1 of 2

Anyway, I’m Trent Polack. I’ve been making games since I first started learning C++ when I was 14. That was about 17 years ago, so it’s been a while. I’ve written/coauthored various programming and graphics programming books over the years. And I’ve worked at companies like Stardock (Sins of a Solar Empire, Demigod, Galactic Civilizations 2, The Political Machine 2008), LightBox Interactive (Starhawk), Team Chaos (all sorts of mobile projects), Art+Craft Entertainment (Crowfall), and now I’m working at an education/tech startup called planet3 and we’re working on something that I think is going to be really, really special. planet3 was started by the former president of National Geographics for, like, ages, and was co-founded by a bunch of other incredibly smart people and is a company filled to the brim with talent and intelligence and we’re working on something I really, truly believe in. Basically, we’re saving the world.

Joy Machine’s first game (Sacrilege), on the other hand, is about basically destroying the world. So, I really cover the gamut of world possibilities here. And since Joy Machine is, basically, just me, that’s really all the projects I can handle at once

Current Projects

I believe in a very open development process — I’d write more blog posts if it wasn’t for the pesky limitations of time.

My first game, Sacrilege, is about revisiting the god game genre that I feel has been largely abandoned in recent years — something that is an absolute crime. Basically, I want to take an idea that that was really well-executed in Guild Wars and give each player (god) a limited array of god powers and see how well-constructed that “deck” of god powers can be in an action/RTS/simulation.

I’ve spent equal time professionally as a programmer and designer, so I lean very heavily towards a System Designer philosophy. I believe well-designed and well-developed systems can interact naturally in a game to produce incredibly powerful and interesting results. So, as much as I want this to be an action/RTS for end-users it is, to me, more of a simulation of all of these crazy different systems that all interact with each other in very fundamental and dynamic ways. What’s the fun of lighting stuff on fire if that fire doesn’t spread? And what’s the fun of having a wildfire if you can’t extinguish it with water? And what’s the fun of water if you can’t freeze it and everything in it? Those are some primitive examples, but they’re the kind of interactions that’s a core concept to the entire game.

Originally, I wanted to have the entire world destructible so I’ve been using Voxelfarm as I’ve been developing the game but, for the time being, I’m relying on Unreal Engine 4’s static landscapes as I just can’t bank on the visual fidelity, performance, and reliability of Voxelfarm quite yet, but I have a great relationship with the Voxelfarm team and if it gets ready in time, I absolutely plan on revisiting the fully destructible world. And, even if I can’t do that in time for release, I definitely want to explore post-release modes that rely on that kind of dynamic environment.

Building the Landscapes

Oh, man, the landscape development process has been a long and complicated road. I don’t have tremendous traditional art skills, so I had no interest in developing a landscape in-engine and painting in all this foliage and detail work, so I knew I had to rely on procedurally-texturing and detailing out a landscape. I basically started around here:

1 of 2

(Both of these from this post).

And, at the time, I felt that was something really solid. Of course, as you work and get familiar with Unreal Engine 4, you realize all of these tricks and improvements you can make to materials and landscapes and lighting and so on and so forth. So, I developed all of these different terrain datasets while just iterating on various materials of varying complexity — all with completely different methods of procedurally texturing/detailing everything.

Eventually, I felt comfortable enough making materials and terrain that I wrote up a blog post that went through my entire process. In retrospect, this is almost laughably primitive compared to where I’ve since ended up. But it generated a decent result:

Building god-game Sacrilege with UE4

I continued to iterate working out how many different layers I really wanted to have in the terrain; this blog post covers my terrain dataset construction process as well as one of the more involved materials that I tried creating which portrayed everything from sand all the way up to snow-capped mountains.

Basically, the tools I rely the most on:

  • The Unreal Engine 4 material editor (obviously).
  • World Machine.
  • And iteration after iteration after iteration.

Eventually, I realized I needed to start filling out the environment with more than just terrain. I don’t intend to nor do I really want, for this game, an open-world, so I needed to “cap” the environment somehow. Which meant that I needed to, basically, either throw up a bunch of invisible walls all over the place (my least desirable way of doing this) or make each terrain dataset an island/continent — I still wasn’t sure what kind of size scale I was really going for as an end result. And, by the way, absolutely try and figure out what kind of size scale you want to target for your end result or you’ll go through as many iterations as I did.

Anyway, to get back on topic, I needed some kind of water rendering solution.

My first solution was to integrate a version of nVidia’s WaveWorks (part of their excellent GameWorks solution) that was done by GalaxyMan2015 on the Unreal Engine forums. This was around the time that Unreal Engine 4.9 just came out. And while WaveWorks was incredibly promising, the integration and the shaders (materials) that I was constructing for it just weren’t up to my quality standard. So, naturally, I thought that I could do my own solution.

This ended up being a horrifyingly complicated two-three day shader/material development detour which is all detailed in this blog post.

Let’s just say this ended up with two primary material functions/graphs:

1 of 2

It was… Brain pain. So much brain pain. It performed adequately, which surprised even me, but it still just wasn’t up to my quality standards. So I put it on the shelf for the while as something I had to look at and ignore while I made actual progress elsewhere.

It turns out I’m very bad at that.

So I went back-and-forth on water rendering solutions for a while before deciding to just e-mail nVidia and beg them for help integrating WaveWorks. They were, unsurprisingly, amazingly accommodating. They provided me with a sample demo which helped me bridge so many mental gaps I was running into with the last WaveWorks integration as well as a bunch of back-and-forth e-mails that made everything so much clearer (surprisingly: they recommended, as I do too now, avoiding translucency in the actual material and simulating it in the shader or just ignoring it, depending on what kind of of scale I was targeting — I ended up just going with an opaque material which made performance better and visual artifacts so much easier to work around).

I should say that integrating WaveWorks into what was now Unreal Engine 4.10.1 or 4.10.2 was the cause of a three day coding and crash-hunting marathon around Christmas that I never really solved until I was visiting Washington, DC (as I was planning on moving here from Austin in the then-near future)… And I woke up at 4am one morning, had some oatmeal, sat down on an incredibly uncomfortable floor, thought about the crash for 10-15 minutes, and just realized the source of the error. And fixed it. And it’s never been an issue ever since.

Then I still had to make an good material. This was my first stab.

Building god-game Sacrilege with UE4

Oddly enough, that’s still the material I’m using now, but I’m working with nVidia on a solution that doesn’t make UE4 want to murder me. Result screenshots later!

I also really felt like I needed a strong sky/cloud rendering solution in order to sell the entire scope of the world and how godly the player felt. Luckily, there was one obvious choice: trueSKY. This was tech that I have used in the past with Unity but I feel very strongly that the Unreal Engine 4 solution, while occasionally rocky if you constantly grab the bleeding edge, is ages beyond the Unity solution in terms of visual fidelity and performance. And Roderick Kennedy, my primary contact at Simul (the company behind trueSKY), is just a great, responsive, and consistently helpful person.

While doing all this, I continued to iterate on landscape materials and, eventually, through a combination of dumb luck and hard work, stumbled on a pretty generic solution that should be reusable for a lot of the maps that I develop for Sacrilege. I’m currently just focused on a single map, that I named ‘max’ because I’ve been obsessed with Mad Max: Fury Road since the day it came out and its soundtrack since the moment after I got out of the theater and grabbed it. Anyway, focused on just a single map for now as I’m working toward a vertical slice.

Anyway, the result of all of this:

1 of 2

Materials

I try my very best to not play modeler/artist. I’m more of a technical artist (when I’m not being a programmer or designer). I know what looks good and I have, I think, a decent eye for scene composition, but I can’t for the life of me create assets. For that, I’ve relied very heavily on the insanely talented Unreal community and the people who populate its Marketplace with brilliant assets.

Once i have the core assets, then I take apart the materials and create my own materials that better match my style and lighting goals. I have zero interest in any kind of baked lighting for Sacrilege, so I often have to rework materials to look the best that they can look within a fully dynamically-lit environment. That often takes, maybe you can guess what I’m about to say: iteration.

I currently have a foliage material that I’ve applied to all of the small-sized foliage (grass, flowers, plants, etc.) that I’m mostly happy with, but it’s definitely a bullet point in my Sacrilege task list to improve the foliage lighting model. I also have to develop some universal SpeedTree materials so: A) I don’t have a different material for every tree/foliage mesh in my game, B) can apply per-map and dynamic environment material settings to everything easily. By the way, if you’re still on Unreal Engine 4.10.x, I absolutely recommend grabbing the 4.11 source code, getting the SpeedTree import plugin, and back-porting those changes to 4.10.x as it fixes some critical import errors that made mass-imports of SpeedTree assets kind of a pain.

But, yeah, basically I’ve learned over the course of my time with Unreal Engine 4 (which started with Sacrilege, as I’ve been using Unity for side-projects for a good 6-7 years) that it’s crucial to develop some base materials and then rely on material parameter collections and material instances as much as you can.

Open Environment Creation in Unreal Engine 4

I honestly can’t talk too much about the environment creation tools in-engine. I develop my terrain datasets in World Machine (using the excellent GeoGlyph macro set), import them, and then outsource all of the texturing/detailing to material graphs. I’m going to start experimenting with procedural foliage placement volumes due to some of the limitations in the procedural foliage material nodes (which are great for first-pass foliage population, but unless you have some great landscape-wide masks to rely on — something I haven’t figured out how to generate procedurally yet — they produce very scattershot results).

But my workflow basically is that: create the dataset in World Machine, output some splat maps to detail out some layers within the material graph, and procedurally populate the world with foliage (one way or another). Editing the landscape or painting in details/foliage would ultimately interfere with the iterative workflow that I rely upon frequently. This was especially true when I was frequently working on my Voxelfarm integration, as that relied very heavily on the proprietary Voxelfarm toolset (which relied very heavily on the output from World Machine).

Creating Amazing Looking Particle Effects

I WILL NOT SPILL MY PARTICLE WIZARDRY SECRETS!

But, really, 90% of the credit goes to the folks at PopcornFX. I’ve worked very closely with them on a number of projects, both professionally and hobby, across Unity and Unreal and they’re just the best bunch of folks. I’m using a secret Unreal Engine 4 integration that they’ve been gracious enough to provide for my early development needs so long as I don’t spill secrets like that the Unreal Engine 4 integration is GOING TO BE THE BEST UNREAL ENGINE 4 ASSET THAT MONEY CAN BUY. As soon as it’s publicly available, if everyone doesn’t buy the PopcornFX plugin, they’re just… Well, they’re just lost souls who are beyond redemption.

Granted, PopcornFX is definitely a technical artist’s tool, but I’m pretty confident that anyone who devotes just a little bit of time to learning the editor can produce amazing results that, and this constantly blows my mind, perform absurdly well in-engine. Here are a couple of shots of a god power that I was working on in their editor:

1 of 2

And here’s an effect I was working on yesterday for the primary faction Altar that, really, defines each faction’s world position, identifying color, and overall power:

unnamed (3)

And, for the big reveal of this effect as well as the current state of the landscape, sky, and water:

unnamed (4)

Challenges

I mean, man, what are the biggest challenges of doing this on my own? I can’t think of something that isn’t a challenge or big undertaking. It’s all an incredible amount of work and iteration and just having high standards to work until you know that something is going to be good enough to satisfy people.

It’s a technical challenge, it’s an artistic challenge, it’s a composition challenge, and, beyond that, it’s just a creative challenge to build up this world that supports the game simulation that I ultimately want to have. Every single component has to work together to immerse players in this world that I’m trying to create and that’s just a pretty profound amount of work to really pull off, but I’m dedicated to doing it and I hope that people can be playingSacrilege next year and that all this work pays off to create an internally consistent world where everything just works and reacts the way that players expect.

But to say that I don’t have any outside help is just silly. I mean, off the top of my head, I’ve had help from:

  • Patreon supporters.
  • Joy Machine site donations.
  • Beyond generous donations from friends and family.
  • My understanding family and friends who deal with me, my frequent rambling, and occasional self-imposed crunch on a daily basis.
  • The unbelievably generous and hard-working folks at PopcornFX.
  • Unnecessarily helpful people at nVidia.
  • The small but talented people at Simul for creating and consistently-improving trueSKY.
  • The team at Coherent Labs who, although I don’t have anything to demo/show yet, have worked with me for absolutely no reason other than complete selflessness to get a CoherentGT license and help my web-ignorant-self develop an incredible, responsive, and well-performing UI.
  • The Unreal Engine community, Slack channel, and forums.
  • Every single talented individual who has contributed work to the Unreal Marketplace.
  • The sidefx team for having a Houdini Indie license available and have put a profound amount of work into the Houdini Engine plugin for Unreal Engine 4.
  • And, of course, the team at Epic who have created the absolutely incredible Unreal Engine 4 and work continuously to improve it.

Things to Keep in Mind

Don’t settle. There’s always something that can be improved upon, there are always new techniques to learn, there are always tools to explore and add to your toolset. There are always people out there who would love to help you, and all you have to do is ask.

And iterate. Iterate so much. I grew up programming C++ but I still use Blueprint for game logic in Sacrilege because it lets me really and fully understand my game structure and logic and, more importantly, it lets me visually debug and quickly iterate on every single feature I add. If I had to rebuild my binary every time I wrote code that could accomplish something that Blueprint can accomplish just as well, I wouldn’t be able to provide nearly the same amount of care and polish.

(Plus, for anyone that manages both professional and hobby projects, sometimes it’s just great to be able to make the separation between what you do and the tools you use at work and what you do and the tools you use on hobby projects).

And be open about your development process. No one is going to steal your game idea and beat you to market with it. If that happens, it probably wasn’t that great an idea in the first place. Games aren’t something that other people can just take and develop faster and better; games just don’t work like that. Games are something that an individual or team develop and make wholly their own because no one else can ever fully understand the personal style and vision for a game like the people that are dedicated to seeing it succeed.

Making games is hard work. It’s even harder if it’s not really your day job. It’s even harder if you try to manage and have a life on top of all of that. Just try and figure out a balance that works for you, because it’s not going to be a short process and if you try to force an awkward balance it’s just not going to be sustainable.

Also: buy Sacrilege when it comes out. Or donate now. Or pledge on Patreon. Okay, done plugging now.

Links:

All right, that should wrap it up! Let me know if there’s anything else you need!

Trent Polack, CEO/Creative Director, Joy Machine

INTERESTING LINKS

WHAT YOU CAN DO WITH WORLD MACHINE IN UE4

BORDERLANDS AND GEARS OF WAR ARTIST EXPLAINS QUICK LANDSCAPES IN UE4

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more