Rendering in Unity

As you probably know, Where Shadows Slumber is starting to ramp up toward a release this summer. It’s an exciting, terrifying time. We can’t wait to share the entirety of what we’ve been working on with the world, but there’s also a daunting amount of stuff to do, and not much time to do it.

If you’ve played any of the recent beta builds, hopefully you like what you’re seeing in terms of design, functionality, polish, art, and sound. Unfortunately, if you’ve played the beta on anything other than a high-end device, you’ve probably noticed something that you don’t like: lag.

Lag is annoying. Lag is something that can take a great game and ruin it. It doesn’t matter that your level design is perfect, your models are beautiful, and your music is entrancing if it only runs at 10 frames per second. If that’s the case, nobody is going to enjoy playing it. And, regrettably, that happens to be the case for Where Shadows Slumber.

LikeButta

Like butta’!

So, one of my biggest tasks before we release is to optimize the game, making it run faster and allowing us to have higher frame rates. The area with the most opportunity for improvement is during rendering. A game consists of a lot of logic – Obe’s location, things changing in shadow, etc. – but rendering is the process of actually drawing the scene onto the pixels of your screen.

Earlier this week, I started a post about the different tools you can use to help optimize your rendering performance. It seemed like a good idea, since that’s exactly what I was doing. However, I realized that if you don’t know how rendering works in the first place, most of it is complete gibberish. So I’m gonna leave that post for next week, and this week I’ll give a quick introduction to how 3D rendering works in Unity.

Blog-Render.JPG

Rendering

Rendering is the process by which the objects in your game are drawn to the screen. Until it’s rendered, an object in your game is just a collection of information about that object. That information gets translated from information the game engine understands into information the GPU can understand. There are a few important concepts to understand here:

  • An object’s mesh describes the shape of the object. It consists of a collection of vertices and triangles.
  • An object’s material is a description of how that object should be drawn. It encapsulates things like colors and shininess.
  • Every material uses a shader. This is the program which calculates exactly what color each pixel should be, based on the information in the mesh and material.
  • World space is the 3D coordinate space in which all of your game objects live.
  • Screen space is a 2D coordinate space that represents the screen to which the game is drawn.

The basics of rendering are pretty easy to understand, at least from a high-level view. The meshes for the objects in your game are translated from world space to screen space, based on the camera that’s doing the rendering. For instance, in Where Shadows Slumber, objects that are further away in the x-axis will be higher up and more to the right when viewed on the screen. Fortunately, we don’t have to mess with this too much – Unity’s cameras do a good job of making this translation.

Once we know where each pixel should be drawn, we need to determine what color that pixel should be – this is where the material and shader come in. Unity provides a whole bunch of information to the shader (position, angle, information about lights in the scene, etc.). The shader uses that information, plus the information from the material, to determine exactly what color the given pixel should be. This happens for every pixel on the screen, resulting in a beautiful picture of exactly what you expect to see.

The GPU

Now that we understand the basics of rendering, let’s take a deeper look into how it actually happens: the GPU.

The GPU, or graphics processing unit, is the part of the computer in charge of calculating the results of our shaders to determine a pixel’s color. Since modern phones have over 2 million pixels, our shader code must be run over 2 million times per frame – all within a fraction of a second.

How does the GPU manage to do so many calculations so quickly? It’s due to the design of the GPU, and can be summed up in one very important sentence: the GPU is good at performing the same operation, a bunch of times, very quickly. The key thing to remember here is that it’s good at performing the same operation; trying to perform different operations is what slows it down.

Specifically, switching from one material to another causes a bit of a hiccup in terms of speed. The properties of the material are passed to the GPU as a set of parameters in what is known as a SetPass call. SetPass calls are one of the first and most important indicators when it comes to optimizing rendering performance, and are often indicative of how quickly or slowly your game will run.

Because SetPass calls take so long, Unity has a strategy for avoiding them called batching. If there are two objects that have the same material, that means they have the same parameters passed to the GPU. This means that those parameters don’t need to be reset in between drawing the two objects. These two objects can be batched, so the GPU will draw them at the same time. Batching is Unity’s first line of defense against rendering slowness.

The CPU

While the GPU is the star of the show when it comes to rendering, the CPU, or central processing unity, still does some important stuff that’s worth mentioning (even if it doesn’t have a huge bearing on the optimization steps we’ll be taking). Of course, the CPU is in charge of running your game, which includes all of the non-shader code you’ve written for it, as well as any under-the-hood things Unity is doing, like physics and stuff.

The CPU does a lot of the “set up” for rendering, before the GPU comes in and does the heavy number-crunching. This includes sending specific information to the GPU, including things like the positions of lights, the properties of shadows, and other details about the scene and your project’s rendering config.

One of the more important rendering-related things the CPU does is called culling. Since the CPU knows where your camera is, and where all of your objects are, it can figure out that some objects won’t ever be viewed. The GPU won’t know this, and will still perform calculations for those objects. In order to avoid doing these unnecessary calculations, the CPU will first remove any of the objects that won’t be drawn, so the GPU never even knows about them.

Image

All of these Hitlers would be culled by the CPU (image credit: smbc-comics.com)

Since we’re talking about performance, it should be noted that the GPU and the CPU are two different entities. This means that, if your game is experiencing lag, it’s likely due to either the GPU or the CPU, but not both. In this case, improving the performance of the other component won’t actually make your game run any faster, because you’ll still be bottlenecked by the slower process.

So, now that we know a little bit more about how rendering actually happens, maybe we can use that knowledge to improve performance! At least, that’s what I’m hoping. If Where Shadows Slumber never comes out, then you’ll know I’ve failed. Either way, I’ll see you next week for a look into the tools you can use to help you optimize rendering performance in Unity!

 

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

If you didn’t already have a working knowledge of rendering, I hope this post helped! If you do know about rendering stuff, I hope you don’t hate me too much for my imprecision! You can always find out more about our game at WhereShadowsSlumber.com, find us on Twitter (@GameRevenant), Facebookitch.io, or Twitch, join the Game Revenant Discord, 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.

