With Mystery Game No. 1 in private beta, while I’m waiting for feedback, I’ve had all week to dedicate to Dragon Attack. A lot remains to be done, especially in the tweaking and balancing department, but there has been a lot of progress.
I added something I’d been thinking about for a while: sticky treasure. You know how Smaug in The Hobbit has his chest crusted with jewels, making him nearly invulnerable? In Dragon Attack, houses now spawn gold coins, and churches spawn diamonds. Both stick to your dragon wherever they first touch, and provide protection against arrows. A coin neutralizes one hit and then falls off, a diamond three.
This has a big impact on gameplay. Previously, without the hearts spawned by houses and churches, you wouldn’t make it past level 2. Now, I usually make it to level 5 or 6, even though there is no way to replenish health. Placing the treasure strategically is critical, and this gives experienced players something to do early on in the game, so they won’t get bored dispatching easier enemies but instead are preparing themselves for the tougher stages.
There are many collisions going on in the game: between arrows and the dragon, between fire and the archers, between fire and buildings, between powerups and the dragon, and so on. Up to this point I’d been handling these in an ad-hoc way, but the time had come for a refactor. Now I can register collision handlers that look at the two colliding entities and decide whether they want to do something with this collision, or pass it on to the next handler.
This simplified a feature I wanted to add: making fire not go through the ground. It makes for more interesting gameplay because you can no longer burn archers from the other side of a hill, but it also makes the ground feel a bit more solid. And because the ground is something you really, really don’t want to hit, that’s a good thing.
I also replaced the font by one I think more fitting, Trade Winds:
It’s not suitable for large swathes of text (like the stats you get at the end), but as a display font I think it works nicely. I hope people won’t find it too pirate-themed; otherwise I might try Shojumaru – though I find it a bit too Oriental for this rather Western dragon.
Note that this splash screen is temporary (thank goodness).
Oh my, trees! I’ve always been saying “I want lots of stuff to burn in this game”, and this is only the beginning. Basically, patches of bare land without anything flammable should be few and far between.
I’m going for a somewhat realistic art style despite the silhouettes, so I figured it would take a lot of time to even draw one tree, let alone some variation. That’s when I thought to type “procedural tree generator” into Google, and out popped Arbaro, a Java application that generates trees and exports them to povray files. The results are really decent, and the program comes with several examples:
I wired some stuff together with shell scripts, added collision boxes and spawner configurations, and voila!
Maybe I’ll need a bit more variation, but it’s really easy to generate, so I’ll leave that for later.
Oh my, music! Music can be so important to the mood of a game. I’m talking to an audio designer about doing sound effects, and although he can make music as well, I think that will be outside my budget. So, like everyone, I turned to Kevin MacLeod’s amazing collection of Creative Commons music.
Besides being free, an advantage of using these over a custom-made track is that you know exactly what you’re going to get, and you can try out different tracks before settling on one. So I wrote a few lines of code that would play a different track from my shortlist on every playthrough, so I could compare and contrast easily.
I used to envision this game with a rock or punk soundtrack, with a pumping rhythm and lots of bass and dirty guitars, like some of the tracks of Red Alert 2. MacLeod does have a few of those, but I found that this style generally becomes really tiring to listen to after a while. I also think it would clash too much with the sound effects.
So I tried some orchestral tracks instead, more like what you would find in battle scenes in a fantasy action movie, and that also works pretty well. Once I make up my mind which of the four remaining tracks is most suitable, I should really make a video.