From The Vault: First Mockups

Ahoy! I’m Xin, the Kitfox art officer. Today we’ll be digging up some artifacts from the archives, the first mockups created for Shattered Planet in 2013.

May 2: Space travel is cool. Video games need more fish spaceships.

spacegame_mockup2
shipstest

May 6: Maybe a separate screen for combat?

XRL_CombatSysMockup1

May 16: But we wanted to focus on planet exploration!

spacegame_mockups3A

These guys are adorbs, but we thought it made our Roguelike look too casual.

spacegame_avatars1

June 7: So we tried out three different aesthetics.

XRL_ArtStyleMockup1
XRL_ArtStyleMockup3Island_compare
The last one dates from mid-June 2013. You can see the beginning of the tile-based island formations. We felt a disconnect between the characters and the environment, so we opted for painterly look for everything. Mockups were great for brainstorming the art direction, UI/UX and even game mechanics! Possibly my favorite part of pre-production.

Friends to the End: Companions

We’re pleased to reveal the Companions feature in Shattered Planet! On the planet, most aliens are either aggressively territorial, or don’t particularly care that a human might wave a tri-corder at them.

Occasionally, however, you’ll have the opportunity to befriend an alien, either through strenuous circumstances or random chance. For example, here’s a randomly accessible storybit that gives you the opportunity to either Attack or Feed a crablet:

choice

I’ll leave it to your imagination which leads to adopting a pet crablet… but you’ll need a high Wits score to dodge those hungry little claws…

Anyhow, when you’ve somehow acquired a Companion (be they alien, robot, or something else entirely), they follow you loyally until the end! Companions universally hate to see you get hurt and most will literally jump in the line of fire to protect you, whether it’s to fend off a turret or a space-dragon.

We’re in the midst of designing a unique Companion creature and we want your input! Which critter would you rather have following you throughout the planet?

Click the image below to vote!

PetsRound3

Level Design and Procedural Generation in Shattered Planet

Overview

Tanya here! This is a more detailed look at the procedural generation in Shattered Planet than we’ve ever shared before! It’s targeted towards game designers and any who are interested in learning more about game design.

I’ll talk a bit about our data structure, I’ll show a bit of the tools I use as a designer, and show how the complexity grew quite naturally over time from a simple premise. Keep in mind that I am not a procedural generation expert – I didn’t write a single line of the procedural generation code in Shattered Planet. All high-fives and awe-struck eye-shinings should be directed towards Mike, Jongwoo, and Greg.

pocgen3

However, as the designer on the project, it was my job to define the intended player experience, and work with the programmers to translate that into workable rules for the game’s engine to follow. So that’s what this is mostly about — a slightly higher-level look at the logic behind the system, rather than the code that actually runs the system.

If you’re interested in the actual code, let us know in the comments or on our Facebook page and we’ll see what we can do!

So without further ado… let’s think back to the beginning.

The Goal

We started work in the beginning of June, 2013. After two weeks, we had finished with our little prototype and we our gameplay was essentially a turn-based RPG in procedurally generated levels. We knew we would be using Unity.

Not long after, we decided on three design pillars to inform all of our design decisions (with some art direction impact as well):

* Intriguing: entices the player to be curious, and rewards experimentation & exploration
* Strategic: rewards tactical play — various different ways to achieve combat superiority, resulting in difficult decisions
* Accessible: immediately engaging, with lots of feedback, encouragement, and opt-in information

These each, of course, had their own risks if any one aspect became unbalanced or poorly implemented. If the ‘intriguing’ content is too mysterious, it may be invisible to players, or downright bewildering. If the strategic component is too strong, it may be off-putting or intimidating for players, especially on tablets (unless we think we can subsist on poaching Paradox fans). On the other end of the spectrum, if there’s accessibility without strategy or mystery, it will feel like an empty shell of a game with nothing worth engaging with in the first place, especially for more hardcore gamers like myself.

But before you have a level, you need the building blocks.

Room Structure