State of the Art – April 2018

Welcome to State Of The Art, April 2018 edition! This monthly progress report is written by Frank DiCola and is focused entirely on how the game’s visuals have improved in the past month.

Missed last month’s State of the Art? The March edition is right here.

Also, don’t be fooled by our last blog post. The “Easter edition” of our blog was actually just the Where Shadows Slumber April Fool’s gag for the year. We hope it gave you a few laughs! Don’t worry, we aren’t adding any of that stuff to the game.

SOTA-Discord

Sorry Caroline – no skins!

We all had fun making that, but now it’s back to work. Here’s the State of the Art!

 

 


SPOILER WARNING: This post contains screenshots, GIFs and videos of later sections of the game. If you want to experience them in all their majesty for the first time on your mobile device when the game launches, don’t read on!


 

 

 

SOTA-Header.png

Mustard River

The infamous “mustard river” is now complete! These Levels used to be in real rough shape, but now I love the way our ashen rocks contrast with the yellow of the water. This World is home to Walkers, a mechanic we introduce in the first River Level. I won’t drone on too long, because I think these GIFs speak for themselves. Enjoy!

River1.gif

Level 2-1, “Docks”

River2.gif

Level 2-2, “Cage”

River3.gif

Level 2-3, “Guide”

River4.gif

Level 2-4, “Ebb”

River5.gif

Level 2-5, “Ferry”

There are new Walkers, too! For a long time, the denizens of the River were weird copies of Obe in scraggly shorts. As you may have noticed from the GIFs above, I gave them a bit more unique personal features, such as different hats or clothing. Overall, they probably still look too much like generic video game zombies. Regardless, I hope people will realize as they play the game that these Walkers are to be pitied, not feared.

 

SOTA-LevelSelectHeader.png

Check Out Our Snazzy Level Select Menu

I’m really proud of the Level Select menu that Jack and I have been working on together. Rather than just do a few buttons with numbers on them, we really went all out to create a beautiful experience that takes you through the story of the game as you choose what Level you’d like to play. Check them out in action!

LevelSelects.gif

When the full game is done, this menu will be the best place to track your progress. How many Levels have you completed? How many are left? Which ones would you like to return to, to show your friends? During gameplay however, the Player won’t be directed here too often, since Levels flow directly from one into the other.

 

 

 

SOTA-HomeStretch.png

Polish: The Home Stretch

I have begun the process of finishing the game’s final 15 Levels. These puzzles have been finished for a while, and they even have some “first draft” art. However, as I say all the time, my goal for each Level is to make it look like my favorite Level, and make the player say “oh wow, I love the look of this one.” That’s a delicate process that takes a lot of time – many, many hours spent per Level!

CemeteryRain

 

So right now I have just one of the final 15 to show you today, and you can see it above. This is in World 5, The Hills, and it’s called Cemetery. It features tombstones that turn into ghosts when you cover them in shadow. The theme of the World is putting these spirits to rest in their graves.

This Level is nearly complete – there are two tiny touches I’m dying to put in. First, I want to give that Draggable pillar a bit more personality. Right now it’s just a green hyperrectangle (Jack taught me that’s what a 3D rectangle is) but it should feel like it belongs more. Second, I want to add animated blades of grass that bounce and bob along with the rhythm of the falling rain. Personally, I think making convincing rain is more about the effect the raindrops have on the ground rather than seeing actual particles in midair. When it rains in real life, what’s easier to see: the rain in midair as it falls to Earth, or the water collecting in puddles on the ground or forming little rivers? Observe the world around you next time there’s a storm. I’m right!

Anyway, those changes all take a lot of love so I’ll be poring over it more this week before I head off to PAX East!

 

SOTA-iPhoneX

Last But Not Least – The iPhone X!

I finally bit the bullet and purchased the iPhone X so we can test how the game works on its sleeker, thinner, taller (!) screen. The phone is beautiful and feels great, and you can see a proof of life photo above. Jack will probably have to do some programmer-fu to make the camera zoom out a bit on these phones, but that’s fine. I love playing on the iPhone X because of how smooth it is, so a little camera troubles are no problem at all!

That’s about it for this month’s art update. I wish I could have gotten a bit more done, but we had to attend SXSW earlier this month and I spent a lot of time preparing the art for that build. It was a great show, but travel always takes time away from being in the “flow” of creating artwork. Since I’ll be at PAX East this weekend, you can expect the same lame excuse next time!

We’re nearing the final days of working on Where Shadows Slumberwhich is a really weird thing to think about. I suppose we’ll still be doing a lot of post-launch stuff, but I’m not sure what I’ll do all day, every day once the game is done. Anyway, I know what I’ll be doing all day, every day in April… [ o_o] ART!

See you next month for another update!

 

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

We hope you enjoyed this update about the game’s artwork. Have a question about aesthetics that wasn’t mentioned here? You can find out more about our game at WhereShadowsSlumber.com, ask us on Twitter (@GameRevenant), Facebookitch.io, or Twitch, and feel free to email us directly at contact@GameRevenant.com.

Frank DiCola is the founder of Game Revenant and the artist for Where Shadows Slumber.

Easter: SXSW Feedback, Release Date, and More!

Hey everyone! We have a new Easter tradition at Game Revenant, where we go over some of the feedback Jack and I received when we were at the South By Southwest music festival earlier this month.

Overall, the reception to the game was really positive – but we’ve been trying to iterate quickly on some of the ideas you guys have been giving us. So without further ado, here’s the top three pieces of feedback we received at the show, and our responses!

 

AprilFools-LowStakes.png

Feedback #1: The Stakes Are Too Low

Jack and I envisioned Where Shadows Slumber as a relaxing puzzle game made in the mold of mobile classics like Monument ValleyLara Croft: GO, and Valley of War Adventure Run. Because of that, there are no enemies in the game, or any way for Obe (the protagonist) to die. We didn’t want you to have to restart a puzzle in the middle of a Level just because you couldn’t react to something in time. In the image above, this Walker won’t damage or hurt Obe because he’s just there to serve as an obstacle in the puzzle.

