Skip to content

More Enemies and Finishing off the Programming of ‘Pink Hair Girl vs Plants N Stuff’

November 24, 2010

The next step was for me to create some different kind of enemies to make the game more interesting and challenging for the player. I already had the first basic enemy, that just flew down vertically, so I wanted the next enemy to shoot while they traveled down the screen.

In Game Maker I copied the ‘object’ of the first enemy, so all the basic code was still in place. Then I changed the sprite for this new enemy to this (sprite taken from Bogleech):

I also had to make a new sprite for the enemy’s ‘bullet’, which I got from a Game Maker resource folder. I set the speed that it would travel (when it was ‘fired’). Then in the object for the new enemy, I made a creation event, so that this enemy could shoot the new bullet I had just created. I also changed the amount of points the player was awarded for destroying this new enemy to 10, because it was slightly more challenging to destroy than the previous enemy.

Enemy number three was going to be even more challenging, as I wanted the bullets that they fired to follow the player. I created a new bullet for these enemies and set them to track the ‘object’ of the player sprite, Pink Hair Girl, so the ‘bullets’ followed wherever the player moved to. Then, like previously, I copied the enemy and gave this new one the new action so that when it shot the bullets would follow the player’s sprite. Because these enemies were harder again than the previous ones, I set it so that when the player destroyed one they were awarded 20 points.

Enemy number three (sprite also from Bogleech):

I wanted enemy number four to be different, and even harder to destroy than the enemies I had so far. So I made them appear from the same direction as the player was flying in (in essence, they appeared behind the player)  and gave them a fast travel speed so that it would be hard for the player to avoid and to destroy them. Because of this I gave them a score of 40 when the player successfully destroyed one.

Enemy four was the same sprite as enemy number one, which I recolored in Game Maker’s Sprite Editor:

Now that all the enemies were created I needed to make something that would control when they appeared in the game. For this I made an ‘object’, the object wouldn’t be visable in-game but would allow me to control and manipulate other ‘objects’ – the enemies. Basically this object created the enemies in-game and it ran on multiple ‘alarms’ to trigger the creation of different enemies. Rather than try to explain any more how that works, it would be easier to show you what it looks like in Game Maker:

Basically, the first alarm triggers the creation of the first enemies, and it also sets all the other alarms to start running. After a certain amount of alarm ‘ticks’ Alarm 2 goes off and begins the spawning of enemy number two. This process is similar for all the other enemies. Because the alarms are always ticking, the longer the player plays the game the more enemies are spawned, making the game get progressively harder over time (and thus the game has no definite end to it)

The timing for the enemies is as follows:

(Approx)

0:00 – 0:15 = Enemy number 1 only

0:16 – 0:32 = Starts to trigger enemy number 2 (Enemies number 1 and 2 on screen)

0:33 – 1:05=Starts to trigger enemy number 3 (Enemies number 1, 2 and 3 on screen)

1:06 – Starts to trigger enemy number 4 (Enemies number 1, 2, 3 and 4 on screen, all of the enemies)

Using these alarms, also made it easier for when I came to write the music for the game, so I can sync it up when the different enemies started to appear in-game.

With all these new enemies implemented into the game I tested it. It worked pretty well. It got progressively harder as time went on. At the moment there was no definite end to the game, it would only end when the player had lost all their lives. The main objective was to see how many points you could score before that happened.

Here’s a screen shot of how the game looks at this stage. With the the first enemy I made for the game, as well as two of the new enemies that I made:

Now that I was happy with the main portion of the game being made I created a Game Information page, which had the basic premise of the game, the controls and credits (which players can bring up by pressing F1). Which looks like this:

Now, the next task is to start making the music and SFX. I will also try and make some kind of menu or title screen, that will have it’s own music.

Advertisements

From → Uncategorized

Leave a Comment

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

%d bloggers like this: