Inspirations

Almost everyone involved in indie game development these days gets into it for the same reason – we played games, we liked those games, and they inspired us to make our own games. We want to capture whatever it was that made us love the games we played when we were younger. Whether it was the storyline, the art style, or the gameplay itself, these games made us who we are, and they influence every decision we make in our own games.

A few weeks ago, I was discussing game development with a friend when they asked me “what are your favorite video games?” After I rattled off a few, they asked another question – “Why?” This was followed by a really interesting conversation, because the games I chose were so different, and yet they all influenced the way that I design and make games now.

So I’m going to share that list with you now. I’m going to tell you my favorite video games and how they have affected my own game development, and I hope you’ll think about your own answer to the question as well; what games make you want to make games?

 

Monument Valley

Image result for monument valley game

When screenshots of your game are good enough to be your part of your marketing material, you know you have a beautiful game

I’m gonna start here, because I mentioned it last week, and because everyone is expecting it. If you’ve played Where Shadows Slumber, then it probably reminds you of Monument Valley. This isn’t exactly intentional, but I would be lying if I said that we weren’t inspired by Monument Valley in a lot of our design decisions.

There are a few things that Monument Valley did that were very important. First and foremost, it’s beautiful. I’m not one who really focuses on how the games I play look, but Monument Valley manages to be beautiful beyond the point of ‘good graphics’ and actually into the realm of ‘art’. This aesthetic quality is something that isn’t necessary for a game, but if you go for it, it definitely wins some points.

Secondly, Monument Valley showed that you can have a game with an incredibly simple concept, yet still have intricate, mind-bending puzzles. Additionally, it does so on a form-factor (mobile) that doesn’t lend itself nicely to this type of intricate, high-quality game, and still managed to do well, despite the industry’s focus on the ‘freemium’ monetization model. Monument Valley showed, most of all, that if you really put a lot of work into making a truly incredible game, you can be rewarded for it.

 

StarCraft: Brood War

Image result for starcraft brood war

Graphics aside, still one of the best games out there

Ah, StarCraft. This is really where it all began for me. This was one of the first games I really got into, and it became a very important part of my childhood. If I had to pick one game on this list as my all-time favorite, it would have to be StarCraft.

When I was talking about my favorite games and StarCraft came up, I tried to think of why it was my favorite game, from a game design perspective. StarCraft is a very complex and strategic game. The skill cap is incredibly high, and there’s always room for mind games and counter-play. I played a lot of competitive games of StarCraft, and I spent hours perfecting my worker split (for those of you who don’t know what that means, just be glad you didn’t have to do it). The depth this game has is fantastic – but are any of those really the reason I loved StarCraft so much?

No – the reason I loved StarCraft so much was the way it created memories of playing with friends. It wasn’t the game itself that made it fun, it was the people I played it with. When I think of StarCraft, I think of the 5-player game where one friend had nothing but a single pylon and about 40 Corsairs – every time someone else won a battle, those corsairs would arrive to finish off his fleet. I think of the time I won a game by building nothing but Ghosts and Valkyries, for some reason. I think of the EMP-Nuke rushes, the epic micro battles, and the mind games. Most of all, I think of laughing with my friends as it all went down, and even occasionally loading up a few replays and just watching them.

Children’s special on the meaning of friendship aside, these stories and interactions are the reason I love StarCraft. Unfortunately, that doesn’t really inform any of our game design decisions – you can’t build any of that stuff into a game. What you can do is make a game that has the potential for these stories. Make it so that your players can do crazy, funny, awesome things. Your game may be strategic, intense, and mind-blowing, but, above all else, you need to make sure that it’s fun.

 

Cave Story

Image result for cave story

I can’t think of a quote for this picture

Cave Story is a testament to what indie games can accomplish. Cave Story was created, music, art, gameplay, and all, start to finish, by one guy in his spare time. And, aside from being an inspiring story, it’s also an incredibly great game!