We wanted to be able to learn from the reams and reams of information online about procedural generation of game levels. Most of these involve “dungeons” assembled from tile-based, rectangular “rooms” and “corridors”. However, to keep with the “shattered planet” feel, Xin directed that our rooms would be more organic in shape. This is cool, but makes it so we generally can’t ever use someone else’s algorithm.

So, we give each room a minimum and maximum height and width, using square tiles. For example, a room might be a minimum of 2×2 but a maximum of 4×4. This results in a variety of possible sizes. Here’s an actual shot of what my design tool looks like, for determining the room size potentials (each level set has 4-5 room definitions):

roomdata

(Note, since it’s not obvious from context: Min and Max “Num Rooms” actually refers to how many of this particular room definition are allowed to appear in a level. The above is a snippet from the “RoomsBasic” level set, as opposed to the “NoLakes” level set, etc.) This results in something like this:

level generation design

As you can see, each also has the possibility of internal “holes”, or “lakes” to be generated. This is handled entirely by the engine — as a designer, I merely specify whether or not a given room can have a lake or not. Depending on the theme (desert, laboratory, etc), the “lake” may look like water, lasers, acid, etc. As the designer, I can also decide per-theme which tiles rooms should use (just dirt and brush? Or just dirt and grass? Or a combination of all 3?), and which obstacles (rocks, mushrooms, a combination, etc). Another tools screenshot:

themedata

(Gen Dirt = Generic Dirt, Des Sandstone = Desert Sandstone, StoneDirt is half of each!)

Each room also has (thanks to our lead programmer, Mike Ditchburn) 2-4 tiles set aside as potential “door” tiles, one on each side. Once these are actually connected to other rooms, the game uses a pathfinding algorithm to decide where it’s “safe” to place obstacles — i.e. where it won’t block the player from traversing the room or accessing treasure.

obstacles

So, taking these rooms and my experience in traditional level design, we built the initial algorithm for how our levels would be generated, which was all about the Critical Path.

Critical Path

If you’re a level designer, you know that the ‘critical path’ is the way the player MUST go, in order to complete the level, with no side-tracks, distractions, or mishaps. Typically, to encourage players to continue on the ‘correct’ path, designers place rewards such as coins (similar to an enticing trail of Reese’s Pieces), and enemies… because rather than run away from enemies, most players find it more fun to approach the enemy head-on and engage in combat, assuming combat is a fun, central feature of your game (i.e. not a stealth game). This pulls the player forward.

So, in Shattered Planet, one of the first rules of level generation was that the engine would establish a “critical path” of rooms, which contains the player’s starting “room”, the final “teleporter” room, where the player escapes the level, and all rooms directly in between.

criticalpath

We then treat these rooms differently than side-rooms. Where critical path rooms get lots of little piles of coins to lead the player forward, side-rooms get “treasure piles” — fewer but larger coin-heaps. Similarly, where critical path rooms get fairly average-difficulty monsters, wandering off to the side-rooms may result in occasional monsters of greater difficulty. This is supposed to create a sense of risk for reward — generally, going the opposite direction from a big baddie will result in finding the teleporter, but also in avoiding treasure.

So at this point, without any further improvements, this is what the maps look like in the editor (circa July 2013):

pocgentriptych

Locked Doors

To add a bit of variety and reason to explore the corners, we added locked doors, with keycards scattered somewhere else in the level. Rather than block the player’s progress (or frustrate them if they’re in a hurry, with the Blight on their tail!), we decided to use the locked doors only for optional bonus treasures (and monsters!). So, we wanted to make sure the locked doors never appear on the critical path. Since we know which rooms are on the critical path and not, it was an easy enough upgrade to remove one corridor from an off-path room temporarily and replace it with:

(You can also see a locked door in the first panel of the triptych above, if you squint hard)

desert

Alternate paths

Almost as soon as we had the critical path and side-rooms laid out, we realised the levels were pretty boring. They had a lot of dead-ends, which resulted in lots of back-tracking, especially for treasure-hunters… far from the Zen flow of a good level. In fact, a room could only have a maximum number of 2 exits, in the above maps!

