Boss Battle

I went back to the GDD this morning and tweaked little bits of information that have “evolved” during the development of Hanami. I took a look at the list of events that I wrote right at the beginning of this project, to try to work out how to conclude the game. So far, motivations for playing the game have been about progression, so I finally needed to realise a result of the player’s hard efforts!

The best way I could think to conclude the game was to have a Boss Battle, which was something I wasn’t originally planning but feel that the player would be let down if the game ended without one final challenge. So, the final door that is opened will lead to a “battle” with the Zashiki Warashi spirit, resulting in the spirit transforming back into her Kokeshi doll form. This essentially solves the “Hanami crisis”, and the player will be able to roam the world obstacle free in order to collect the remaining blossoms. There shouldn’t be many left (about 10 or so?), but only be collecting EVERY SINGLE LAST BLOSSOM will the game truly end.

The terms “Boss” and “Battle” are strong words, but it’s the best way to describe this glorified final obstacle! I haven’t introduced any new techniques to the battle, the Zashiki Warashi spirit can be de defeated in the same way as the Deceitful Blossom, by jumping on the enemy’s head. The main difference is that this enemy has a 5 health points and a projectile attack! The battle is really based on the sort of sub-boss battles you’d fight in old Super Mario games, where jumping three times on a Koopa’s head will let you pass to the next stage. I’ll record a video to show what I mean if I get the time!

EDIT: Here you are, Boss fight footage recorded exclusively recorded for this Blog:

For this stage, I’ve created three new game assets. The first is the Za-chan object, which controls everything that the enemy does. She works with three alarms, one which instigates “attack 1”, another which instigates “attack 2” and a final alarm which determines how long she is static for when hit. She has her own health counter, which is shown by my second new asset which aligns with original HUD:

The third new asset I have (half) created is an object called obj_attack. At the moment, this object is represented by my Gunkan Sushi sprite, as I haven’t actually drawn anything to go here yet… So, when the enemy shoots her attack towards at player, she is currently shooting sushi. This has been fun to test, and I will almost be sad to see it changed! This has been the easiest to program, as it’s only job is to move steadily towards the player. If the player is hit, then the projectile is destroyed, to avoid being hit twice by the same attack.

This is by far the most complex AI controlled NPC character I’ve created so far. The character moves in relation to two objects, the player and a “block” object, which keeps the enemy within a certain space. Za-chan moves slightly slower than the player, so it is possible to catch up and jump on her head! If the player is quite far from the enemy, the enemy will move towards the player. If the player is very close to the enemy, the enemy will move away in evasion. As well as this, there is a certain distance from the player that Za-chan will simply stand still and spam the player with attacks, however this will only happen if the player is also standing completely still. This system works well enough to keep the enemy moving about, but I noticed that it was possible to defeat her too easily by trapping her in a corner. So, I’ve added a final line of code that states that the enemy must move towards the player if she gets too close to the “block” object, even if this means a collision with the player. Colliding with the enemy actually causes player damage, so this in itself acts as a sort of attack mechanism.

Za-chan’s two “attacks” are thrown when each of the first two alarms go off, and this code simply resets each one so the enemy constantly attacks at an even rate. Attack 1 throws one sushi, and attack two which is less regular throws 2 sushi!

I’ve used almost exactly the same code as the Deceitful Blossom to program what happens when Za-chan is jumped on. I’ve simply changed the squashed flower sprite to a new sprite, and ensured that during this time she can neither deal or receive damage, and she cannot move! I thought it would be appropriate to make a new sprite animation where she sits down and rubs her poorly head after having an full grown woman jump on top of it…

Once she has been defeated, I’ve also created a new “transformation” animation which turns her from spirit form to Kokeshi form. To do this, I created a cloud which passes over her to reveal the doll underneath. I’ve made this in the same style as my previous “auspicious clouds”, and drew out the animation first to make sure the swirls moved bout fluidly:

And here is the final result:

At the moment, I’ve set the battle out in the most final stage I have made, even though this is currently far from finished. The aim for the rest of this week is to finish the inside of the building and build a proper “Boss Stage” level for the battle to be held in. I’ve recorded a video of the battle so far, although I think I still need to make some tweaks to the rapidity and speed of attacks. I’ll probably have to get back onto SunVox too to create some epic Boss Battle music!

Evil Botanicals

As a slight side-track to my main objectives today, I spent a little time refining and reworking some of my quickly made “enemies”.

This is the new animation I’ve come up with for the deceitful blossom. I felt that the best way to animation the flower was to give it a stalk and plant it into the ground, as this gave the blossom a base to pivot on. It looks infinitely more menacing than before, potentially raising awareness of its presences.