In my mind, the reason that Cave Story is so good is that it doesn’t make any concessions. Every part of the game is great. The storyline? Funky, but really cool. The gameplay? Skill-testing and engaging. The music? Amazing! For almost any facet of a game that you might ask about, the answer for Cave Story would be “yeah, it has that, and it’s awesome!” It just feels like an absolutely complete game. Comparing a game like Cave Story to a lot of the pretty good, mostly-finished games you see really drives home the importance of actually finishing your game. Rather than saying “yeah, the controls are a little off, but it’s not a big deal”, get in there and fix them!

The other big reason to talk about Cave Story on a game development blog is because of its development. Cave Story has become a sort of cult classic, in a good way. It’s so incredibly inspiring that one guy can make such a great game in his spare time.

 

Rocket League

RL

Calculated.

Rocket League, also known as Hot-Wheels soccer, is the game I’ve been playing the most recently. As such, I have a pretty good feeling for why I like it so much. There are really two reasons.

 

(1) The controls in Rocket League are phenomenal. Imagine you’re playing some other game, and you miss an objective (whether it be a goal or a kill or whatever). Inside your head you’ll end up saying “I would have had it if the controls were better”, or “I was trying to move to the left, but my guy didn’t go where I wanted”, or something like that. You can always blame the game, rather than yourself.

In Rocket League, you don’t have that luxury. Once you figure out the controls, it’s all on you – when you tell your car to do something, your car does exactly that. This can lead to a little frustration, but it also leads to some absolutely incredible plays from the pros, and it means that every time you do something right, you feel that much better about it. There’s no better feeling than flying through the air, using your boost and turning you car in exactly the right way to score a crazy goal, and knowing that it was all you. That feeling wouldn’t be possible without the most finely-tuned controls.

 

(2) The other great thing about Rocket League is what I’m going to call it’s ‘skill curve’. This is different from a ‘learning curve’ – a learning curve implies that the game gets harder as you go, so you have to learn in order to beat it. The ‘skill curve’ is the inverse of this. You’re never ‘not good enough’ for a game; rather, as you play, you get better. This is true of most games, but it feels the most rewarding in Rocket League.

When you first start to play, you have a hard time hitting the ball. With enough practice, you start to hit it pretty consistently – that advance in skill is noticeable, and it feels great. Just as you’re getting good at that, you realize you’re not rotating properly. When you start to master that, you begin doing aerials. You’re always getting better, and you always feel like you’re getting better – your skill level never plateaus, you just keep getting good at the game.

 

Rocket League isn’t what I would call a deep game. There’s no storyline, no (or very few) different levels, nothing really new about the game. Psyonix does release different game modes and new maps from time to time, but the core gameplay remains mostly unchanged. And yet, despite this, it’s the game I keep returning to. It never really gets stale, thanks to its controls and skill curve, which is incredible for such a straightforward game. Rocket League shows that you can give any game a lot of replay value just by making it well.

 

Portal

Image result for portal

In search of cake

Portal is just an incredibly solid example of a well-put-together game. At the time, it seemed to be a sort of ‘add-on’ game, a little nugget that Valve added into The Orange Box. While the other titles in The Orange Box (Team Fortress 2 and Half Life 2) were really awesome, it was Portal that stood out to me, and to most people that I talk to.

Why? Well, Portal wasn’t just another game. The thing that excites me most about any game is when it explores new design space, and that’s exactly what Portal did. There were no guns to shoot (well, no real guns), no enemies to destroy, no princesses to rescue. You’re simply introduced to the world and the theory of portals, and you have to make your way through it. Your only weapon is the portal gun, and your only enemies are the levels themselves. It’s a very simple distillation of the essence of a puzzle. This is something that I aim for when designing my own puzzles – if you still have design space to explore, there’s no need to complicate your levels.

Portal really provides us with a master class on not overstaying your welcome. Really, it was the perfect length for what it was. You learn the mechanic, you get to used it, and you advance through puzzles with it. By the time you reach the end, you’ve explored most of the design space, but haven’t gotten to a point where it’s become timesome or tedious.

Plus, Portal does a great job of indicating its short, jolly mood through the use of its witty writing. This combination of very pure puzzles and inviting storyline is a design marvel, as it makes it very easy to draw a player into your game. The biggest takeaway from Portal, for me, is that more game doesn’t necessarily make for a better game. Content is king, and having more gameplay is usually a good thing, but it is possible to focus too much on length, rather than good design or implementation, and end up ‘overstaying your welcome’.

 

What I’m Most Looking Forward To

In addition to games from the past, let’s take a look at a game from the future! The future game I’m most looking forward to (other than Where Shadows Slumber) is a game I saw at PAX East this year. I only got to play the demo for a few minutes, but I’ve been really excited for it ever since. And the winner is… The Gardens Between!

Image result for the gardens between

Check out the haunting cell-shaded indie goodness!

After checking this game out, I’m sure you’re not surprised that I chose it. After all, it’s an indie game with a cell-shaded art style, a slight metaphysical twist, and gameplay based at least in part on lanterns! How could I not love it?

Parallels with Where Shadows Slumber aside, this game looks awesome. The controls are very simple and intuitive, and yet the puzzles show a depth that promises very interesting and challenging interactions. The game looks relaxing, sleek, and challenging, which, to me, makes for an awesome upcoming game. Props to The Voxel Agents on what looks to be a great title!

 

That’s Not All…

This list is by no means exhaustive. In fact, in an effort to pick my favorite games, I’ve left out some games that perhaps played an even bigger role in turning me into a game developer. There’s the first game that really got me into gaming (Runescape), the game that first got me interested in making games (Block Dude), and the game that I probably spent the most time playing (World of Warcraft), but, as important as these games were to me, I don’t really consider any of them to be in my top 5 favorite games.

Despite their differences, each of these games (and any game I’ve ever played, really) has had an effect on the decisions I make when working on Where Shadows Slumber or anything else. These games are all very important to me personally, and I hope I’ve done a decent job of explaining what each of them brings to the table, design-wise. Hopefully you’ll be inspired to examine your favorite games, and the design patterns involved in them!

 

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

If you have questions about my favorite games, or just want to share your own, feel free to contact us on social media! You can always find out more about our game at WhereShadowsSlumber.com, find us on Twitter (@GameRevenant), Facebook, itch.io, or Twitch, and feel free to email us directly with any questions or feedback at contact@GameRevenant.com.

Jack Kelly is the head developer and designer for Where Shadows Slumber.

Monument Valley 2 and Its Implications

On Monday, Apple and ustwo games nonchalantly made an announcement that could forever change the development of Where Shadows Slumber. If you haven’t heard (or figured it out from the title), then I’m glad I get to be the one to tell you – Monument Valley 2 has just been released for iOS devices, with Android coming “soon”!

If you’ve ever played the original Monument Valley, then you’ve probably noticed that it was a big inspiration for Where Shadows Slumber (in fact, you might remember that I mentioned something to that effect in my first blog post). Monument Valley is one of my favorite games of all time, and I’m super excited to be able to return to that world for another round!

As awesome as this announcement is, it’s also a little bit scary. Monument Valley 2 is gonna make a big splash, and people are going to be paying attention to it. The development, production, and eventual release of Where Shadows Slumber will all be happening in its wake, and so this announcement is very important to the future of Where Shadows Slumber.

How does this announcement affect our development, you ask? Well, let’s take a look!

 

There Can Only Be One

Monument Valley was awesome. I mean, it changed the face of mobile gaming as we know it. It was genre-defining and laid a lot of ground for future games like Where Shadows Slumber.

The problem with using a game as inspiration is that your game becomes pretty similar to that game. Since Monument Valley was such a hit, that’s not really a bad thing. Until you consider the fact that two very similar games are inherently competitors. We feel pretty confident in Where Shadows Slumber, and we felt that four years would definitely be enough to set us apart. A new Monument Valley game really changes the equation, for a number of reasons.

