Making a Game Jam Game During Self-Isolation

When you are at home all the time, the days seem to just blur together, so I thought it would be great to participate in a game jam with someone. Initially planned to do it in a team of three. Sadly others couldn’t make it, but I’ve still decided to participate.

I’ll go over most of the decision process, design, but first, here is the result of two days of work:

Play Build.Upgrade.Repeat.

Planning

Let’s first shortly go other the jams rules, it was two full days for the jam, plus an evening of day zero when you got the theme but can’t write any code or draw anything yet. Unlike Ludum Dare Compo you could use any art, music, or code libraries.

When just considering to participate or not, I got a couple ideas of things that may be fun to make (some game genres or maybe a way to use my planet name generator). I’ve heard Unity added the isometric tilemap support and I’ve never made an isometric game before, so I though that may be interesting.

Unity Isometric Tilemap System

Played Golf Peaks recently and thought a golf game, although not turn-based, can be fun. Another one was something to do with building rail tracks and maybe delivering something with trains (been playing too much Factorio I guess).

And finally the tower defense. I was reading the article on the TD design by Lars Doucet of Defenders Quest fame (which is a great game by the way). I knew I couldn’t make as a thought-through TD during a jam, but with theme constraints, it could turn into something interesting.

And then, on the stroke of the hour, the theme was announced: “Immortality”.

Day Zero – Brainstorming

As you can’t code on the day you get the theme – I’ve opened a note on the phone and started brainstorming.

Someone looking for immortality? You can’t kill enemies, only slow down and push back? There is one immortal enemy you need to do something about? You are immortal under some conditions?

Then it hit me – in a lot of roguelikes you resurrect after a run. What if I make a roguelike with one of the genres I wanted to try, and reinforce the idea with a bit of narrative. I do not know about you, but a roguelike tower-defense with meta-progression sounds pretty exciting.

As in roguelikes, you would lose, but keep something from the run to be able to upgrade permanently and be able to progress further. You would lose each map a few times. If you complete it – the map evolved, new enemy spawn points appear. I’ve planned some upgrades I can easily implement, planned a bit of story, and its visual contrast.

Considered having one currency (thinking of Rogue Legacy and similar games), or actually having a separate currency for meta progression. I’ve picked the one currency as it seemed more interesting at the time. I’ll go more in-depth in “Design Thoughts” of what I think was the correct decision and why.

I’ve set up an empty repository on bitbucket – I work from a PC and a notebook so it is useful to share the project, plus I will always have an ability to rollback some bad changes.

I’ve also spent some time setting up a timelapse for tomorrow, using a modified version of this script.

Day One

Tile Palette

I knew I wouldn’t have the time to also draw everything (and it wouldn’t look great), so I’ve searched for tower defense isometric tiles. I’ve found some that weren’t free and some from an artist I knew – Kenney.

I’ve just started by trying to draw something with a Tile Palette tool.

Tile Palette Results Game View
Tile Palette Results Unity Editor View

I’ve also downloaded 2D Extras to place tiles with logic. Not sure why it isn’t an actual package or a part of Unity. What is the intended way to create tiles out of prefabs then, or can you make the game without it?

I didn’t understand it initially, but if you have tiles with different heights (as it was in my case), you can actually change the ‘y’ position of any tile in your pallete, then when you draw with it, it will look correctly.

Towers

Initially I’ve just tested out the tower logic by placing them using the pallete tool. At that moment I had no idea how to create them at runtime in the correct spots. I still have a feeling that either I haven’t found a way to do it correctly, or the Unity Tilemaps aren’t that good for tiles with logic. As I understood it, they are just prefabs placed in the correct word position, but they aren’t actually a part of the tilemap.

Figuring out the prefab tool and actually placing the tower during play mode, I immediately knew that without range preview you wouldn’t be able to make decisions of where to place them. For that, I’ve used the trusty Vectrosity plugin. I initially made both the range checks and drawing be a circle, but it looked weird when everything else is isometric, and knowing the width is double the height I thought I would quickly try to draw the ellipse. With Vectrosity that took just seconds. And then I needed to fix the range check, and of course, I spent some time trying to fix the calculation.

