Cooking with Butter

Butter Royale is our food fight-themed battle royale game that puts a family-friendly spin on this multiplayer genre. It was released on Apple Arcade earlier this year!

We built this game in under 6 months and we would like to share the engineering’s team experience of it.

What do we need to do?

Based on experience from previous projects, we decided on the following key objectives for the project early on as a team. We find that this helps the team maintain focus and be able to stay aligned throughout the lifecycle of a project.

  1. Scalability — servers should be able to quickly and effectively scale with numbers of concurrent users
  2. Quick Iterations — given the tight project timeline, the team wanted to be able to iterate as quickly as possible, without having to reinvent common game features
  3. Security — player data must remain secure at all times
  4. Smooth and responsive player experience — be it in the menus or during matches, all our players should have a smooth and consistent experience

How are we going to do it?

We took inspiration from a few places! The links to these videos and talks can be found at the very end of the article if you’re interested.

Overwatch’s video¹ on gameplay and netcode was the inspiration for using an Entity Component System (ECS). A couple of examples were given about how certain features were made easier using ECS and a lot of advice on how to design systems that are decoupled, less complex and maintainable. The Bears have been using Unity for many previous projects. Unity has an ECS implementation that is only in preview but we were motivated to use it for Butter Royale for the following reasons:

  1. There are many ways to do the same thing in Unity. We wanted an opinionated way to write game simulation code that is separate from the representation code. This makes it easier to both add new features and write tests for the crucial parts of the game.
  2. Unity’s Data-Oriented Technology Stack (DOTS), which ECS is a part of, promises performance by default. This would be key to delivering a #ButterSmooth experience to our players.

We had a really tight timeline of 6 months to work on the game so we decided on a client authoritative approach inspired by Futureplay’s Unite talk². The clients are responsible for simulating their own perspective and our server backend does some error checking, controls supply drop timings and butter shrinking timings. We decided on this approach for the following reasons:

  1. The game was designed early on to have an offline game mode. We did not want to re-implement gameplay logic both in C# on the client-side and on our Java backend.
  2. Since the full match logic resided on the client, we were able to use editor tools to quickly iterate on game features. This helped us to fine-tune, for example, the bots, which made the whole game experience feel much more lively.

We built a prototype!

We wanted to get to a point where the team can play the game and have fun so we focused on getting a complete match loop early on. In a couple of weeks, we had a build where players could run around in a simple environment and sling food at each other. This really psyched the team up as it showcased the potential of the game we were building in the months ahead!

DOTS was the biggest unknown factor in our plan. We did not have any experience with it and, since it is in preview, there is very active development and any updates could introduce breaking changes that we would have to address. Getting our hands dirty with this from the start allowed us to identify problem areas and be able to reach out to Unity with the right questions so that they could give practical and actionable suggestions. Having Unity’s team at hand to answer any questions we have about DOTS early on helped us overcome roadblocks despite our inexperience with the DOTS best practices.

What’s next?

This covered, at a high-level, our thinking and processes at the start of development. In our following articles, we will share in more detail how we use ECS with an example game feature.

Meanwhile, here are the videos that we mentioned above:

Cooking with Butter was originally published in Mighty Bear Games on Medium, where people are continuing the conversation by highlighting and responding to this story.