screen_263x350_2017-06-06_08-24-37

Ro vs. Grongus: Deathmatch

The first reason is pretty obvious – there are only so many people buying puzzle games. A giant like Monument Valley 2 takes up a lot of that demand. If Joe Puzzlegamer pulls up to the App Store and wants to get an artsy puzzle game, he’ll have a lot of choices. Even if he only had two choices, which would he choose – Where Shadows Slumber or Monument Valley 2?

Monument Valley 2 has a pedigree. It has a wildly successful predecessor. It was made by a studio with a real budget, decently-sized teams, and the know-how to bring a successful game to market. Where Shadows Slumber is awesome, but we’re just two random guys with little money and even less experience. Even if that’s not how we see it, that’s how everyone else will. Monument Valley 2 is the clear choice for the random outside observer.

In addition to losing out on potential sales, there are other things we could lose to Monument Valley 2. For a team without a large advertising budget, one of the best ways for us to get publicity is through conventions and awards. With Monument Valley 2 crowding the beautiful Unity-based puzzle genre, we could also lose chances to attend conventions and win awards. Again, people will have to choose between us and them. Will Unity invite us to represent them at an event? Will Apple shower us with promotions? Will we be anyone’s pick for best puzzle game? Probably not, if they can get Monument Valley 2.

 

Puzzle Mania

While there are some negative takeaways to Monument Valley 2, there are definitely quite a few positives (in addition to the fact that we have another awesome game to play). As they say, a rising tide lifts all boats.

When Monument Valley first hit the mobile gaming scene three years ago, it made quite a big splash. People absolutely loved it, and they clamored for more – I know when I finished Monument Valley, I wished for nothing but more levels. Imagine if we had been able to release Where Shadows Slumber 8 months or so after that – just when people are done with Monument Valley, but still want a similar experience, we provide them with exactly that!

Monument-Valley-2-Main-by-Ustwo-games

Bringing people back to puzzle games

We’re hoping for a similar situation to unfurl here. People will play Monument Valley 2, and it’ll get their brains working. They’ll (presumably) love the puzzles, the art, the brooding atmosphere. They’ll be all warmed up to the genre, and they’ll be on the lookout for anything similar. We’ll be ready to pounce on that crowd, and hopefully it’ll help us release into a bit more hype than we might otherwise.

Basically, we’re hoping that Monument Valley 2 will revitalize the moody puzzle game market. Not to sound too utilitarian, but we plan to use Monument Valley 2 as a sort of springboard to success!

 

Timing

There are a few things about this announcement that could be bad for Where Shadows Slumber, as I mentioned, but I think that there is an important factor worth mentioning, and that is the timing. We’re planning on releasing Where Shadows Slumber in early 2018. So, all things considered, I think this timing is just about perfect for us. If Monument Valley 2 had to be released sometime soon, now is probably the best time.

timing

Perfect timing.

If Monument Valley 2 were to be released a month or so after Where Shadows Slumber, we wouldn’t even stand a chance. As soon as people were starting to get excited about our game, a much more acclaimed game would come along and steal all our thunder! A similar story plays out if we release shortly after them – our release simply goes unnoticed.

So why is this the best time? Wouldn’t it be better if they had released a long time ago, to keep our release as far away from theirs as possible? While that makes a lot of sense, I think that Monument Valley 2 will inspire more interest in puzzle games overall, and eight months seems like a pretty good timeframe for the MV2 hype to die down, but for the puzzle fever to still be strong.

Additionally, the fact that Monument Valley 2 has been released in a different calendar year from Where Shadows Slumber works in our favor as well. A lot of awards are of the form ‘game of the year‘, and Monument Valley 2 is a shoo-in for many of those awards. With our biggest competitor releasing in a different year, we won’t have to compete directly with them for ‘of the year’ awards. Not that we expect to win these awards, but it’s always nice to feel like you have a chance.

 

Changes To Development

So how does this actually change our development plans for Where Shadows Slumber?

