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 {
damage=0;
obj_player.vspd = S_JUMP_SPEED;
sprite_index=spr_flower_squash;

if damage = 0 {
alarm[0]=90;
}
}

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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s