Follow us by email to recieve updates about WHY Games!

Gravity Ark's Procedural Generation: Efficiency

In Gravity Ark, if you go into a new area and suddenly the computer has to create 100 new rocks, it can cause some problems. The computer could start to slow down, or the player could see the rocks pop in/out of existence.

This can be avoided simply by loading everything at once at the very beginning, in other words a loading screen, but we here at WHY Games Studio like to jump into mobile games immediately. So, loading things at the beginning just wouldn't work.

Loading as little as possible at a time (getting smart):

Initially Gravity Ark created an entire chunk at a time, but this caused the game to stop for a second every few kilometers you progress. That's not much of a delay, but more then enough to mess up the flow of the experience. As such, we changed the generation to create an empty room and then create one obstacle in the room at a time.

Literally, the game is constantly creating things just on the edge of what the player can see. To demonstrate this, we pulled the camera back a bit.

For those interested in more technical detail, we're using Unity's Coroutines to pull this off.

Why bother loading at all (getting smarter):

All this loading and unloading seems to be creating a lot of problems, which begs the question: why bother with it?

We simply don't delete asteroids in Gravity Ark when we're done with them. They're deactivated, so that the player can't see them, but they still exist. Then when the game needs a "new" asteroid, it grabs one of the old ones and reactivates it.

Gravity Ark's Feedback: Supernova and Trails

As with any game, it is important
that the player is constantly receiving feedback on their progress and
potential risks to that progress. It important however that that feedback is
both obvious and unobtrusive. Here, we discuss a couple of design challenges we
faced to creating feedback in Gravity Ark.

The Supernova

As the supernova is the main
motivator to progress in the game as it will kill you if you move too slowly,
it important that the player has a good sense where the supernova is. So, we
started trying ways to extend what you could see of the supernova beyond the
part that kills you. The goal was to have a visual clue that danger was
impending and suggest varying degrees to the immediacy of that danger. Luckily
the package we were using to create the Supernova made it easy to add what’s
called a prominance, and it worked wonderfully. You can see the sun far ahead
of where it actually was, and it added a lot of visual flair while providing
important information to the player.

Without Prominence

With Prominence

We also started playing with
lighting:

If you're really close to the
supernova the light is red. If you're really far everything becomes blue.
Together these help tell the player how much urgency there is to avoiding
sudden death by supernova (to be honest though death by supernova is a pretty
cool way to go out).

The Trail

Feedback is also important in providing the player
with information regarding character control.

As such, we wanted the player to
have a sense of their speed and direction, so we added a trail to most of our
ships. The longer it is the faster you're going.

The trail's curve helps the player
know what direction you're going in, and how tight of a turn the ship is
making.

For
those interested we're using the Better Trails plugin on the Unity Asset
Store.

This
is Chris Ross with WHY Games Studio, hoping your day is out of this
world!

Gravity Ark's Ships

We knew early on that we wanted a diverse selection of ships. So, we made sure there was a mess of space stuff (Neptune, Sputnik, etc.) as well as some things that were a bit further out there.

Space Bat

For those who haven't heard of space bat, his story unfortunately starts with his death. Once upon a time, there was a strange heat signature on the outside of the space shuttle Discovery as it was preparing to go on a mission to the International Space Station.

When researchers at NASA looked into it, they realized that a lil' bat was hanging on the outside of the rocket.

Hoping that he would simply fly off, the rocket launched, but the bat (soon to be Space Bat) held on. NASA ended up releasing an article about it, and the obvious assumption is that the bat died, but the internet... wasn't satisfied. When he rode into space, he rode into our hearts. And thus the Space Bat meme was born.

Of course, we had to put space bat in our game.

Here's to you space bat, we hope you complete your mission!

DOGE

For those that don't know of doge, he's next to impossible to explain.

Stupid dog says things grammatically incorrectly?

...Seriously, real hard to explain.

Anyway, we thought doge was awesome and added it into the game.

Here's to you doge, may your grammar always be poor!

Shout out to Stanley Kuschick and Patricio Delgado for providing most of the text Doge says.This is Chris Ross with WHY Games Studio, hoping your day is out of this world! -WHY Games Studio

Indienomicon

We had a blast last Thursday presenting and demoing Gravity Ark at IndieNomicon. Thanks to everyone that came out to see us, I hope you had as much fun as we did!

presenting at Indienomicon

While presenting, we got to tell the tale of Gravity Ark's inception (BWAAAHHHHH!!).

Indie Galactic Space Jam

Gravity Ark started out as a game jam game, made at Indie Galactic Space Jam 2014.
When it started, I went to the front of the room to pitch my idea,
trying to get others to join me in my quest for epic game creation. The
pitch had black holes, fire, and other awesome things....
and then I had to address the one problem. I had to move in the middle
of the game jam. I literally I had to leave after the pitch, and spend
the next 24 hours moving couches and beds, missing about half the jam.

Chris[Left] pitching the idea at Indie Galactic Space Jam.
As you can see Theory on the right is not amused.

As you might imagine, this wasn't the most enticing offer, but I liked the idea, so I went for it alone. Despite a lack of polish, there was some cool physics. So, when my brother and I were trying to decide what to work on a few months ago, we decided it had potential and ran with it.