After seeing the flower in the game, my immediate reaction was that I wanted to jump on it to destroy it- in a Super Mario fashion. I’ve always said that I wanted obstacles to be “evade only”, but this so far has led to boring sections of gameplay and not a huge amount of variation in play strategies. So I though I would give it a go, except that by jumping on the flower the player can only temporarily squash and disable the flower- it will eventually pop back up. During the time it is “squashed”, the player can walk over it and not receive damage- otherwise damage will be taken if the player approaches the flower from the side rather than from the air.

Coding for this has been quite a challenge for me, as there are a lot of parameters to set up in regards to when the player takes damage and when the player is fine to pass by, but I’ve come up with a unique system which unfortunately cannot adhere to me previous obstacle parent object.

When the flower is in its normal state, I’ve created a variable that states that “damage” is true (damage = 1;). When the player makes contact with the flower, damage is taken. If the flower is approached from a greater y value or the flower has been jumped on, the value of “damage” changes to 0.

if damage = 1 && y>obj_player.y {
obj_player.vspd = S_JUMP_SPEED;

if damage = 0 {

The alarm sets an amount of time that damage remains at 0, before it is reset and changes back to 1. The flower will always reset after 90 steps, giving the player just enough time to occupy the same space as the obstacle. This is handy for jumps like the image above, where jumping over the flower would be impossible.

As promised, I’ve also changed the suspicious-looking sprite for the swinging spike plant object. This is not a finished version, but represents what I’m hoping to do with the new sprite. Before, I was using Game Maker’s draw function to draw a line from a connection point to the spike plant and used some maths to give the object velocity. This looked fine in my opinion, but the problem was that the collision mask remained static, no matter position of the drawn sprite. I had the option to create a custom collision mask, like I have done for the Hello Mushroom object, but id I was going to do that then I figured I might as well make my own swinging sprite. This sprite covers a similar distance to the previous sprite, but I think it may move slightly slower. Unfortunately, unless I do a whole load more tweening, the animation will never look as smooth as before, but it may fit in better with its surroundings. All issues with the collision mask are naturally fixed.

A Day of Walk Cycles

In home-made games, I often find myself judging the quality of the game on the quality of the character animations, specifically on the walk cycle. To me, a game character without a natural-feeling walk animation is a character made with no real love or attention, and shows poor effort. Despite this, I would like to point out that games like One Chance can be redeemed by mind-blowing gameplay. This may look basic, but trust me it makes your brain work up a sweat.


I have yet to memorise the standard human walk-cycle, or even find an example that I use every time I animated a human character. In this situation, I usually turn to Google for new examples to follow. I quite liked this example, provided by a digital animation student from Falmouth. It’s accompanied by a video of an actual human being walking, and the student’s drawn interpretation based on the key cycle points. In my opinion, this is alot more helpful than cartoon examples or stick-figure tutorials.

I tried to adapt this into the little biro sketch above, which I tried to make to the same proportions as my pixel sprite. The inconsistency between drawn characters is exactly why I am not an animator! I used the frame-based animation tool in Photoshop to get a feel for my first-try walk-sequence:

The arms are a little erratic at best, but I was surprised at how well the legs flowed! Normally in my first go, I forget which leg is which and they end up merging in the middle. The problem from here was translating this infinitely high dpi image into a tiny game sprite with legs 3 pixels high (as I reminded myself in the image just in case.) If you look back at the original sprite, the legs were going to be 2 pixel high, but I decided this probably wouldn’t help a natural walk cycle. Just to update you on the few changes I have already made to the design, here’s this morning’s sprite:

I think the only noticeable differences are that I made the legs slightly longer and the head less wide, although I can’t say for sure without comparing the two for hours. I spent a lot of time today rearranging pixels until they looked right, rather than concentrating on little bits.
To avoid getting Hana’s legs mixed up in the process of animating, I worked on each leg individually to begin with. I then placed the two images on top of each other to reveal the full Hana, although it was very difficult to predict the outcome this way! What I’ve ended up with is a sort of over-exaggerated run, partly due to the lack of pixels making very harsh shapes out of the legs:

Individual Leg Animations in Graphics Gale

I added the arms later, trying to avoid the flailing motions of the test animation. The result still doesn’t seem perfect, and definitely isn’t a natural motion! In an effort to improve this, I’ve been working on another sequence, which concentrates on the character twisting slightly to put emphasis on the particular leg which is taking the step. This seems to provide smoother arm movement, as the body twists as the arms move. It’s based on this little strip I quickly drew up (but don’t think I really finished):

I haven’t managed to animate the legs for this sequence yet, but the rest seems to working. This can especially be said for the shifting eyes, which just give the whole animation a sense of direction!
This was really easily applied to Za-chan, who is the exact same shape and size as Hana. I hope this second take is going somewhere, as it seems a lot neater than the previous attempt.