Since the timing of Monument Valley 2 is working in our favor, we’ve decided that we’re going to stay the course. We’re still aiming for an early 2018 release, which we feel puts us far enough away from this release. If Monument Valley 2 announced their release in early 2018, we would have no choice but to push our release back a few months. As of now, we aren’t making any changes to our schedule, but we’re definitely keeping our eyes open – if they release an expansion of some sort in early 2018, we might have to reconsider our own release date.

Since Where Shadows Slumber was so inspired by the original Monument Valley, we’re also looking at this as an opportunity to be inspired again. People have, and will continue to make comparisons between our game and Monument Valley, but now they’ll have a newer, sleeker version to compare us to – we have to try and keep up! We get to see another take on the Monument Valley style of puzzler, and we get to see a bunch of new mind-bending puzzles. Perhaps some of them will strike inspiration in our hearts, and help us make Where Shadows Slumber that much better!

inspiration

Can you feel the inspiration?

On the other side of that coin, we’ll also be playing Monument Valley 2 and looking for anything that’s a little too similar to Where Shadows Slumber. If we find that one of our levels is very similar to one of theirs, we may have to change it – even though we didn’t steal it from them originally, that’s what it will look like to the outside observer. We want to be similar to Monument Valley, but not too similar.

 

Takeaways

Most of the above musings on the implications of Monument Valley 2 are pretty specific, and overall, they’re pretty far beside the point. This is one of the most exciting announcements I’ve heard in a long time, and I can’t wait to get my hands on the new game! That’s the biggest takeaway you should have from this post – no matter what the implications, I’m super excited, and you should be too!

 

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

If you finish Monument Valley 2 and are looking for more puzzle-y goodness, you can always find out more about our game at WhereShadowsSlumber.com, find us on Twitter (@GameRevenant), Facebook, itch.io, or Twitch, and feel free to email us directly with any questions or feedback at contact@GameRevenant.com.

Jack Kelly is the head developer and designer for Where Shadows Slumber.

Progress Report

Frank and I have worked hard on Where Shadows Slumber, and we continue to do so every day. As a team of two, designing a game at our own whims, it’s very liberating. No one tells us what to do, and there’s no bureaucratic red tape forcing us to work on any specific part of the game.

Unfortunately (for us), that red tape does have an actual purpose. Without anyone telling us what to do, we have to figure out what to do! I just touted this as a good thing, but it’s also terrifying! How do we know if we’re doing the right thing? We’re trying to get to a release of a completed game, and we’re the ones who have to decide how to get there! With success comes ultimate glory, but any failure rests on our heads. Given how likely failure is in this industry, we have to make the right decisions at every point of the way. How are we planning on doing it?

Well, despite the fact that I just really scared myself with that last paragraph, we’re going to take a deeper look into what we’ve done so far, and what we’re going to do next, from a project planning perspective.

 

How Far We’ve Come

evolution

The evolution of Grongus

Frank and I are just two normal duders. (Note: technical term)

We’re also two normal duders who happened to be perfectly suited to approach a project like this. He has some sort of degree related to art and technology, and I have some sort of degree in computer science. We both have the resources to survive without depending on the income from what will end up being a ‘pet project’, and yet we’re both driven enough to dedicate ourselves to that project, even though we’re not dependent on it. We’re close enough to be willing to work together, but not so close that we just end up bickering the whole time.

When the idea for Where Shadows Slumber came up, we knew we had something awesome on our hands. We came up with  a plan, developed a schedule, and started working!

Now, that plan and that schedule have changed a lot in the past two years. Features have come and gone, level design has gone through a lot of iterations, and even our day-to-day process has changed. But, through this flexibility, we’ve managed to stay somewhat on-track. We’re still here, we’re still working on our game, and we’re still in a position where we can have a timely release.

Those of you who have never worked on an indie game are probably wondering why that seems like an accomplishment, while those of you who have are dying to know how we did it. And, if I had to choose a word to describe how we got here, it would be introspection.

in·tro·spec·tion
noun
  1. the examination or observation of one’s own mental and emotional processes.

What I mean by this is that we are constantly looking at our process, looking at what we’ve done, the mistakes we’ve made, and the road ahead. We have to asses our project as often and as accurately as possible, and we have to be completely honest with ourselves, if we want an accurate plan of action.

We’ve done this many times throughout development, and last week, we sat down and did the same thing again. So, let’s take a look at that process!

 

Where we are now

In my experience, when working on a game, there are usually three mindsets you’ll fall into:

  • ‘Future me will take care of that’ – This happens when your target release date is far enough in the future that the time left and the remaining tasks haven’t formed into a concrete plan, but you have so much time that you know you’ll be fine. This is often accompanied with phrases like ‘I’ll still have  plenty of time for X once I’m done with Y’. Be careful with this thought process – in my experience, you always have more work and less time than you think!
  • ‘I’m behind schedule, and I didn’t even realize it’ – This might be the most stressful mindset, but it’s probably the best one. This starts to crop up as your release date is no longer ‘in the distance’, and the enormity of your remaining tasks really hits you. You start thinking things like ‘I don’t know if I can finish all this work in that amount of time’. If you’re here, then fear not! This is a great place to be – there will always be a lot of work to do, but at least you’re not in the final mindset…
  • ‘Finishing on time is literally impossible’ – This is where you don’t want to end up (obviously). If you put tasks off for too long, or underestimate how long things will take, or just don’t realize that your release date is approaching, one day you’ll wake up in this mindset. You’ll realize that, no matter how hard you work, there’s simply too much work left to do, and you’ll curse your former self for not working harder. Again, please don’t let yourself get here!

The first thing you’ll notice about these mindsets is that none of them really seem great! There’s no ‘everything is on track – lookin’ good!’ The first one kind of feels like that, but it’s usually just a trap. There’s a period of time, I think it’s usually like 6-8 months, beyond which it’s hard to see how a schedule will play out. You can end up in the first mindset, even if you’re incredibly far behind, just because it’s hard for us to instinctively schedule that time.

Checklist

It’s okay – the only thing left to do is everything!

But, either way, it’s okay! Nobody gets into indie game development for the relaxing schedule and numerous spa days – we expect to be behind the 8-ball. The reason I bring this up is so that I can describe where Frank and I are in the process. And you know what?

We’re behind the 8-ball. We have a lot of work to do. In particular, in the past month, we’ve moved from the first mindset to the second. When we had more than 6-8 months left, it felt like we had all the time in the world. Now that we’ve just crossed the border into the 6-8 month mark, it’s starting to hit us – there’s a lot of work ahead of us. Do we have enough time? Can we get everything done?

These are the thoughts going through our heads now. And there are questions that naturally follow – can we still make it? What do we have to do now? What’s next?

 

What’s Next?

planning

This is what planning feels like in indie game development

When you find that you’ve fallen behind in development, you have to correct your process somehow. In my experience, you have three major choices:

  • Delay the release – There’s not enough time to do everything. The fix? Just take more time! This approach is fine (especially when your fans are expecting high quality), as long as your fans are somewhat understanding, you’re not racing against anything (like a competitor, or your own funds), and you haven’t already delayed the release by a lot.
  • Reduce the scope – There’s too much stuff to do in that time. The fix? Just do less stuff! This basically means that you’ll make fewer levels, add fewer features, and maybe decrease the quality that you expect from your game. This is useful, but it can be dangerous – just make sure that the game you end up with is still good enough to be worth it!
  • Buckle down – This one is last, but it’s usually the first one we try. We can’t change the release date – we made a promise to our fans! We can’t reduce the scope – we will not sacrifice our game! Sometimes in life, you simply have to work harder. Before you realized you were behind schedule, it was easy to durdle about, not really getting the important things done. Once you know you’re behind schedule, sometimes all it takes is a mental shift to get more done.