Tower Placement Preview

Juice

When working non-stop, it may be good to switch from hard problems by adding juice instead.

DoTween Example Damage Bounce

You primarily just tune the parameters until it looks good. Even if you don’t subconsciously solve the problem, it just feels easier than hard problems back to back.

DoTween is great for this sort of things.
I use the free version. It is super easy to use once you remember how the API works, allows you to add tweens super fast. This damage bounce effect is just a couple of lines:

1var sequence = DOTween.Sequence();
2sequence.Append(transform.DOMoveY(transform.position.y - 20, 1f).SetEase(Ease.OutBounce));
3sequence.Join(transform.DOMoveX(transform.position.x + 25, 1f));

Other

When working on game jam games I only use MonoBehaviour classes, so I add them with “Add Component” right on the GameObject I need.

Unity Add Component Script

This sadly results in them all being in the root folder which makes it harder to navigate, but when it’s just 10 scripts or so, it’s fine and I only search for scripts in the IDE anyway. Also, apparently there are some custom scripts to get around it.

On the first day I’ve also implemented basic pathfinding for enemies, a few enemy types, basic spawner logic, and a few smaller things.

Day Two

Got a bit stressed at the beginning on the second day, knowing how much wasn’t yet finished and knowing that this is it, this is the final day.

Story

During brainstorming, I’ve planned to add story bits after losses to better explain the theme, and so I’ve started the day with it.

DoTween again helped with making sequences of tweens for the dialog to not just change from 0 to 100% visibility.

Dialog Between Level

I also implemented a global Level Progress class that handles what exactly happens after each loss or victory depending on the level and number of overall losses.

Upgrades

Upgrades are another thing I needed and without which I don’t think it would have been a roguelike. Initially, I’ve added just the damage & crystal HP.

But after a bit of testing, it seemed like there weren’t enough upgrades to purchase at least something after you lose. Fortunately adding new upgrades was very easy – adding a new type took only 5 minutes each.

Upgrade Screen

Levels & Waves

Done some level design adding two more maps. One an evolution of the first, another is a completely new one with three spawners and a goal in the middle.

More Levels

Making different maps revealed that the simple pathfinding I made was pretty bad, even with some crutches. Instead of trying to rewrite it decided to alter the level a bit.

Initially, I thought I would just spawn enemies in random positions, and allow to spawn a maximum of 6 enemies per once or so, but that lead to enemies being on top of each other. Instead, I’ve set up 5 pre-defined positions and could specify enemies for each one.

Wave Spawner Setup

Because I wanted multiple spawners on one level, the waves are specific to each spawner, and are set up on the spawner object itself.

Sound & Music

Nearing the end of the jam I knew it would be great to add sound and music to the game. You can often find pretty good sound effects and music for free, and it takes just a few minutes to hack it into the game.

When initially adding sound effects, it all seemed pretty boring. Adding the music helped, but still not sure about it, and especially the looping. I always worry the song will be so repetitive you’ll be bored of it in 5 minutes.

Looking for sound effects, this time I also turned to Kenney, and for music, I’ve searched for royalty-free ones on bensound.

Royalty Free Music

Final Hours

Decided to add a second card: aside from just placing towers, a way to remove stones or trees. Just copy-pasted much of the code from the Tower Builder script, but without a preview, because the code couldn’t be just reused.

Two Cards

Started building a web version an hour before the deadline. 10 minutes passed – building. 20 minutes – still building. Got pretty worried, also downloaded the latest version to the notebook, and of course the WebGL build tools weren’t downloaded. While I got everything set up on the notebook, the PC finished compiling. I’ve made a small change and started to rebuild, this took only 5 mins or so. Possibly thanks to the Cache Server.

Last half an hour I’ve been just playing, seeing if something broke during the last changes.

Design Thoughts

After the game jam, I had some time to think, and collected thoughts I had during the jam. So here is the list of things I find questionable and would need to iterate on to improve.

One Currency