So, to add variety and ‘flow’, we tacked on room connections, after the critical path and side-rooms have been positioned. Remember how in the “Room Structure” section above I said we mark out 4 “doors” per room? Well, we use those again! We (by which I mean Mike tells the engine to) find a couple of doors near each other, and draw a straight line between them, as best it can, turning a right angle if needed.

junction

This added a much-needed refreshment to the dead-end problem, and makes exploration that much more interesting.

Exceptions

As with any rules, there are always exceptions. Even in game design.

We also had to build a separate set of tools to make “hand-crafted” levels, including the space-ship that serves as the player’s hub, as well as potentially other secret special levels.. (nope, no spoilers!) We tried to re-use the same data as much as possible. So, I place the same TerrainData cubes around as tiles — see, here’s a peek at the hub, only where I’ve taken the normal tiles and replaced one with the old familiar “Gen Dirt” from before.

tilehub

I can also place the usual enemies and obstacle data objects I use to populate themes.

Future Changes and Lessons Learned

There’s always more to do! The level design is about done, but we want (as you may have noticed in the Critical Path illustration) alternate teleporters that can let you skip to special/secret level themes, special ways for the player to creatively make their own paths to floating rooms, maybe even the ability for the player to swim!

But if we’ve learned anything from all this experimentation from the last few months, it’s:
* Apply traditional level design principles, with flexibility — they’re still useful!
* Procedural generation takes a crazy amount of testing! Just replicating a bug can take hours of loading and re-loading.
* Stay open-minded to possible improvements, after you’ve “finished” implementing your procedural generation.

Thanks for reading. If you want to learn more about level design or game design, I recommend checking out this list of compiled design resources on Tigsource — some are free online.

For those of you only interested in the future of Shattered Planet, never fear! The weeks are counting down to launch, and we’re scrambling to get the content and code polished and bug-free for your eager downloads. If you haven’t signed up for the newsletter yet, consider doing so, for the best news, previews, and secret party invitations.

Design Log 01: Mystery Items

On your adventures, some items you find are of obvious use. Obviously juice boxes and fresh meat are delicious. Nom nom.

foods

But sometimes, you’ll come across bottles of alien fluids. As the typical packrat adventurer, you’ll be compelled to pick them up and store them in your backpack. That’s just what you do, right?

Well, when you find a Fluid, you can’t be sure what it will do. Some Fluids are best to drink – they heal you, or give you Strength. But some Fluids are better to throw like grenades – they are flammable, or cause radiation poisoning. The only way you’ll know is to drink it or throw it, and watch what happens.

Let’s say, for example, you throw your Red Fluid on an enemy. It splashes, breaks, and nothing seems to happen. Hmmm..

What, punk? Come at me.

What, punk? Come at me.

So let’s say you find a second Red Fluid. Since throwing it didn’t work last time, this time you drink it…. And become Sneaky! Enemies won’t notice you as easily. For the rest of this run, you now see that Red Fluid are actually a Sneaky Drink.

fluideffects

Through similar experimentation, you discover the Blue Fluid is radioactive toxic waste and the Green Fluid is healing. Well done, scientist!

But the next time you start exploring, the Fluids are re-randomised again. Blue could make you hallucinate. Red could increase your Wits.

fluideffects2

Similarly, alien artifacts can have a variety of effects based on their crystal’s power – beware healing your enemies during your experiments, or setting an ally on fire!

guns

Some might point out, correctly, that we’re inspired heavily by our love of Brogue!

Our hope is that this can encourage player superstitions, strategy comparisons, and by-the-seat-of-your-pants extreme decision-making. When there’s crabs everywhere, and you only have a few hitpoints left, you can either guzzle all of your fluids, or throw them and fire your guns wildly in the hopes it will distract them enough for you to make your escape. It’s a balance challenge, but ideally players can debate the optimal time and place to experiment.

We’ve brainstormed over 50 possible effects for Fluids and crystal guns, but there’s room for lots more.

Do you have any interesting ideas for interesting effects from drinking a mysterious alien fluid, or firing an alien artifact? Leave your idea in the comments!