Race the Sun: Behind the scenes

Something I want to do more of on this blog is to hear from the developers who are working with procedural generation and get their perspective on how they dealt with it. There’s a lot of experience out there to learn from, and it’s my hope that by sharing the information I’ll see more people succeed in using generative techniques in their projects.

I met Aaron San Filippo at GDC, and he was gracious enough afterwards to answer some of my questions about how procedural generation fits into Race the Sun:

image

How does the procedural generation in Race the Sun work?

1. We created an editor that allowed us to hand-design square patterns. The patterns are made up out of objects, which are hierarchies of other objects. So, a flock of birds is 4 birds, and a bird is a torso and two animated wings. These objects are all created in the editor down to the primitive level.

2. The patterns can be sequenced to create things like tunnels and roads etc. but beyond that,the system is a pretty dumb randomized picker. Each region will use up to 10 regions, from a pool of around 100.

3. The game is divided into regions, each region lasting about 45 seconds, punctuated by a brief breather section in between. Each pattern specifies a minimum/maximum region, so we can increase the difficulty of the patterns as you progress through the regions.

image

Were the regions always part of the plan, or did you add them later?

As I recall, we added the concept of regions after realizing that the pacing of the game wasn’t quite right. It just felt better to have a short break, and then have a distinctly more difficult section - rather than just slowly ramping up the difficulty. Also, the region separation allowed up to queue up pools of objects for each section separately, and so during the downtime in between, objects from the previous region are cleaned up and then objects for the new region are created.

image

What was your process for deciding the min/max settings for the patterns?

Mostly trial and error I think! Players on average spend most of their time in the earlier regions, so those regions have the most variety. So we designed the patterns for each region for difficulty and variety, and then occasionally adjusted the min/max depending on playtesting, if we felt a pattern was too hard or too easy.

image

How did the editor and modding work out for you?
The editor was pretty central to our success, since it allowed us to combine procedural generation with hand-authored patterns, and this gives the game a pretty unique flavor. The editor was easy enough to work with and fully featured enough that it allowed Forest (a non programmer) to implement everything without me (the programmer) needing to be involved on a day-to-day basis.

As for user modding - we had a burst at the beginning when we launched Workshop support on Steam - but the modding community never really took off in a big way. Ultimately we’re OK with this, but I’m not sure if we’d release the level editor if we could go back and do it again.