Didn’t think this through enough and went with one currency, just to realize later on day two why this wasn’t a good idea because you can restart runs just to farm (which leads to misaligned ideas for what is fun and what is the simplest path), and not giving currency on level start will lead to you not being able to build anything and not being able to progress as a result.
Maybe it can be fixed by other design decisions, but especially for the game jam, I should have picked two. And later thinking it though – I realized that Rogue Legacy only uses one because there is no need for a currency during the run, so they have just the meta currency, plus there is an NPC that doesn’t let you build your wealth by small increments.

‘Remove Stone or Tree’ Card

Was adding it at the last moment and in its current state I’d probably better spent this time on other things.
To make it at least somewhat usable I would fix pricing, change the icon, add preview, allow to select the remove tool even when you don’t have the energy for it, as with towers. This check appeared at the last moment just because I thought otherwise it will be unobvious without a preview, and the real fix would be a good preview for it.

Only after submitting thought that removing stones/trees persistently would have been interesting and reinforce the theme, although still wouldn’t be obvious with the current implementation.

Balance / Progression

The thing I somehow underestimated, is how little amount of upgrades you would need to actually beat each level and the game as a whole. I didn’t want to make the game too hard, but at the same time, you can grind to get upgrades and finally beat it. Maybe this is also partially a result of one currency and me not being sure you can actually get enough currency from a run to buy upgrades and still have some left for the next run to place a few towers.

Making a jump from 1 damage to 2 was also probably too much, making it random seemed harder, and I thought I could just rebalance enemies to account for it.

First Loss

I knew during the jam that to not feel bad about it, you need to understand that you have to lose on the first go – for narrative reasons, and also to set expectations, this is a roguelike and you will lose repeatedly.

I thought about sending obviously huge waves and changing the enemies after first loss, but it seemed cheap. I’ve tried to hint it in the text, which appears right after, but there is a chance you will skip it.
I’m not sure what is the correct way to handle it at the moment, and would probably look at other games for reference.

Overall

After the jam ended, I’ve collected all the screenshots made by the timelapse script and used DaVinci Resolve to edit it together. So here is the timelapse of both days:

Overall, it was an interesting experience, I’ve learned a bunch about Unity’s Isometric tiles (and their tile system as a whole), which I’ve never worked with before. And pushed the limits of the amount of bad code you can write in that period of time.

On the first day, I really wished I would just make my own tilemap I could fully understand, the math seemed pretty simple. By the end of day two I’m glad I had the Pallet and the paint tool, even though not perfect (at least in 2018 LTS) it did help.

I guess this was the first game jam I actually didn’t eat bad and did sleep a full 8 hours, felt pretty good the whole time. The problem wasn’t me not working enough, but going against my own advice and picking the wrong scope for just one person and two days. And I don’t think actually having experience with Tiles in Unity beforehand would change anything drastically.

Initially, I thought: “the tower goes pew-pew”, how hard can it be.
But there is:

  • Level design
  • Enemies & Waves (and they spawn logic)
  • Ability to actually build towers (with previews, otherwise it isn’t obvious even for TD players)
  • Displaying the range (to be able to make decisions of where to place it)
  • Path-Finding (even bad implementation took some time)
  • Currency & Upgrades (without which I don’t think it would have been a rogue-lite)
  • Dialogs (and effects for it, which also was specific to try to explain the theme better)
  • and of course a lot of balancing, which sadly I didn’t have much time for.

That’s too many systems, which lead to not enough design iterations and not enough content (and not enough polish). I still think it could be interesting as a full game (with a bunch of work of course), but it was too much for me to make in two days.

The code got pretty bad by the end, but it is available on Patreon if you are interested.


More game jam related articles.

Sharing is caring!


You may also like:

Related Content: Making a Unity Plugin for the Asset Store

Making a Unity Plugin for the Asset Store

Related Content: Time Manipulation in Unity – Rewinding Time

Time Manipulation in Unity – Rewinding Time

Related Content: Time Manipulation in Unity – Level Creation

Time Manipulation in Unity – Level Creation

Related Content: Unity Unit Testing Advanced Tutorial – CI, Patterns, IDE Support & More

Unity Unit Testing Advanced Tutorial – CI, Patterns, IDE Support & More