Thursday 10 December 2015

Assessment 2 : Creating a game.

Unit 72 .Unit 22:Computer Games Design
Start Date: 3/12/15
Deadline: 17/12/15
Assessor Name: Wayne Gallear


Shape Man

Overview

The aim of the game is to collect as many points as possible without getting destroyed by the other shapes. To destroy an enemy Shape Man must change in to the same shape as the current enemy, if the player is a square and touches a pentagon the player will lose a life.

The game is on a timer, every 15 seconds the enemies change into a random shape and Shape Man must become the same shape to survive.

After every round the enemies get faster and the game becomes more frantic and difficult.

Each point gives the player 10 points and each enemy kill gives 15 points.

How i made Shape Man 

Sprites

First of all i created all of the sprites, i used Game Makers sprite editor to create my sprites.

Here are my sprites:


This is the sprite editor i used



Each sprite is 32x32 pixels as it is a top down game and each shape has it's own animation, for example:



Objects

I created objects to make the sprites have certain behavior, i can do this by using Game Makers drag and drop code or i could use my own piece of code.

Wall

This is the drag and drop code. First the user must create an Event and then chooses and Action that is activated by the event, for example this is the code for my Wall.

When the player collides with the wall they they are caused to stop moving.


Player

This is my player movement system, i could have used the drag and drop system for movement but i would have been restricted to just moving up, down, left and right, where as with this simple code i can also move diagonally.



Shape Portals

Next i had to add a way for the player to change into other shapes, i added one of each shape sprites at different points around the room, these would be animated to show that the player can interact with them.

I used a drag and drop collision code for these objects and set the action as ''Change Sprite into *Shape*'' so if the player interacted with a circle, they'd turn into a circle.





Lives

I then uses a draw code to add a lives system. I added actions: ''Draw the lives as image'' and added co ordinates to place the Heart sprites and i used the ''Draw self'' action to complete this process.



The Kill Code

Lastly i created a collision with the Enemy, i then inputted a piece of code that a lot of people in the class had looked at and tried to fix, this was the Kill Code.

The Kill Code was meant to give the player the ability to kill other shapes as well as to die and respawn.

There were several problems with the code that i will list towards the end of this document.



Enemy 

The enemies used both drag and drop code as well as a written piece of code.
I had to create movement for the enemy's so i added ''Start moving in direction'' and set it to move left and right.

i had to then create a collision with the Wall that made the enemy turn back when it touched the wall.

I finally added a Draw event a inputted the Switch code. The Switch Code allows the enemy AI to change shape after the 15 second timer. 

The switch code looks like this:


Points

My points system is simple, i created the sprite for the Collectible and added a collision event with the character so the player can collect the Point, i then set the score to 10 and set ''Destroy Instance'' so when the player collided with the sprite it would vanish.


Controller

The controller is where my Globalvars are, these are commands that can be accessed by any object in the game, things such as the amount of lives, points, and general commands go. 

This is also where i created and placed my score counter.



Timer

The timer determines how long is left for the enemies to change to another shape, this is done using three small pieces of code, two parts of the timer and the design of the timer.




NOTE: Objects for: Lives, Controller and Timer do not require sprites as they are designed with code.

Rooms

The room is created with sprites that i created, i used the walls to create a maze type arena and dotted Points around as well as some enemies, also in each corner and in the middle is a Shape Portal where the player can go to morph into the same shape as the enemy.

At the top of my Room is my lives and in the middle is where my timer and controller are.




Bugs

While creating Shape Man i ran into several bugs some that i figured out and some that neither i or my peers couldn't figure out, i documented some of these.

Bug 1 - Lives

Bug Fix - Lives


Bug 2 - Deaths



My Full Play Through



My Friends Play Through


I asked him for his opinion on the game and he said this:

''It's quite intense as you have to dodge the enemies and collect the points, the game itself is not bad but the fact that the enemy change is random and can sometimes change to the shame shape is frustrating.''

''Also i noticed that when i tried to kill an enemy as the circle it killed me for good'' 

''6/10'' 

All in all i know that my game is extremely buggy but it was my first ever attempt at real coding so i'll gladly take 6/10.