These are the three biggest options you have. Choosing what you need to do at any given point is an entirely subjective task, in that it depends on the stage of development, the type of game, the personal lives of the team members, the average annual wind speed, etc. Basically, I can’t tell you what to do here – if you’re already working 50 hour weeks, maybe you simply can’t afford to work harder. If nobody knows what your planned release date was, and there’s no market pressure, maybe you can just move it back a couple of months. Just choose what’s right for you, and don’t be afraid to re-asses that choice as time passes.

The important part is to actually make a choice. If you realize that you’re not going to finish your game on time, you need to do something. The math isn’t lying, and the longer it takes to make a change, the worse off you’ll be. Recognize that there’s a problem, and do something about it.

Right now, Frank and I are behind, and we’ve decided that we’re going to buckle down. We’re going to work harder and get more done. In another week, we’ll asses our progress and take a look at the road ahead. If we’re still behind, then maybe we’ll resort to reducing the scope or delaying the release. Hopefully we don’t have to, but it’s important to be flexible and honest with yourself.

This post, of course, does not get into the minutiae of how this planning process relates to Where Shadows Slumber, but I hope it was either helpful for your own planning process, or at least entertaining. Until next time, may you examine your own progress, and I hope that you always find yourself ahead.

 

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

If you have any questions or comments about our project planning process (or anything else), you can always find out more about our game at WhereShadowsSlumber.com, find us on Twitter (@GameRevenant), Facebook, itch.io, or Twitch, and feel free to email us directly with any questions or feedback at contact@GameRevenant.com.

Jack Kelly is the head developer and designer for Where Shadows Slumber.

Object Pooling

Alright, it’s finally getting a little bit warmer around here as spring comes and goes, so let’s celebrate by jumping into the pool! That’s right, today we’re going to be talking about an ever-important pattern in game development, the concept of Object Pooling. Object Pooling is a design pattern which involves creating a set of objects – a ‘pool’ – and reusing those objects, rather than creating/destroying objects throughout a game.

pool

Object Pooling involves recycling objects

This is a very important concept in game development, and it’s the first topic we’ve reached that is almost entirely associated with the optimization of a game. For mobile game developers, resources are limited, so it’s important that we don’t waste anything. Object pooling helps us save resources, and is less of a mechanic, and more of a general design pattern. We used it in Where Shadows Slumber, but it isn’t even one of the more defining features of the game. However, it’s still an incredibly important concept.

So, without further ado, let’s dive in!

 

Why do we need Object Pooling?

Unity is a pretty cool system, and it gives you some pretty cool toys to play with. Two powerful toys it gives you are Instantiate() and Destroy(), which allow you to create a new instance of a GameObject, and to get rid of an instance of a GameObject, respectively. I assume that other game engines provide similar functions. If you’ve played around with some simple stuff in Unity, you might have seen how useful these functions can be.

The problem with Instantiate() and Destroy() comes when we try to use them a lot. You see, every time you call Instantiate(), Unity goes into your memory, finds a chunk of memory big enough to store the new object, and allocates it. Conversely, every time you call Destroy(), Unity finds that object in memory, clears it out, and marks that memory as ‘available’. This whole process is aided by the use of a garbage collector, which runs occasionally, making sure that deleted things were actually deleted.

Those of you familiar with computer science may see where I’m going with this. Basically, this isn’t great. Calling Instantiate() or Destroy() every once in a while is fine. But when you call them all the time, Unity starts to slow down. Memory allocations and deallocations are somewhat expensive, meaning the garbage collector will be running a lot, sucking valuable power away from your game! Every time the garbage collector runs, your game might lag a tiny bit. This is doubly true for environments where resources are limited (say, on a mobile device).

So, our clever brain gets to work. ‘Hmm’, it says, ‘if calling these functions is bad, let’s just not call them!’ Brilliant, brain, as usual! Surprisingly, in this case, the first idea that pops into our head is actually pretty good – we just won’t use Instantiate() or Destroy(). Problem solved!