However, our fans have made their voices heard loud and clear: the stakes are too low in our game! There is no tension. There is no excitement. There needs to be violence. There needs to be a way for Obe to die. With precious few months of development time remaining, we are dedicating considerable resources to this piece of feedback. Our response?

Response #1: Obe Can Die In Terrible, Confusing Ways!

Now, thanks to some quick redesigning and a few late nights programming, Obe can die randomly in the middle of gameplay if he steps on Death Spikes. (Development name, subject to change) Here’s what they look like in-game:

AprilFools-Spikes.png

“How will I ever get past this important intersection?”

One of our more controversial ideas is Secret Death Spikes. The idea is that they’ll be scattered all over the map, so the player doesn’t know where they are. Then, when a Player steps on one, Obe’s flesh is ripped apart and his head is sent flying:

AprilFoolsDEATH.gif

That’s how they gecha…

We’ll push this build out to our internal testing group and see what they think! Now, you might be wondering what happens when you die. Philosophers have been trying to sort that one out for millennia! But in Where Shadows Slumber, you’ll lose one of your precious lives and restart the Level.

How do you get more lives? Read on!

 

AprilFools-Money.jpg

Feedback #2: This Game Won’t Make Money

Jack and I also envisioned Where Shadows Slumber as a straight-up pay-once premium title that doesn’t utilize any exploitative monetization schemes to bilk people out of their hard earned cash. Our belief was that if we were very honest with the community, they would reward us by purchasing the game at a fair market price and leaving a positive review on the App Store.

The feedback from the community has been monolithic: don’t do this! Trusting people to seek out fair trades in the marketplace is a fool’s errand. People are morons! Obviously they’ll never pay for a thing when they could not pay for a not thing. It’s so obvious!

Response #2: Loot Boxes Will Make Money!

We’ve become convinced that the premium model is no longer viable, and that modified premium models (such as a try-before-you-buy model) are not viable either. The people have spoken: they want free games with micro-transactions, in-game advertisements, and timers! 2018 is here, and we dare not defy the calendar year.

“Our goal is to make sure people can pay enough money to basically not even have to play the game.”

For this reason, shiny loot boxes are being added into the game and Where Shadows Slumber is officially going free-to-play! Loot boxes can be earned in-game by logging in once per financial quarter, but they can also be purchased via the main menu if you’re in a hurry! Inside every shiny loot box, you’ll have a chance to get an array of dizzying prizes. Just look at all of the cosmetic skins you can equip Obe with:

AprilFools-Skins.png

Left to right: Classic Obe, Spanish Inquisition Obe, Breath of the Wild Obe, ISIS Obe

But we won’t stop at just cosmetic items. Loot boxes aren’t fun unless they have a satisfying, tangible effect on the virtual world. We’re partnering with Electronic Arts to bring their popular Star Card system from Star Wars: Battlefront II into Where Shadows Slumber! People just can’t stop talking about about about about about about about these Star Cards. That’s how fun & satisfying they are!

AprilFools-Odds.png

Actual percentages included above, pursuant to Line 3 of Section 15 of the Unlawful Internet Gambling Enforcement Act of 2006

Star Cards in Where Shadows Slumber will allow you to power up Obe to make him the incredible puzzle-action hero of your dreams. If you don’t get a Star Card from a loot box, don’t feel bad! You can use the colorful Shadow Dust you’ve stockpiled to upgrade your Star Cards. Powerups include running faster, more lives-per-day, auto-skipping Levels, auto-skipping cutscenes, auto-skipping the credits, and even giving Obe a gun during cutscenes!

AprilFools-Gun.png

“Go ahead. Make my day.”

Why lootboxes, you ask? Here’s a quote from Jackson H. Kelly, our Chief Monetization Officer: “Our goal is to make sure people can pay enough money to basically not even have to play the game. We want to take the stressful, mentally challenging experience of solving a puzzle, and turn that into a swift, painless transaction.”

When asked what could justify such a sudden change, he said “People like paying for things at a cash register more than they enjoy playing games, so we’re going to encourage that.”

EA could not be reached for a statement.

 

AprilFools-WaitingMark.png

Feedback #3: Why Isn’t The Game Done Yet?

Jack and I also envisioned Where Shadows Slumber being released on the App Store and Google Play sometime during our lifetimes. However, due to the time constraints placed on this lil’ indie team (not to mention all of these exciting changes) we have not been able to get the game out the door just yet. However, fans are understandably frustrated. (see above) They want a release date to be announced! Today, I am proud to announce the date Where Shadows Slumber will be available for purchase on the App Store…

Answer #3: We’re Launching On Nov. 24th, 2067!

Just imagine. 2067. The “future” – at least, that’s what they used to call it. Now they just call it The Rinks. A beautiful array of orange cyber leaves crunch under your cyber boots as you walk down the idyllic cybewalk to the home you grew up in. Some punk kids skate by, chatting in a language that’s a mix of English, North Korean, and Blockchain. You walk through the front door (literally) to find your “family” huddled around a cyber television, tuned to the color of a dead sky. It’s Thanksgiving Day, 2067. What will you talk about with the androids that replaced your family? The ongoing war between Earth and Mars? The debate over the effectiveness of flying autonomous self-driving cars vs. self-automating driving flyers?

Never fear – there’s a brand new game available on the App Store called Where Shadows Slumber that you can download free of charge! Running on sleek, state-of-the-fifty-years-ago technology, Where Shadows Slumber is a free-to-play lootbox collecting game where one wrong move will rip the flesh from your cyber, cyber bones.* We hope you enjoy playing it as much as we enjoyed spending our entire lives creating it!

*Puzzles sold separately

 

AprilFools-Phone

Got More Feedback?