A Presentation 2-ish Years In The Making

So, after 2 years we got to present the game to many of those that had been part of Indie Galactic at Indienomicon.

Indienomicon goers got to see a presentation on Gravity Ark, and got to play a demo of the game for themselves. They could even play Gravity Ark on the Melrose Center's 12' by 8' wall. The game not only looked great (despite being 20X the intended size), but the wall actually had a touch screen. So, users could literally walk up and play.

Playing Gravity Ark on the largest touch screen ever!

For all those that came, thank you again.This is Chris Ross with WHY Games Studio, hoping your day is out of this world! -WHY Games Studio

Gravity Ark's Procedural Generation: Biomes

This article is building off of last week's article: Gravity Ark's Procedural Generation: Using ChunksA biome in procedural generation is an area where everything is generated with a similar algorithm. For instance in Spelunky, the Forrest Biome is always the second biome you hit in a play through, it looks like a jungle, uses the same chunks, and has the same level of difficulty.

An Example Biome:

For Gravity Ark, we can think of a biome as collection of chunks that are similar in some way. Some of our biomes focus on a specific elements, like the Slug nebula.

We've moved the different chunks up and down so that it's easy to tell them apart.

Most of Gravity Ark's Biomes are used purely to control difficulty though. So, we have the Easy Asteroid Biome and the Hard Small-Asteroid Biome, etc.

Controlling Difficulty:

Chunks at the beginning of a play through need to be easier, and then get harder and harder as the player makes it further and further.

When a chunk is needed, a biome is selected from a list of available biomes(with a bias toward the most recent biome selected), and a chunk is created from that biome. Whether or not a biome is available is dictated by how far you are in the game. For instance, the first biome the player meets is the Easy Asteroid Biome, which is available between 0 and 3,000 KM.

To test this out, we had the track generate far beyond what the player could see. Then we had a look and tried to determine if there were any snags. For instance, somewhere where it would be impossible for the player to make it through or if an obstacle was showing up to often.

This made it easy to iterate on the game's level design.

This is Chris Ross with WHY Games Studio, hoping your day is out of this world! -WHY Games Studio

Gravity Ark's Procedural Generation: Using Chunks

When designing Gravity Ark, we
wanted each play through to be a unique challenge. Depending on the design
goals for the game, you could either manually design enough levels that a
player would never encounter the same one twice, or you could program the game
in such a way to “design” its own unique level for each play through. This is where
the concept of procedural generation comes in.

We are writing a multipart
series on our design process using procedural generation:

Part one (You’re reading it). Other
parts to come soon!

Basically, procedural generation
allows unique levels to be automatically generated by the game’s code. At its
most extreme procedural generation could allow for infinite variety. In one
sense, infinite variety is a good thing, in that the experience should never
get stale. There is a big risk in leaving everything up to the computer though,
as it can dramatically swing how challenging a level can be and with it how fun
the game is. As such, good use of procedural generation is always a balancing
act between control over the experience and variety.

Based on the design of the project, we decided to use chunking. This means that
we are hand crafting areas (chunks) and then attaching these hand crafted areas
together.

A Chunk:

In Gravity Ark, chunks are created on an 8 tall by 10 wide grid.

This is one such chunk

However, each individual asteroid is not stored. We save a text file and a single asteroid, and then copy that asteroid as many times as needed while the game is being played.

An example character sheet

As far as procedural generations go,
this is actually extremely straight forward. Which allows us to have a lot of
creative control over what the player is experiencing, while still offering a
lot of variation to the player.

Variation in the chunks:

When a player plays a game that uses chunking, they can start to remember individual chunks and that can hurt the experience. So we started using probabilistic tiles. For instance, when the character sheet has a 3, it means there MUST be an asteroid at that location, but when there's a 2, it means there MAY be an asteroid there.

At this point
everything seemed to work great.

“Hurray! Let’s ship
it.”

However, there was
an issue we both missed. One of our play testers (Thanks! Chris Vento),
realized that you could go through all the asteroids in a
straight line indefinitely. For those that haven't played Gravity Ark, there are asteroids you are attempting to avoid. Mr. Vento realized you could line things up in such a way that you could never touch the controls and never loose. To fix this we decided to jostle the vertical
position of the asteroids to give us a bit more positional variation.

When this is combined with a random rotation, we get:

That’s it for now. Check back in soon
for more on how we used procedural generation in our game Gravity Ark.

This is Chris Ross with WHY Games Studio, hoping your day is out of this world! -WHY Games Studio

The Game

In Gravity Ark, you use the power of black holes to propel humanity to safety from a supernova!

We're happy to say that Gravity Ark has officially released on both Google Play and iTunes's App store.

So, how do I play?

Gravity Ark is an endless runner, with a supernova on the left and endless space on the right. With the touch of your finger, you create black holes, whose gravity redirects your ship, enabling you to avoid the asteroids ahead!

So, what about more ships?

You can collect ships that span from the Earth to Space Bat, with a selection of the coolest spacecraft to see the end of the solar system.

Collect ships and beat your high score in Gravity Ark, but most importantly: Stay alive!

This is Chris/Matt Ross with WHY Games Studio. Hope your day is out of this world! -WHY Games Studio