The only remaining question is how to maintain the functionality we had before. We were, for example, using a gun, and every time we fired, we would instantiate a bullet. Every time the bullet hit something, we would destroy it. How can we get that same functionality without using Instantiate() or Destroy()?

 

Object Pooling

The answer to the above questions is, obviously, to use object pooling. The concept is pretty simple – rather than creating a new bullet every time we fire our gun, and then destroying every bullet individually, why don’t we just reuse the bullets? They all look the same, so no one will know the difference!

NonVsPooling

Object pooling in a space shooter (image credit: raywenderlich.com)

This is the idea behind object pooling. Rather than creating and destroying a bunch of bullets every frame, which can get expensive, we simply create a bunch of bullets at the beginning of the game, and reuse them. We store all of the bullets in a ‘pool’ – they’re all deactivated and unmoving, so they have no effect on the game. Then, every time we fire the gun, we grab a bullet from the pool, change its position and velocity so it looks like it’s coming from the gun, and enable it. The bullet flies through the air, and then strikes a wall, or moves off of the screen. At this point, we simply disable the bullet and return it to the pool to be used again!

If this seems a little weird, think of it like extras in a TV show or movie. In the first scene, we need a crowd, so we hire a bunch of actors to be people in the crowd. The next scene is in a different city, but still needs a crowd. Do we fire all of the extras we already hired, and then spend more time hiring different extras? Well, nobody was really paying too much attention to the extras in the first scene – let’s just use them again for the second scene! This is pretty common in TV and movies, and there’s no reason we can’t do the same thing here.

“I gave a very memorable performance as the nurse, and now, suddenly, I’m the waitress? That’s gonna confuse my fans!”
– Phoebe Buffay, Friends

Using object pooling, we can avoid the need for our expensive allocation/deallocation functions (other than at the beginning/end of a level, where slowness is more acceptable) by reusing all sorts of objects. There is a tradeoff here – using an object pool means that, whenever we need a bullet (or any object), we have to be sure that there will be one in the pool. This means that we actually need to store more copies of the object than we ever expect to use. While object pooling makes it easier for the CPU to keep up with what we’re doing, it uses up more memory.

This is called the space-time tradeoff, and it’s pretty common in computer science. The idea is that, in order to optimize for time (make your code run as fast as possible), it generally uses up more space (in the form of RAM). In this case, time refers to time spent in the CPU – saving time means less lag, which makes for a better game. In general, on mobile platforms at least, saving time it more important, so this is a tradeoff we’re happy to make by using object pooling.

 

Where Shadows Slumber

So, how did we use object pooling in Where Shadows Slumber? We don’t have any bullets, so what else can object pooling be used for?

Honestly, object pooling wasn’t incredibly important to the core game – all of our levels are pre-made and we don’t have any projectiles or anything else flying around. Where we did use object pooling was in ‘special effect land’. Every time the main character takes a step, a small sound plays, and in some levels you can see a puff of sand behind him. These are what we have taken to calling footfalls, and they’re one of the main things we used object pooling for.

Footfall

This group of particles is a footfall, and was pulled from a pool rather than instantiated!

In fact, sometimes you may have used object pooling without even realizing it! You see, one of the primary uses for object pooling is within particle systems. A particle system may emit a burst of hundreds of particles at once. Imagine trying to instantiate that many object in the same frame – your game would lag for sure! However, if the particle system uses object pooling, it will simply enable all of those objects, and your game will keep running without a hitch. This allows you to get high-quality particle effects without having to worry too much about the impact on performance.

Hopefully this quick conceptual intro to object pooling helps you out, and saves you many CPU cycles! I should mention that I got an image from this blog post on object pooling, which coincidentally is a very good resource if you want to get a good look at an implementation of object pooling.

 

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

If you have any questions or comments about object pooling (or anything else), you can always find out more about our game at WhereShadowsSlumber.com, find us on Twitter (@GameRevenant), Facebook, itch.io, or Twitch, and feel free to email us directly with any questions or feedback at contact@GameRevenant.com.

Jack Kelly is the head developer and designer for Where Shadows Slumber.