Jack and I are suckers for feedback. We just love hearing it! We just can’t get enough of your sweet, sweet, comments, haha, ha. My multiple chins and I are standing by, ready and willing to answer any and all emails, tweets, and creepy text messages you send me. Rest assured that if you contact Game Revenant with some feedback about Where Shadows Slumber, I will do my best to respond in 1-2 business years.

Thanks for reading this special edition of the blog, and Happy Easter by some strange coincidence!

 

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

Happy March 32nd, ya filthy animal. Our regular blog posts will resume on Tuesdays, as always. You can find out more about our game at WhereShadowsSlumber.com, ask us on Twitter (@GameRevenant), Facebookitch.io, or Twitch, and feel free to email us directly at contact@GameRevenant.com.

Frank DiCola is the founder of Game Revenant and the artist for Where Shadows Slumber.

Creating a Level: From Concept to Finished Product

For a long time, I’ve wanted to write a post about how we make Levels when working on Where Shadows Slumber. The only problem was a lack of documentation. I forgot to take screenshots of the early stages of the Levels we’ve completed so far. What I really wanted to do was show our audience the growth of a Level, from it’s earliest conception and then show the various stages of the design process along the way.

When I thought of this idea, I tabled the blog and decided to wait until I started on a new batch of Levels… and here we are! We’re going to take an inside look at Level 3-1, Noria, the first Level of the Aqueduct World.

 

Maker:S,Date:2017-8-17,Ver:6,Lens:Kan03,Act:Lar02,E:Y

Step 1: Draw The Level

Every Level has a reason for being in the game. Noria is the first Level in the Aqueduct World, which makes it extra special. Whenever we design the first Level of a World, we like to communicate to the Player:

  • Why the World is going to feel different from the other Worlds in the game
  • What mechanics you’ll be dealing with in this World – especially new ideas

For the Aqueduct, we wanted to make it all about mechanical devices, switches, rotating things and whirring machines. Our game doesn’t exactly have a precise historical setting, but it’s fair to say it isn’t modern day. This gives us some leeway with technology. It has to work, but it can look really old.

MVIMG_20171025_141620.jpg

Jack’s notebook!

The Aqueduct World is all about Buttons. Buttons are Nodes that do something when you step onto them. There are all kinds of Buttons, but the most basic Button does a thing every time you step on it, no matter how many times you step on it.

To show that off, Jack designed a Level (above) where the only way to cast shadows and move the light was with a single Button. In addition to that, there are Buttons near each light in the Level to turn them on and off. The proximity of the light to the Button it’s attached to is an intuitive connection. These Buttons work like regular domestic light switches too, so it’s a cheap way of using existing Player knowledge about the real world and transmuting it into knowledge of our game.

When a Level exists in this form, the only thing we can really do is discuss it. Jack will attempt to guide a very confused Frank through the mechanics of the Level. I’ll try to poke holes in it (literally, with my pencil) and find problems with the design. We’ve never shown these sketches to testers because it’s too high-level for them to understand. If we like the idea of the Level, Jack makes a grey box prototype of it in Unity for us to test.

 

Noria-Greybox

This Level doesn’t look too special yet, huh? Just wait!

Step 2: Make A Grey-Box Prototype Level

With a design solidified, now we’re ready to make a version of the Level that can be played and tested. It doesn’t need to look pretty yet, so we use basic template cubes to represent walkable space. Affectionately called grey box prototypes, this technique is how we prototype every Level in the game. Watch a video of me beating the Level below:

As you can see, it’s playable in this stage, and everything works. You can solve the puzzle, which means testers can assess the strength of our design. (We just tell them to ignore the visuals.) We brought this Level, in this format, to AwesomeCon 2017 looking for feedback from players. When we show grey box prototypes to people, we want to make sure they can complete the puzzle. More than that, we want to make sure that they solved it on purpose instead of just by brute force. If we get good feedback, we proceed to Step 3.

 

Noria.png

Step 3: Draw Some Concept Art

This might seem backward, but this is the time when I draw a concept image of the Level. Why do I do this after the Level has been prototyped, and not before? It’s because Jack knows best which Nodes need to go where, and I don’t. I need to take cues from him about where everything must be, which often includes the actual length and width of shadow casting objects.

This is actually beneficial. It gives me good constraints to work with. I draw a paper sketch and say, “OK, if everything absolutely has to be in this location, what can I do with it? What makes sense for the setting [Aqueduct] whether it’s man-made or organic?” As you can see in the drawing, the following ideas have been spawned:

  • Obe should enter from a pipe (bottom right) to match the cutscene that plays directly before this Level.
  • The pillar now looks like it belongs – it’s a crumbling structural element of the Aqueduct, a man-made structure in disrepair.
  • The mechanism by which the lamp moves left to right is not just a magical back-and-forth switch. Now it’s a waterwheel! Why a wheel? Google “Noria”…
  • The lights need to look like actual man-made lights since they are powered by Buttons on the ground. Why not lamps?
  • There are stone pathways going horizontally that have crumbled over time. Those need to be repaired by shadows.
  • The bridges going vertically are metal grates that allow water to pass under them. This is an Aqueduct, we can’t just have standing water blocked in!
  • There’s a back wall with a door. I like to give the Player as many visual cues as possible that the finish line is an actual exit.

The concept art phase is another chance for us to critique the design. If we know the puzzle is good, but it produces an awkward-looking Level, we have the opportunity to reconfigure things. Perhaps the exit needs to be in a different place? Maybe objects should be closer or further apart? Now is the time to match the design to the intended context, the Aqueduct. Once I have good concept art to work from, I proceed to Step 4!

 

DesignBlog-Noria-FirstPass.png

Step 4: First Aesthetic Pass

Now it’s time to take that ugly grey box prototype (sorry Jack) and make it look and sound beautiful! I’m ready to apply my toolkit of Aqueduct paths, walls and bridges to the design. Once the art is laid down, Alba and Noah have their first chance to put some audio effects into the Level and set the mood. It makes a huge difference: now the Level doesn’t sound like it takes place in a silent death vacuum! Creepy chimes and rushing water converge to give the Level a sense of place. Here’s a video of it all in action:

The Level doesn’t look grey anymore! That’s awesome. But… it also doesn’t look finished, does it? This kind of art would pass for a student game or something in a game jam, but we want to be an App Store Editor’s Pick and win a ton of awards. That means the art needs to be worth the price people paid to download the game. It needs to be extraordinary! It needs to be… polished.

 

DesignBlog-Noria-Polished

Step 5: Aesthetic Polish

Polish is a game design term for taking your finished product and finishing it again so it’s even better – much like shining a shoe with shoe polish. You want to make your Level shine! If you’re making an island paradise, it needs to be the most relaxing paradise the player has ever experienced. If it’s a scummy slum in a city, you need to make that slum as dirty as possible. Everything needs to be pushed to the extreme.

My personal philosophy is that I want to turn every Level in the game into my favorite one. Obviously, I know that can’t happen. But at least while I’m working on it, I can take something boring and give it life. Speaking of which, this is usually where animation enters the picture.

animate (verb)

1530s, “to fill with boldness or courage,” from Latin animatus past participle of animare “give breath to,” also “to endow with a particular spirit, to give courage to, enliven,” from anima “life, breath”

Animation is the most time-consuming part of aesthetic design, and it requires a lot of setup as well. It makes sense for this to come last. But it’s definitely the most important artistic layer. Bad video games tend to feel frozen and stale: great games are always in motion, even when everything appears still. I think our modern brains are conditioned to assume that a screen containing no motion is frozen, as if the app crashed. If you look at games with a high level of polish (Blizzard’s Hearthstone comes to mind), there’s always something moving around to give the player the illusion of life. The goal of polish is to make your game appear to crackle with the spark of life. See for yourself:

Pretty different, huh? Our water shader adds some much needed liveliness to the water, and makes it feel like a rushing stream. Buttons now move and bounce under Obe’s weight. An animated glyph on the ground lets you know where you’ve just clicked. The lamp posts are now chains dangling from the ceiling, which lets them sway gently on a loop.

The other perk of animation is that it allows you to add a third sense to the game: touch (or, feel). In a very real sense, players can only experience your game using their eyes and ears. But if you do your job right as a game designer, certain elements in your game will make the player feel things. Have you ever gotten hit in a video game and exclaimed out loud “ow!” after seeing what happened to your avatar? You didn’t actually feel pain, but something about the experience was immersive enough that it made you connect with your character. That’s what polish is for. That’s how games rise to the top!

 

yellow-happy-smile-526968

forever and ever and ever and ever and ever and ever and ever

Step 6: You Never Finish, This Goes On Forever

Here’s the dirty little secret about my strategy for artistic polish: I’ll never be finished. I will never finish this game. I will work on this game every day until I am dead. It doesn’t even matter if I’m improving the artwork, even if I’m actively making everything worse I will never finish anything in this game.

Whoops! That’s not what I meant to say. Where was I?

Eventually, you need to stop working on a Level so you can move on. This is always a heartbreaking moment in game development. If I could choose any superpower, I would choose a very specific one – the ability to do things on my computer without time slipping through my fingers like grains of sand into an endless void.

[  . _ . ]

You have to move on so you can finish the rest of your game, so when do you do that? It’s at the point where your hours of input are only reaping very marginal gains. People won’t spend an eternity looking at your Levels, so you shouldn’t spend an eternity working on them either. If anything looks truly awful at launch, you can always sneakily patch in fixes that you missed. Just say you’re fixing bugs. and blame the programmer!

Besides, I can always improve the artwork again when we remaster Where Shadows Slumber for BlackBerry…

 


 

I’ve been working on this blog post for too long, and now my hours of writing input are reaping only marginal gains. Time to end this post. Thanks for looking at this inside scoop into our process! If you’re wondering why game development takes so long, imagine doing this for all 38 Levels in the game. That’s not even including the cutscenes…

Say, that gives me an idea for another blog post!

 

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

We hope you enjoyed this deep dive into our development process. You can find out more about our game at WhereShadowsSlumber.com, ask us on Twitter directly using the handle @GameRevenant, find us on Facebookitch.io, or Twitch, and feel free to email us directly at contact@GameRevenant.com.

Frank DiCola is the founder of Game Revenant and the artist for Where Shadows Slumber.

 

Drive

If there’s one thing an indie game developer needs, it’s drive. The competition is fierce, the process is difficult, and we even have to deal with our day jobs on top of everything else.

In order to get our games to market successfully, we have to do a lot of stuff right, make a lot of difficult decisions, and put in a lot of hard work. In order to accomplish any of these things, the first thing you need is the urge to make a game, the drive to make your dream become a reality. But what exactly is drive?

Drive
drīv
noun
  1. an innate, biologically determined urge to attain a goal or satisfy a need.

Drive is the internal force you feel that causes you to create something. Drive is forcing yourself out of bed hours before you have to get to work, just for a chance to work on your game. Drive is spending the evening testing the performance of your pathfinding algorithm rather than playing Rocket League. Drive is a lot of things, but I think of it as three core parts:

  • The urge to work on a project, including the confidence that it will succeed – This is where drive starts. It’s impossible to follow any large project through to the end if you don’t care about it and believe in it.
  • The dedication to work on your project, despite any sacrifices you might have to make – This is how drive shows itself, and is the trait most associated with the term. When you want to complete something badly enough, you force yourself to work on it, even (and especially) when you don’t want to.
  • The willingness and ability to make difficult decisions about your project – This is less often associated with drive, but I think it’s perhaps the most important point. Choosing to trim features or making an irreversible development decision is very difficult, but it has to be done. Your project will suffer if you don’t make decisions, and you have to understand and embrace that.

I’ve seen a lot of indie game development projects suffer due to a lack of drive. The most obvious ones are the games that were never finished because development petered out. Slightly less obvious are the games that take over half a decade to develop because the developers aren’t willing to sacrifice parts of their games, or the games that do come out, but are a little lackluster because of prioritization and decision-making issues. I even know quite a few people who are much more qualified to make a game, but simply haven’t felt the drive to do so.

