Introduction
In this Task I have created a construct 2 platform game using my knowledge which I have gathered whilst doing previous tasks in my Unit 20 Assignment.
We decided to first work in a team to help build a 'base' game. Each person had their own individual role; I was the Leader and the graphic artist for some of the concepts in the game. We built the basic base game In the team although to make sure I met the criteria for this task I started working individually once the base game was completed.
Here is what the game was like before and after I added some features.
When the game begins it opens up the menu layer the user has to press any key to be sent to the first level. In the event sheet for level one and level 2 we added mechanics where if the player press’s the escape key it will they reset the level. In this level there were a few features like moving platforms and portals. To create the moving platform we added a sprite with the solid and sine behaviour. The sine behaviour is what makes the platform move, when the player is on collision with the moving platform the the sine will begin to move it.
For the portals we simply made a sprite with a circle. The circle is basically the door to the portal and when the player is on collision with the portal it sets the player into position off the next portal. When the player dies the level just simply restarts. Below you can see the event sheets for each individual level. As you can see the levels are quite basic and doesn't involve complicated events in order for the levels to work.
The player has a scroll to and Platform Behaviour. The scroll to behaviour makes the camera in the game follow the player around, so the main focus in the game is the player.
To make the enemy aim the bullet at the player I set the bullet's angle towards the players X and Y position. If the enemy or players bullet hits the player/enemy or is outside the games layout then the bullet will be destroyed to make sure there isn’t a load of bullets 'floating' around the screen which can cause lags and several issues.
Because I added enemies, bullets and functions which attack the player I had to create health for the player and the enemies. To create health for the player I decided to do a basic health bar. To create this me first created an instance variable for the player called 'Health' This instance variable was set at a number of 100 which means the player has 100 health. In the event sheet I made conditions so when the enemy shoots the player, the bullet will first destroy but also subtract 10 from the health instance variable. This means if the player was shot more than 10 times the instance variable will be on 0 and the player will have no health. When the player has no health I made events in the events sheet so the player will be destroyed when the player is equal to 0 health. I created a simple health bar to show the user what percentage their player’s health is on. I created this health bar by creating a simple sprite and adding 3 different animations.
In the Event sheet I added some mechanics so the bar fits the width of the players instance variable so if they player only has 80 health the health bar will be 80 in width size.
I didn’t make a health bar for the enemies because I only set their health at 50 and set it so when the player shoots the bullet at the enemy; the bullet will destroy and take 25 away from its health. This means that each enemy only takes two shots from the player to be defeated although I have added the enemies so they are in big groups which makes it harder for the player to kill them all.
For the second level I wanted it to be a little different. I added ghost as enemy's to help fit the Packman theme in the second level.
I did an event which basically tells construct if the player lands on the head then the enemy is destroyed but if the player hits the side of the enemy then the player is destroyed. This means the player cannot simply just walk into the enemy to kill it; they have to jump specifically on top of their heads.
The game previously before I edited it had no finishing, the player had to collect the objective and go back through the level but once the player did this there was no other objective or finishing. The player was just left on the level.
We decided to first work in a team to help build a 'base' game. Each person had their own individual role; I was the Leader and the graphic artist for some of the concepts in the game. We built the basic base game In the team although to make sure I met the criteria for this task I started working individually once the base game was completed.
Here is what the game was like before and after I added some features.
Platform Game - Team
The platform game which we created in a team has several layouts to create a platform game with two levels, a menu and finishing screen.When the game begins it opens up the menu layer the user has to press any key to be sent to the first level. In the event sheet for level one and level 2 we added mechanics where if the player press’s the escape key it will they reset the level. In this level there were a few features like moving platforms and portals. To create the moving platform we added a sprite with the solid and sine behaviour. The sine behaviour is what makes the platform move, when the player is on collision with the moving platform the the sine will begin to move it.
Video of the team platform game
Platform game- After I added additional features
In this selection I am going to be talking about all the extra mechanics and functions I have added to my 2D platform game. This selection is going to be more in depth and more detailed than when I was explaining the platform game in the team. The platform game before I edited it didn’t have many challenges and was a boring, basic game.
I Have Now updated the game and added enemies, audio, health bar, bullets and health power ups. There is some improvements the game still needs like a score bar but for this task it is not necessary to create a full, perfect platform game. The aim of this game was to show what I have learnt throughout the Unit 20 assignments. For instance In unit 20 we learnt information about arcade games which I have added to my platform game for example the look and control of the game is almost arcade like as well as adding arcade characters into my game.
First I edited the appearance of some of the characters in the game and created enemy art work for my enemy sprite's. I used Piskel to help create pixel artwork including pixel animations which I used for mostly the enemies. For example in the game when the player becomes visible to the space ship, the spaceships animation will start. I also changed the background of the platform game. Once I created the new characters using piskel, I opened the PNG up into construct when editing the sprite.
The platform behaviour allows the player to move and jump just like normal characters do in a platform game. The enemy's all have turret behaviour.
The turret behaviour allows the enemy to shoot at the player using a different sprite for the bullet. The Bullet uses a Bullet Behaviour where you can change the speed and acceleration of the bullet.
I also made sure the player or enemy cannot shoot pass the flooring, this means I made an event to tell construct to destroy the bullet if it touches any of the flooring sprites.
The enemy will shoot the player every 1.0 second until either the enemy or the player is defeated, the player only shoots when the user is tapping the space bar. As well as enemies I also added 'spikes' to add more difficulty within the game, these spikes automatically kill the player.
The animations was 'good', 'okay' and 'bad' the good animation was green, okay was yellow and bad was red. I then made sure the alignment was on 0 X on all animation so the health bar goes down from right to left. Once I created the sprite I went into its preference and made sure the width was set the same width as the health for instance the players health was 100 so the width of the bar will also be 100.
I then Set animations for when the player hits a certain amount of health it then plays a specific animation for instance if the health is 50 it plays the 'okay' animation which sets the health bar to yellow. I found this the easiest way to make a basic health bar for the player.
To make it a bit easier for the player I have added health picks up throughout the levels. I created the health pickups by creating a sprite and adding a simple event which basically is, when the player is on collision with the health, the health destroys and adds 10 to the health instant variable once added to the instance variable I set the health bar width again.
The ghosts are able to shoot and have the same mechanics than the enemy in level 1. Although In level 2 I made sure the player can not shoot the enemy. Instead I wanted the player to jump on the enemies head to destroy it- Like in Mario.
I also added collectables in level 2, apart from the health pick up I added an extra collection. This collection is these small yellow balls which flash, Pac man has to follow these collectables to make it to the objective. I think having a scoring system for these collectables will be an effective idea for in the future although now, these collectables does not have a specific benefit to the player.
To fix this I added an extra portal which appears once the objective has been collected. Once the player collects the sweets, the original portal destroys itself and then spawns the new portal where it used to be. The new portal takes the user to the ending of the game.
Once I double checked everything worked I added some audio which I previously created in previous tasks. This includes background audio, death sound effects, collectables sound effects, portal sound effect and a sound effect when the player lands on the moving sine in level 2.