Shape man documentation
Basic premise of the game, the name of the game is shape man,
a different take on the pac-man game we all know and love. But in this game you
must transform into the same shape as the enemies to kill them, you can still
collect pellets which raises your score like killing the enemies does. This is
a never ending game which means you will never be able to physically complete
this game only obtain a high score and compete with people that way. To add
some challenge to the game the enemies move around completely random to the
player meaning they can move literally anywhere at any time. They also change
to different shapes randomly meaning 1 second they could be a square and two
seconds later they could be a circle in no time. The centre of the map
indicates what the next shape is going to be to make the game a little bit
fairer for the player but still has an element of challenge because the player
has no indication of how long the player will have before the enemies change
into that shape.
Day1: I first started off by making all the sprites for the
game, this included all the shapes the main character could turn into, the
enemies, the walls and finally the pellets the character could collect I then
added animation to most of these sprites to add another layer of depth to the
game, most of the characters only have simple animation like them flipping
around 360 degree’s.
I named all
the sprites either cha or enem. Cha standing for main character. These are the
sprites the main character can transform into and enem standing for enemy,
these are the sprites that the enemies can turn into.
After this I made all the sprites into solid object, and 1
object that was not solid or did not have any sprite connected to it, this
would be the controller for my game. This would hold the code for the basic
rules within the game itself for example lives and such, what happens when you
eat a pellet and so on.
I then moved on to creating the controls for the game like
movement etc…
This is the entire code for the controller, this is basically
the backbone of the game and without this nothing would work and most of them
are self explanatory but I will go through a few just to clarify.
Number and countdown act as the kind of FPS to the game as it
goes around every object in the game and this is counted as a kind of tick for
the game, this comes into play when deciding how long the next sprite will last
for and so on. Spriteto is what the sprite is right now and sprite next will be
the sprite it is going to turn into indicated at the centre of the room.
Next is the code for when the enemy touches you, basically
summed up this code show what
it needs to do when you collide with an enemy and its not the same shape as
you. Line 7 and 8 show this by saying that if the spriteto is the same as the
enemy’s then kill the enemy but if its not the same as the enemy then the
player dies
At the bottom of the code aswell lines 29 to 36 describe what
happens when you die. It will destroy the instance(the player) and display a
pop up message when the player runs out of lives saying that they have died.
This is what the room for my game looks like, very simplistic design, center piece for showing what the upcoming shape is going to be, the top square is to show you're score and hide the controller code object out of the playing field incase it glitches and interferes with the player.