Frank and I, fortunately, do have a good bit of drive, and we’ve been very careful to get as much use out of it as possible. At the beginning of 2017, we had picked an internal target release date of March 15, 2018, and I’m pretty proud to say that, up until about two months ago, we were on target to meet that date.

Unfortunately, no amount of drive can get you through everything.

 


 

So What Happened?

A few months ago, my fiancée, Molly, went to see a doctor about a lump she had felt in her neck. Long story short, she was diagnosed with cancer this past November. I won’t go into all the details here (if you want to find out more, you can read her blog about the experience here), but suffice it to say that it’s really turned our lives upside down.

chemo

“In sickness and in health”

It’s pretty difficult for me to think of myself as “lucky” in any sense right now, but I know that things could have been much worse – we caught it early enough that it’s still curable. She is currently halfway through her four months of chemotherapy, which means she should be cured by the end of March.

While it’s not as bad as it could be, it’s definitely not good. Molly is the most important thing in my life, Where Shadows Slumber included, and I will continue to do everything I can for her. She has been endlessly supportive of the development of WSS, despite how much time I commit to it, and I intend to be just as supportive of her. Unfortunately, on account of my already-busy schedule, that means some things are going to suffer.

 

Development-Hell

Development shot of the first Level of the Jail.

What This Means for Where Shadows Slumber

If you read this blog regularly, you may have noticed that I haven’t been contributing as much as usual – Frank has stepped up and kept the blog posts flowing. However, what you most likely haven’t noticed is how little I’ve been able to contribute to the project itself. This trend will continue through the end of March – I’ll still be working on WSS as much as possible, but that amount will be far less than it has been over the past two years.

gitcontributions

Cancer and Commits are inversely proportional

What this means is that our targeted March 15 release date is no longer feasible, and we’re in a position where we have decided to push the release date back a few months. We still don’t have a public release date, but you should know that we will be releasing in Quarter 2 of this year rather than Quarter 1.

While this is the biggest concrete reason to push back the release date, to be honest, everyone on the team is breathing a sigh of relief. We are all very determined to finish this project in a timely fashion, and we all have the necessary drive to do so, but we also know that the extra time will help us to make Where Shadows Slumber the best that it can be. I know Frank wanted more time to work on polishing up the art, Noah and Alba mentioned that they could implement some cool sound stuff if we had more time, and I could definitely afford to put more work into optimization.

 

Development-Snow

Development shot of one of the Levels in the Summit.

 

Moving Forward

Despite all of this, I still have the drive to finish Where Shadows Slumber. Aside from the shift in timeline, our plans for the game haven’t changed, and our goals seem as achievable as ever. Hopefully, come April, this will all be behind us, and the glorious future of Where Shadows Slumber will be the next thing on the horizon.

 

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

If you have any questions about our timeline and how it has changed, or if you have any other questions about Where Shadows Slumber, feel free to contact us! You can always find out more about our game at WhereShadowsSlumber.com, find us on Twitter (@GameRevenant), Facebookitch.io, or Twitch, join the Game Revenant Discord, 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.

State of the Art – November 2017

Welcome to State Of The Art, November 2017 edition! This monthly progress report is written by Frank DiCola and is focused entirely on how the game’s visuals have improved in the past month.

<Don’t forget to add in some lame excuse about Thanksgiving before you post this>

Without further excuses, let’s explore the major leaps forward we took in November!

 

0-1-Header

The Game’s First Level, “Fallen”

It took me a while to get around to doing this Level, because there’s a bunch of triggers I had to animate and I didn’t feel like doing those. For the longest time, Level 0-2 has been our de facto “first level.”

Dec-5-Blog-Forest

But the game really begins here, along this spooky Forest path, where Obe first encounters the Lantern. You can watch the entire Level in the video below, since it’s so short. (Just ignore the missing sound effects and animation polish, all of that comes later.) Jack and I have a rigid philosophical stance when it comes to game design: we don’t like using text to tell players what to do. That’s annoying! So this Level is designed so that people can learn how to walk. It’s impossible to avoid picking up Obe’s lantern because he automatically does that when you walk on the first open space in the clearing.

This Level didn’t take too long once I actually sat down and did it. Since Obe can only walk around the center of the Level, and his light radius is quite small, there’s a lot of art I can intentionally ignore. This may seem lazy, but there have been times in the past where the opposite has occurred! I’ve done beautiful artwork around the edges of the Level only to be dismayed to find the light never reaches there, and players will never see it. But I still see it. In my dreams.

 

Dec-5-Blog-City-Header

Level 4-3, “Ramparts”

One of the most ambitious Levels we planned for the game has you scaling the ramparts of a city wall as you climb to the palace on top. It’s a transition Level, which makes it super important for the story. The first two Levels in this World take place in the slums, and the final two Levels in this World take place in beautiful palace gardens. We need a bridge in between those two, otherwise the jump from one to the other will be too abrupt for the audience.

Enter Level 4-3, “Ramparts,” a vertical bridge between two different worlds separated by economic class and power. It’s easier to show you than tell you! We begin on the street, with the dogs.*

Dec-5-Blog-City-A.png

*Dogs not included

Then there’s the middle section:

Dec-5-Blog-City-B.png

On top, we can see the palace architecture more clearly:

Dec-5-Blog-City-C

This Level took forever for Jack to make and for me to decorate. Even now, it still needs an extra coat of paint! The puzzle isn’t difficult, but the vertical nature of it means we need to cover up a lot of the screen. I want to put more plants closer to the top, which I didn’t really have time to do yet. Plant life would indicate that even in this barren desert, the wealthy King who lives in the castle gets to be surrounded by beautiful foliage.

 

Dec-5-Blog-Paradise-Header.PNG

Paradise Begun

