Programmer Ramblings – Spawning and Runtime Performance on Maneater

I worked on Maneater from approximately September 2018 to November 2019 when I left Tripwire Interactive. A lot of what I tended to focus on through my time on Maneater was CPU-based performance gains on the UE4 game thread, so I wasn’t generally involved in other typical performance bottlenecks (particle cost, GPU time, etc), but there was enough work on the game thread to more than fill my time while I was on the project. Among other things, two of the systems that I was most heavily involved in were a refactor of the spawn system, and work around handling runtime performance optimizations. While I can’t really speak to what performance looks like on the shipping game, I can speak to some of the choices I made along the way, and how those two systems work in tandem to achieve performance gains.

Where the hell do I start?

That really was the first decision to be made. The game I started working on when brought in-house to Tripwire was much different from what Maneater became, but at its core the big problem was that the original game was made for high end PCs. It had a ton of classic spawn points, spawned everything pretty much at once, and didn’t do any performance reduction on the actors in the world. I knew one of our goals at the time was to see if it could get running on Switch, and I absolutely knew it needed to launch on Xbox One and PS4, all three of which are distinctly not high end PCs. With that in mind, I had at least a rough approach planned out:

  • Do all my optimization work on Switch. Any frame time gained there applied to other platforms. If I had the game thread at ~26-28ms on Switch, the other platforms sure as hell would run fine.
  • Fix spawning first. I needed to control how many things were in the scene at one time as a first order of business.
    • This also came with refactoring the design tools. Hand placing spawn points didn’t scale well for level designers, and at runtime iterating over hundreds of hand-placed actors didn’t make sense. This needed to be replaced with something else.
  • With spawning under greater control, start working on more granular framerate improvements:
    • Once I could run at a stable framerate with spawning under control, start optimizing the runtime aspects of the game.
    • As the framerate improved, start spawning more things to fill the now free frame time to give higher AI density in the world.
    • Rinse and repeat.

This formed the basis of my plan to get the game running well. While it wasn’t the only set of systems I was involved in, it was definitely the one I spent the most time on throughout my life on the project.

Game Ramblings #112 – SnowRunner

More Info from Saber Interactive

  • Genre: Simulation
  • Platform: PC
  • Also Available On: Xbox One, PS4

This is sort of a ramblings in-progress, but in general it felt like a good point to do this. This is a lot like Forza Horizon, not so much in game style, but in the fact that it feels like the kind of game I’m going to repeatedly pick up to fill gaps here and there. There’s a lot of stuff to do in the game, and it always felt fresh doing a new task. It was never really that the tasks were new, or necessarily in areas I hadn’t seen. However, I was getting a constant drip feed of upgrades, new vehicles, and more that always opened up new ways to achieve things. Despite some pretty rough UI/UX spots, this is still one of the bigger surprises of the year.

This is basically a Euro Truck-style simulation, but it’s so much more than that. It’s a challenging and detailed experience that doesn’t leave you room to be lazy. Stop paying attention going downhill with a truck load? You’re probably gonna end up going to fast and running off the road. Being too aggressive with turning while climbing a hill? Be prepared to roll over. However, it absolutely breeds a certain type of patience in how it forces you to treat the driving experience, and it’s that patience that really drives the gameplay forward. You’ll screw things up in ways that in hindsight are blindingly obvious, add that to your mental checklist, and now be a much better driver for it.

It’s extremely gratifying hitting your end goal, whether it’s finding that perfect view on top of a peak while scouting out a new area or after convincing a huge trailer of goods to make it through a snowy pass or meticulously pulling a truck that’s stuck in the middle of a mud pit. All of these actions require some amount of careful planning, as well as a nice amount of skill on execution. You’re always going to want to bring the right truck (Need to pull a trailer? Bring something with power!), the right upgrades (Lifting crates out of a river? Bring a crane!), or even the right route to your goal (Doing a long drive? Plan a route with gas stations along the way!) The combination of planning and skill is at a point that feels rare, even in the simulation space.

The variety at play here is also a lot of fun. There’s a ton of different sizes of trucks that are better or worse at different things. If you want to go and see a new area, take a small SUV like the International Scout. If you’re looking to pull a bunch of goods, you’ve got all scales of different trucks to choose from depending on whether you want speed or brute strength. If you’re really looking to get through some bogged down muddy areas, go straight at something like a Caterpillar even if it means taking it really slow. That variety also works out well in the environment. You start out in Michigan, full of mud and water. You end up moving to Alaska and Russia where deep snow banks and icy roads become the king.

All of this is wrapped into a core loop that encourages you to kind of do what you want. There’s a number of spots in each area that require you to do repairs to improve your overall driving flow. This runs the gamut from taking care of downed power lines and rock slides to building new bridges to provide ways across rivers and canyons. Feel like just going out and exploring a bit? There’s some tasks to send you off on big exploration climbs in the woods. There’s also vehicles and upgrades to find scattered all over, improving your overall capabilities. Feel like just making some money? There’s all sorts of delivery tasks to do to just get yourself some hard funds. Each piece of this provides something directly beneficial to you, so even if you’re just screwing around, you aren’t wasting time.

However, like a lot of simulation games this one definitely has its pretty rough edges in the UI/UX space.

One of the first oddities that will hit you is in how they offer up tasks and missions. There’s a big ol list of them in your pause menu, and you can see the exact specific things that need to be done. However, you have to go to some specific spot to start the task, THEN you can deliver things. In cases where this is just deliverable products? Who cares, bring them on your way to the task, accept it, and immediately deliver it. But for tasks that require you to deliver some specific piece of equipment? Sorry, you can’t grab that until you accept the task. However, some of the tasks are gated behind progress anyway. It feels like once a task is unlocked, you should be able to just do the damn thing instead of having to drive around to hit yes on starting it.

There’s similar oddities in the general placement of things. Of the zones I played, there were two things that I really noticed – the garages where you go to upgrade and purchase vehicles are basically in a corner of the zone and gas stations tend to not be equally distributed. These two things aren’t really deal breakers, but it results in awkward flow issues. There’s sections of the game where you’ve got reliable access to fuel or easy access to the garage to modify your configuration. However, there’s as many times where you’re driving 15-20 minutes, realize you need to make a change to your vehicle and have to redo the entire trek again. Even worse is times when you simply are out of gas at the end of a multi-part task because you were on the one side of the zone with no gas stations. It may be a very “gamey” type thing, but centralizing the garage and making sure that gas stations are at least distributed better would go a long way to improving the overall flow of just being out and about completing things. Ultimately these things are easy to solve thanks to the fast travel button to take you back to your garage, so it feels weird that there’s a layer of friction in place to begin with.

At the end of all this though, this is a surprise hit. It’s a surprise hit in much the way that Euro Truck Simulator was a surprise hit to me. It’s something that should be a wildly niche product, and while it’s crafted with love it has a lot of rough edges from being in that sort of AA quality space. However despite it all I just couldn’t put it down for days. I would constantly be finding that new upgrade or grinding out a bit of money to pay for that new truck or taking my SUV out and climbing just one more peak, and loving the experience the entire way. It’s just one of those games that I can’t really explain why I enjoyed it so much, but can just recommend, and I’ll continue to look forward to jumping in to fill some time, even if for just one more delivery.

Game Ramblings #111 – Trials of Mana (Remake)

More Info from Square-Enix

  • Genre: Action RPG
  • Platform: PS4
  • Also Available On: Switch (original in Collection of Mana and remake), Windows
  • Originally On: Super Famicom

Where Final Fantasy VII Remake took a classic and completely reinvented it, this is more of a careful remake. Ya it does some things different than the original. Ya it’s in 3D. However, it follows a pretty safe path in modernizing the original instead of reinventing it. At the same time it’s a lot of fun on its own, so I didn’t particularly mind the areas where it still felt stuck in the 90s. If it wasn’t for AI difficulties, I would have no problem pushing this one more, but the AI really ran into problems that I’ll get into.

Where Secret of Mana’s remake felt odd because it stuck to its design, Trials feels good for the same reasons. Trials in general was always a more modern approach to the ARPG formula, having things like distinct combat areas, combo-based attacks instead of stamina, easy access to magic and skills, etc. It all worked pretty well on the SNES. In 3D it still works just as well thanks to some pretty solid implementation of hard lock targetting and target switching on the right analog stick. In its current form, it feels pretty reminiscent of the Tales of series, which caught me pretty off guard. The fights have a pretty good flow to them in normal trash fights, and for the most part the bosses played a balance that I really enjoy – not punishingly difficult, but longer in form and with multiple distinct phases, forcing you to keep focused and learn on the fly.

However, the boss fights are really where the AI struggles. As the game progresses, there’s more frequent segments where some high priority targets spawn with a timer. At the end of the timer is usually some punishing mechanic – maybe the boss gains 15% health back, maybe there’s large AoE damage, maybe there’s more adds, maybe it’s a guaranteed party wipe. By and large these are things that MUST be killed, and fast. However, the AI has extreme problems targeting them, and if you even get lucky, the AI typically won’t hit them more than once or twice before going on cooldown. Of the probably 6 or 7 times I party wiped in the game, I think only one of those was because of something other than a timed segment where the AI simply didn’t attack.

On the other hand, the game is extraordinarily clear about how the enemy is going to target you with special and magical attacks. Targeters are large and red, and very precise to the area that will be hit. They also fill in various ways to indicate when attacks will take place. Circle AoE fills from the center out. Sweep cones will go from the inside to outside of their sweep. What I like about all of this is that dodging attacks is never about small tells or dramatic animations. It’s 100% about paying attention to where you are, what the targeter is doing, and having an idea of how long you can stay in place attacking before dodging the hell out of the way. It’s both incredibly clear in execution, and allows for attacks to be incredibly punishing when they hit you, which ends up being a very fun and very fair combination.

The rest of the game kind of is what it is. The story is a straight pull from the 90s, and is a plot we’ve seen 1000 times before. It’s got a pretty cliche fantasy take on some other dimension dude taking over someone’s body and sending its minions in to sow chaos and take over the world. On the other hand, they’ve added a ton of voice acting across the board, so the story that is there is much more alive than in the past. Towns still feel like 90s JRPG standards. Ya there’s a bunch of people, but they nearly all throw irrelevant one liners in conversation. As a result, towns still work as the usual standard three stop affair – weapon shop, armor shop, inn to sleep and save. However, it’s still as fun as ever to walk into a town and buy out the entire upgrade stock, leaving the town as a more powerful badass version of your party. This release also has the same class tree as the original, which is effective but nothing new. Each branch of the tree has a bit of a specialization, and you can definitely tailor it to your preferred style, but it’s not doing anything that isn’t standard to the genre.

As safe as this release was though, it is still fun. Ya the AI problems on boss fights suck, but you get through them. Because the battle style focuses more on skill than numbers, I didn’t really need to putz around grinding. However, the game also gave out a fair amount of XP to balance that so it wasn’t like I was surviving purely on grit and determination. Trash fights have a really nice flow to them, so that never got boring. Ignoring the AI problems, the boss fights were also mechanically fun and long enough to feel like a real accomplishment. Is this as impressive a remake as Final Fantasy VII Remake? Absolutely not. However, it doesn’t feel like it was trying to be, and where it ended up feels like where it belonged.