I hope you're having a nice day

Touhou Game Jam 5 Post-Devlog

20 Jan 2020

I made a tower defense game! Read to find out the SHOCKING details…

Ok maybe they’re not that shocking but you’re already here so now you have to read >:~DD

If you don’t know what a game jam is, it’s basically an event where you have a limited amount of time to develop a video game from scratch, usually with a theme of some sort. It’s typically permitted to use an existing engine/framework (GameMaker, Unity, something you’ve made yourself…) as long as all of the game-related code/assets/etc are developed during the jam itself.

And if you don’t know what Touhou is…

Screenshot of shooting game with many on-screen bullets

…It’s basically a shoot-em-up where you have to dodge like a billion bullets and I love it. The characters are also pretty beloved by fans of the game, and so games made for these game jams tend to focus more on the characters than the game style - it’s more likely that someone will make a game in a different genre using the game’s characters than it is someone will make a game in the same genre using different characters.

So what was the theme for this game jam??

Banner reading "Touhou Fan Game Jam 5!! Folklore, Myths, and Legends" (Art by @minutekiwi)

“Folklore, Myths, and Legends”… These themes are heavily present in the Touhou series, so there was a lot of material to work with. I ended up going with an event that was adjacent to the Imperishable Night game, the Tsukimi (Moon-Viewing) Festival.

Originally, I was going to make a game that was in the normal shoot-em-up style of Touhou games, since I had been working on an engine dedicated to those types of games for a couple months prior, but right before the start I suddenly felt like playing a tower defense game out of nowhere, so I decided “oh I’ll just make a tower defense game instead”, which would prove to be a FATAL MISTAKE… (not really I just wanted to sound dramatic)

So my initial plan was set: make a tower defense game using the characters from Imperishable Night as towers. As for what the enemies would be, I hadn’t yet decided… I considered other characters or fairies (common enemies in Touhou games). While I thought more about it, I worked on the first tower: the main protagonist of the series, Reimu Hikari. It was a straightforward choice since, like I said, she’s basically the main playable character of every single game, and her signature ability is pretty straightforward, too - homing bullets. I decided to focus on the programming part of things before getting into art, so I was quickly able to have my first working tower!

I know, my placeholder sprite skill is superhuman. Anyway, getting this working so quickly definitely made me excited to make more towers, so I started brainstorming. Imperishable Night has a partner system for its playable characters, with Reimu being partnered with a sword-wielding character named Youmu Konpaku. She felt like a natural addition, as in contract with the ranged, attack-everything-in-sight Reimu, she could be more of a close-quarters fighter, slashing at enemies that venture close.

(The ghost sprite I used for her was probably my favorite placeholder…)

You might notice that the towers disappeared from the little inventory space as I placed them - this was an idea born from the thought that there would be a lot of levels, and the towers you bought would stay with you throughout them. This, along with a couple of other ideas, had to be changed as I realized I probably wouldn’t have enough time to fully realize it. Instead, I eventually opted to make them purchasable an infinite amount of times (well, an amount of times in accordance with how much money you had) to shift the game towards more of an arcade-y style.

After these first two towers, I started working on the second (and as of the time of writing, final) level of the game, to use more space and provide a better challenge/oppurtunity to utilize more towers. I decided I’d make two more towers to go with this level, another team from Imperishable Night: Marisa Kirisame, best known for her use of lasers, and Alice Margatroid, a girl able to manipulate dolls, who I especially thought would make for an interesting tower.

Marisa was a little challenging to implement, as anyone who has made bullet-like games knows implementing lasers is always an interesting task. All of the hitboxes in the game are circles, with the laser apparently being a rotated rectangle, so handling collision detection between the lasers and the enemies would be different than the normal bullets. Originally, I tried to implement just that - a rotated-rectangle-to-circle collision detection algorithm, but edge cases kept popping up that would basically break the ability, so eventually I had to settle with making the laser basically a stream of circle hitboxes. This isn’t particularly elegant in my opinion, but sometimes that’s what you get when you have a limited amount of time T_T.

Screenshot of the game showing Marisa firing a large laser with 4 circular hitboxes within it. Here you can see her laser with the hitboxes shown.

Besides being cool, a benefit of making her laser large was it meant that less circles had to be used to fill it, so there was less of a chance for lag when a lot of objects were on screen (which was primarily a concern when the player was using the speedup feature).

You may also notice the lack of placeholder images in those screenshots! Sometime during the development of the final tower, Alice, I decided to go ahead and make actual sprites for everything. Honestly I’m pretty proud of the result, as I don’t consider myself very good at art at all, but these weren’t horrible!!

Here are the comparisons:

Towers: Prototypal tower art. It's not very good. Final tower art. It's much better.

Bullets: Prototypal bullet art. It's not very good. Final bullet art. It's much better.

Enemies: Prototypal enemy art. It's not very good. Final enemy art. It's much better.

As for the direction the enemies took, a traditional practice at the Moon-Viewing Festival is to offer certain foods to the moon, so I thought it might be funny if the moon didn’t really even like those foods… so I had her turn them into youkai (supernatural beings) to attack the festival. So what you see there is a sweet potato-type food, a chestnut, edamame, and a rotten orange that Reimu had in her lunch box.

I also composed some chill background music to loop while you play since that’s basically a requirement for tower defense games imo.

With those taken care of, basically all I had left to do was finish up Alice! She was definitely the most difficult tower to implement, as I honestly wasn’t totally sure what I wanted her to do at first, and when I did figure it out handling the logic for the dolls was a bit of a pain… it worked out in the end, though!

Originally, I was going to have her shoot out dolls like bullets and have them latch on to enemies for a time before exploding. I decided against this because I thought she provided a really good opportunity for a more unique, non-shooting tower. Eventually I decided she would make for a good slowing tower (since the edamame were fast enemies, it would be nice to have a good counterplay option for them). She would control a certain number of dolls at a time, starting with 2 and increasing as you upgraded her, and those dolls would attach to enemies in her range, slowing and damaging them while they remained in her range. Once they left her range, the doll would attempt to find a new target, circling her idly if there were none in range. Dolls from the same Alice tower could not target the same enemy, but dolls from different Alice towers could. I thought this was a pretty good implementation, and it ended up being my favorite tower to use despite it being so expensive T_T. I think I just liked watching the dolls flit around though.

You can see her in action in this (bad) run I had:

And that was basically it! The remainder of the time was spent trying to balance all of the numbers, such as tower costs, damage, enemy hp, etc, etc. This was probably the hardest thing of all, as it is definitely something that benefits from a lot of playtesting, which I unfortunately didn’t have a ton of time to do. I think in the future, deciding on some sort of standard metric would definitely be the way to go (I basically just played it by ear), but it didn’t end up being too easy or too hard I think, which is fine.

Anyway, that’s all for this post! You can try the game out here, and check out the rest of the games made for this jam here! Thanks for reading, bye!!!