The game’s final World is a beautiful island paradise floating in the sky. This is somewhat of a story spoiler, but we’ve blogged about it before so I’m not too concerned. Read on at your own peril, I guess?

It’s taken me a while to return to this beautiful setting. Anything that comes last in a video game usually gets the least attention. It’s regrettable, but understandable. After all, if you see a movie in theatres, you often see 100% of it.  Unless you leave in the middle for some reason, you’ll experience the beginning, middle, and ending. But video games are different. Only a fraction of players make it to the end of the game, but by definition anyone who plays a game experiences the first 5 minutes. That’s why those first 5 minutes are so crucial and get so much special treatment.

I’d like to break the chain, if I can. I want people to feel rewarded for getting to the end of this difficult puzzle experience. Here’s the current progress on World 7, which I just started last week. They’re in rough shape at this stage, but you can get a sense of where I’m going with these.

Dec-5-Blog-Paradise-A.png

Level 7-1, “Ladder” is all about compiling a ladder from a bunch of broken pieces. The ladder comes together using the shadows from that conveniently specific rotating object. It’s harder than it looks! I designed this one and I forgot how to solve it. Good luck!

On the first landing, we get a chance to show off that majestic Bermudian inspired architecture I love so much. If I have time, I’ll even include a cool dude relaxing on a chair just to show how far removed this World is from everything below.

Dec-5-Blog-Paradise-B.png

Level 7-2, “Pond” is due for somewhat of a re-do. The major thing I forgot to include here was a pond in the center where that button is. We want some kind of a sacred grove with a sacred button because that’s how you solve this Level – you need to use the center piece in order to drag boxes around and cast the shadows you need to fix the ending staircase.

This is where design and aesthetics conflict. The pathways we need are very specific and jagged, but the “look and feel” we want is uniform and symmetrical. It’s a tough compromise. I’ll return to this one and remove that weird green rock path (a placeholder) and try to do something closer to my original “Toolkit” Level I posted so long ago:

World-7-Paradise

(This isn’t a Level in the game, but rather spec work I did a few months ago when I was beginning each World’s “Toolkit.” But that center pond is making a comeback, just wait for it!)

Dec-5-Blog-Paradise-C.png

Level 7-3, “Tower” isn’t very far along, but it’s such a cool design I thought I would tease it here. You need to see a video of it in action to really grasp what’s going on, so no more for you just yet! Be patient [ ^_^]!

 

UI-Header.PNG

User Interface Sketches

Generally I prefer not to show off drawings that are not part of the game. But Jack and I just started on the user interface design, so it can’t hurt to show you a tiny bit of what I’m working on…

 

It may seem late in the game to handle this, but we decided long ago that we don’t want a complicated user interface. Above, you can see that our Levels contain all the features that a Main Menu would normally have. We don’t really like having a separate menu detached from the game, so you can access all the key stuff just by “pausing” the game.

Note: this is just a Photoshop design. We haven’t coded this in yet, and not all of the buckets you see above are necessarily being included in the final game. For example, being able to take a picture of the Level is an important social feature, but it’s not essential for the game’s launch and may fall by the wayside.

Interacting with phone features is a big pain and it’s one of the toughest things about game development. Making your game work on every single tablet, flip-phone, e-reader and seashell Kindle out there is a nightmare. Maybe we’ll write a blog about that topic once we get more into the weeds of cross-platform development…

 

christmas2012_alternative_santa_onlycoke_flexible

See You Next Year!

The next time you read this particular blog series, it will be 2018 and I’ll be recapping December. Man, where does the time go? This year has gone blazing by!

This month, I hope to finish World 7 and move on to polishing up each Level. That work is highly specific, which is why it was left until the end.

Polishing the Levels will intersect with working on the game’s cutscenes. That’s because some of these Levels have animated characters in them. I’d like to be sure that the animated characters I create work well in both settings, to save myself time later. So don’t be surprised if next month’s update is a bit of a mixed bag. That’s the way it’s going to be from now until the game launches!

 

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

We hope you enjoyed this update about the game’s artwork. Have a question about aesthetics that wasn’t mentioned here? You can find out more about our game at WhereShadowsSlumber.com, ask us on Twitter (@GameRevenant), Facebookitch.io, or Twitch, and feel free to email us directly at contact@GameRevenant.com.

Frank DiCola is the founder of Game Revenant and the artist for Where Shadows Slumber.

Problem Solving: Design and Complexity

Game design and development is a complicated process. Creating an intricate tapestry of player interaction, incentive, and reward can be quite difficult, and you will no doubt run into trouble along the way. This is a simple fact of game development – in fact, this phenomenon represents most of the time you’ll spend working on your game. Therefore, you shouldn’t worry about it when that trouble finds you! However, an important part of how polished your game ends up, how long it takes to make, and whether or not you even get a chance to finish it is how you handle the issues you run into.

At its core, a game can be described by a set of rules which govern gameplay, and a starting game state. A match-three game, for example, can be described by the following rules:

Simple match-three rules

  1. The game starts with a grid of colors.
  2. Any three or more adjacent cells of the same color disappear, granting points to the player.
  3. If there is an empty cell, the cells above it slide down to fill in the space, generating a new cell at the top.
  4. The player may switch the colors in two adjacent cells.
  5. The game may end when the player reaches a certain number of points, or when they make a certain number of moves, or if there are no available moves, etc.

Obviously, these rules don’t encompass everything that happens in a game, and the rules get much more complicated very quickly for more complex games. These simple base rules define your gameplay, but they very quickly become more intricate as you add features and functionality. Let’s look at a few updates to our match-three example:

  • If we want to add a type of cell which can’t be moved, we would have to change rule #4 to “The player may switch the colors in two adjacent cells unless either of those cells is unmovable”.
  • If we want to add an “exploding” cell which eliminates nearby cells, we would have to change rule #2 to “Any three or more adjacent cells of the same color disappear, granting points to the player, and if one of them is an exploding cell, adjacent cells also disappear”.

The base rules handle 90% of the gameplay situations, but we have to add special provisions for exceptions of those rules. In game development (and computer science in general), these exceptions are called edge cases, and, as necessary as they are, they’re super annoying. Your code will include edge cases, and it should, but you have to be careful with them (edge cases may be considered a type of hack, which I discuss in one of my previous blog posts), and you should avoid them when possible. One of the primary ways to do that, depending on your game, is through design – rather than complicating your codebase, you can try to design your game and/or levels in such a way that you don’t need to change your code.

 

An Example from Where Shadows Slumber

Let’s take a look at the inspiration behind this post – a case I ran into in Where Shadows Slumber where I faced such a decision.

1-1 goal

Ominous!

At the end of each level, there’s a ‘goal’ space. When Obe steps on it, it triggers the end-of-level sequence to begin – the lights fade, Obe walks out of the scene, and then the next level loads. The question is, given the game rules, how can I make this happen? I could have added a specific code path for this case, but I realized that I could use some already-existing mechanics to create this effect:

  • The machinery behind buttons can already handle “trigger something when Obe steps on a space”, including a delay for ending the level.
  • The machinery behind Obe walking in at the start of the level allows us to redirect his movement.

This is one way of handling an edge case – try to reduce it into an example of something you already have, thus changing it from an edge case into a normal case. Now we’ve changed the ‘goal’ space into a different-looking button with a redirect space.

Now, there’s another situation involving the goal space where I was given a similar choice. In some levels, there’s a space both to the left and to the right of the goal space. This enables a situation in which the player moves onto the goal space, and then away from the goal space. This creates a problem: the end-of-level ‘button’ will trigger, the lights will dim and the next level will load, but Obe hasn’t left the scene – he’s still just standing there!

ezgif.com-video-to-gif

Well that’s not quite right…

This is a problem I can solve by changing the rules, or by changing the design. The rules for redirecting Obe’s movement only apply when he doesn’t already have a destination. In order to handle this situation, I could add a case that says “if the current node is the goal node, do the redirection”. This requires that I add code to mark a node as the goal node, and to check if the current node is the goal node. While this code would be pretty small and easy to write, it still adds to the overall complexity of the codebase. Is there a way to avoid doing so?

There is, in fact, and it’s quite easy. If we simply remove all of the places where this could happen, then we don’t have to worry it! We’re not “solving” the problem in a conventional sense – if the configuration of spaces were to come up again, the problem would still occur. However, by changing the level design, we remove any chance of that happening.

1-1 goal with boxes

I’ll have Frank make something more on-theme to fill that space

This is another way of handling an edge case – by making a small change to the level design, we’re able to avoid making changes to the codebase. This prevents our code from becoming needlessly more complex, making it easier to understand and maintain. While not every problem can be solved in such a simple way, there are many that can, and keeping an eye out for them is a great way to avoid unnecessary code complexity.

 

Living on the Edge

I keep talking about edge cases and code complexity like they’re bad things. But an entire game is a very complex thing – doesn’t it make sense for the codebase behind it to be complex as well?

There’s nothing inherently wrong with complexity in your code; a well-implemented cache invalidation algorithm is a beautiful thing, complex as it is. What isn’t beautiful is needlessly complex code. The logic in this code is usually hard to follow, makes assumptions, and leaves a lot of small bugs that you’re unlikely to notice right away. This is a recipe for disaster, because every time you try to make a small change, you have to wade through a swamp of half-thought-out code paths, and you end up adding more complexity just so that you don’t have to deal with the complexity that’s already there!

The biggest problem is that it’s very hard to tell the difference between code that’s complex because it has to be (good) and code that’s complex when it doesn’t have to be (bad). The way I deal with this is to try and realize when the code I’m writing is starting to become very complex. Even though I might only be fixing one bug or working on a specific part of the implementation, I try to take a step back and look at the problem that I’m trying to solve, and how I’m solving it. If the problem is a complex one (cache invalidation), then I accept that it’s gonna be a complex algorithm, and keep writing it. If it’s not a complex problem (sorting), I take another look at my code and see if there’s a better way to do what I’m trying to do. In this way, I continuously re-evaluate the complexity of my code, and whether or not I need it.

Hack

Six while loops isn’t too many, right?

I know that “I just know when it’s too complex” might not be the most satisfying answer for those of you who often run into issues of complexity. That feeling is something that you pick up as you do more and more coding, and especially as you revisit your own code – “wow, I can’t believe I wrote such stupid code”. For those who want a more concrete answer, here are some of the ‘red flags’ that I try to keep an eye out for when assessing the complexity of my code:

  • A lot of ‘if’ statements – If your code has a lot (and I mean a lot) of random ‘if’ statements (especially nested ones), then you might want to take another look at the design.
  • “I don’t know…” – If you can’t quickly and easily determine what each piece of your code is meant to be doing, your design might be too complex.
  • Guessing – If you ever find yourself just “trying things” and “seeing if they work”, it’s a clear sign that you don’t understand your code well enough. Take some time and get to know it!
  • Duplicated code – If you have the same block of code copied into a few places, you should revisit your design. Either that block belongs in a helper that you can reference, or the control flow of your code needs to be reconsidered.
  • Asynchronicity – If you’re doing anything asynchronous, you should give your code another look. I know you probably did it right the first time, but asynchronicity is one of the most difficult parts of computer science, and it’s always worth double-checking.

There are a lot of other things that you might notice about your own code and its complexity – these are just a few quick guidelines off the top of my head. Hopefully they help!

 

But Game Development is Fun!

Anyways, I hope I didn’t scare you away from computer science. If anything, I wanted to instill a healthy fear of needless complexity, and I hope that you’ll do what you can to reduce that complexity – whether by redesigning your code or redesigning your levels!

 

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

If you have any questions about code complexity and how to design around it, or if you have any other questions about Where Shadows Slumber, feel free to contact us! You can always find out more about our game at WhereShadowsSlumber.com, find us on Twitter (@GameRevenant), Facebookitch.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