Tuesday 4 November 2014

Space Rescue Game [554]

[Task]

I was given the task to create a game that either had a Steam Punk Rescue theme or a Space Rescue Theme. Limitations were set for this task that had to be followed while creating and designing the game, these include:


  • Steampunk Rescue Theme / Space Rescue Theme.
  • Multiple sounds within the game.
  • Must be a 3 dimensional game.
  • Atleast 2 GUI elements in the game.

Development Process

To begin with I explored the option of creating a Steampunk Rescue game what originally sprung to mind as inspiration was the Bioshock franchise particularly Bioshock Infinite where you rescue your daughter from yourself in a parallel universe. Complex I know........

Since I had played the game I had a good sense on what a steampunk game environment might involve, and what kind of setting and style it had.


After initially exploring the Steampunk rescue theme i decided against it because it would be too much of a hassle to create and texture an entire steampunk environment as i didn't understand it myself enough.

I decided to create a game following the Space rescue theme, which being a fan of Sci-fi related things I understood quite well what fit the theme. One game that I had heard about only because the movie won a few awards was the game Gravity which was created for the movie release. In Gravity you must rescue either another astronaut or some debris that has become detached after the satellite station was crashed into by an object.



After deciding on the theme for my game, I thought about what gameplay I wanted my game to have.  Originally I decided on creating a 3rd person spaceship shooter although it became too much work trying to fiddle with the controls and how the ship flew so i scrapped the idea. I moved on to trying to find something that fit the rescue theme which was difficult but in the end I decided on making my game a 3rd person shooter, I chose this because I knew how to create one and I could easily make the 3D models and everything else I required for the game.

The next key part was thinking about what I was going to rescue in my game. I came up with the idea that a ship crash lands on a planet and to escape the planet the player must retrieve a Ship Core which the hostile forces on the planet have taken, then continue to the escape shuttle with the core. This idea i kept and it served as the basic design for my game.

The game will include these mechanics:
  • Objectives (Defeat 40 enemies,  Find and obtain ship core)
  • Battery Life for the player (which will be a robot) (Battery life is the equivalent of health)
  • Collision detection between enemies and the player. (Use of OnTriggerStay so that while the enemy is colliding the battery life will lessen)
  • Shoot/Fire by left clicking with the mouse.
  • Enemy Health
  • Boost ability where the player can move faster by pressing shift (drains battery faster)
  • Battery Life drains over time.
  • Enemy AI pathing and moving towards the player.

Game Object Asset List
Low Priority
Medium Priority
High Priority
Scene Decorations
Ai Model
Player Model
Animations
Fonts
Level Terrain

GUI
Player Control Script (C#)

Audio 
Enemy AI Script (C#)


Textures


Ship Core Model


I started by creating a level design layout which consists of a bunch of colourful boxes, hopefully to your liking.

[Legend]

  • Purple - Enemy Spawn Positions.
  • Very Dark Grey - Level Obstacles & Scene Decorations.
  • Black - Level Bounds / Walls.
  • Grey - Alternate Texture for Path to End Goal.
  • Light grey - Level Area.
  • Green - Starting Point.
  • Red - End Point.
  • Blue - Objective to be completed.





I created a simple level layout because the game itself was like an arena where you had to fight off the enemy and rescue the core and get out of there by getting to the end objective.

Following the level layout design, I created this in unity as the game scene / arena.
At the start and finish points are the crashed ship and the escape ship. The red glowing blocks are scene decorations (intended to be corrupted cores / evil presence) and the Blue glowing block next to the centre is an objective (the power core for the ship).

I used 3 different textures to texture the terrain, each texture I downloaded from the Unity Asset Store. I used the mesh metal plate texture (texture 1) as the main floor texture. I used the grated metal texture (texture 2)  to identify which way to go to reach the goal and i used the metal plating texture for where the end goal was (texture 3).

Metal 1
Metal 2


Metal 3

For the player model I created a small little robot which I gave the name "554" no real reason behind it apart from the fact that the number could server as a designation to which model it is or maybe it's the 554th one of its kind, all just to add a little bit of story to the game.

 I created this model in 3Ds Max, it does not have any legs instead I gave the character thrusters and a jetpack. I was inspired by the character Rayman to have the limbs detached and floating like some magic link holds them together.

I was going to add a animation where the character raised his right arm everytime the player left clicked like it was getting ready to shoot, although instead I just raised the arm and left it raised permanently. The body, arms and head are all individual objects linked to one another. I created the eyes like they were goggles on his head which was inspired by a game called Stealth Bastard. The texture I used for the rest of his body was just a Bumped Specular shader that made him look silver in colour (to make it look like the character was made of metal and had a polished finish to it).


For the enemies I had a 3D model for them that I had created although I didn't get a chance to replace the place holders I had with them so they remained standard rectangles. I suppose in the end I could have used the player model but textured it differently and lowered the right arm.

I began working on the GUI elements for my game, I used a script to create all the GUI elements on screen in game. I used the font below because I liked its design and it fit the Sci-fi theme well.


Below is the GUI that appears in game. In the top right you can see what objectives the player has yet to complete, the top objective is triggered by interacting with the core, the second objective is triggered by defeating enough enemies. In the top left you can see your battery percentage left, battery slowly drains over time. Next to the battery life GUI element is the count for how many enemy Drones you have killed. Upon killing 40 of these enemy Drones the second objective on the right hand side GUI will become ticked to true.



These are the final mechanics of the game I created:
  • Objectives (Defeat 40 enemies,  Find and obtain ship core)
  • Battery Life for the player (which will be a robot) (Battery life is the equivalent of health)
  • Collision detection between enemies and the player. (Use of OnTriggerStay so that while the enemy is colliding the battery life will lessen)
  • Shoot/Fire by left clicking with the mouse.
  • Enemy Health
  • Boost ability where the player can move faster by pressing shift
  • Battery Life drains over time.
  • Enemy AI pathing and moving towards the player.
I managed to achieve my game mechanic goal although I was missing one where the player while holding shift had the battery drain faster. I was unable to implement that into the game due to bugs associated with the coding.


After finishing the core game that I set out to create I began work on the Menu, Credits, Help, Game Over and back story scenes. I also created a small cut scene at the end if the player completed the game successfully.

I created my menu very similar to my first game from semester 1. I thought that I could use the same sort of idea since the games were similar. The similarity is that the player model rotates on the right hand side on the Y Axis in a clockwise direction. The font stays consistent across the game. I decided to name the game the same name I had given to the character.


The story scene I created just to give a back story about what is going on in the game and to give the player an idea on what they need to do. I did add a "Skip Intro" button too for those who want to skip through. The original idea was that I would make the text scroll back into the distance like the star wars intro scenes although I decided to just make the text scroll upwards.



The help screen gives players a basic indication of how to play the game. There is consistent use of the font and textures.


The credits screen is simply there to give credit to the creator of the game and any other sources. There is consistent use of the font and textures.


This is the cut scene I mentioned earlier, in this scene the space ship takes off from its position in the arena, and then flies off into space. This scene is designed to trick your eyes into thinking that the ship is moving when in fact it is at a stand still shortly after it exits the arena. I did this by creating a particle system that acts as stars flying past, so the ship object is sitting still but the stars are moving past because of the particle effect. This cut scene is played as soon as the player enters the range within the escape ship and has completed both objectives.


The game over screen, this screen is shown when the player fails their mission (runs out of battery and dies). I used red text here because it looked like it had impact. There is consistent use of the font and textures.


I added audio to the game for every time the gun fires it makes this gun fire sound. I was going to add an ambient eerie sci-fi music track to the game although I was unable to find one that I thought suited. 

Prehistoric Game [Before The Dawn]

[Task]

The task given is to create a game that incorporates a prehistoric theme.
The task also set limitations that must be followed while creating and designing the game, these include:

  • A Prehistoric theme.
  • The camera must be fixed to a certain position and cannot rotate or move in any way.
  • A minimum of two (2) Genuine User Interface elements in game.
  • Multiple sounds within the game.
  • Must be 3 dimensional and not 2 dimensional.
A development build must be submitted in week 8 to show our progress on creating the game. The final game will be due in week 11.


Development Process

When given the task I began to look for inspiration on the type of gameplay that I wanted to create for the player. I looked at other games, mainly the ones developed for handheld devices. These included Temple Run, Subway Surfers, Candy Crush Saga, Jet Pack Joyride and Angry Birds. These games may not have followed the prehistoric theme my task involved but their gameplay and mechanics could be used with the prehistoric theme. For example similar to Angry Birds I could have the player launch dinosaur eggs towards dinosaurs. Or similar to Candy Crush I could have different coloured eggs you had to group together and clear to gain points. Or with Jet Pack Joyride I could create a side scrolling game where you had to dodge obstacles. Although most of the games I used for inspiration incorporate a 2 dimensional design, they could all be recreated in a 3 dimensional space.

I decided on creating a game that incorporated a similar gameplay mechanic to Temple Run. I decided that I would have a dinosaur chasing after the player (an ordinary human) and had to dodge the dinosaur every time it attacked. For this I knew I would require animations, collision detection, a terrain / environment and create a script that would allow me to move the player between 3 different lanes. This became the basis for my concept and what I would work to achieve by week 8.

Game Object Asset List
Low Priority
Medium Priority
High Priority
Scene Decoration
Audio
Player Model

Fonts
Terrain / Environment

GUI
Player Control Script (C#)

Textures
Animations (Player & Enemy)


Animation State Control Script


Dinosaur Model

I decided that first I would create my environment terrain where I would put the dinosaur chasing the human. I looked around on-line to gather ideas on what the environment should look like with textures and trees.





I created the terrain with many hills and mountains similar to the second image shown. In the middle of the terrain itself was a valley that stretched the length of the terrain, I created the valley for the purpose of placing the dinosaur and player in.

This is the end product of the terrain I created:
I used 3 different textures to texture the terrain, these textures were imported from the unity terrain asset package. Only two textures were used primarily (Grass and Stone) whereas the dirt texture I used with the opacity turned down so it wouldn't completely replace the grass texture but make patches where the grass was worn away.





After completing the terrain I began to focus on the actual mechanics and how my game would work. Taking the fixed camera into consideration I realised that the camera could not follow the player as he was being chased, which then also meant that the player would have to stay in one position while the terrain moved instead, this would give the effect that the player was moving. To make the terrain seem infinite and unending I created a copy of the terrain and place one after the other behind the camera. When the first terrain had reached a certain distance away from the camera it would then change change its position to back behind the camera and join the second terrain as they both continued moving into the distance.


Searching on-line I found exactly what I needed for the player and dinosaur models and animations. On the Unity Asset Store there was a pack that contained dinosaur models and animations for each. With this I began work on creating a C# script that would control when the dinosaur would play the attack animation and walk animation cycle.



I chose to use the Velociraptor dinosaur model from the dinosaur pack I downloaded because they are a smart and agile dinosaur.


From the unity assets I imported I added tree's to the terrain to add detail. I added them on the sides of the valley to hide the fact the hills looked like they had randomly appeared everywhere but the valley.


I began working on the GUI elements, for this I wanted to create a script that would count the metres the player had dodged / survived the dinosaurs attacks for. Instead of using the new GUI unity had to offer in its Beta 4.6 version I stuck with the older code created GUI because I knew how to work with it. The GUI font I found on-line. I used it because I felt that it worked with the prehistoric theme.

I positioned the GUI in the top left and changed the colour of it to orange to stand out from the scenery.


Here is a detailed list of how the final game mechanics worked in my game:
  • When the dinosaur attacks the player if it manages to catch him and bite him in the attack animation the game is over instantly.
  • The terrain moves away from the camera off into the distance at a constant speed then repositions itself behind the camera and continues this loop forever.
  • Every half a second the score goes up by (1) to simulate how many metres the player has moved.
  • The dinosaur attacks every few seconds.
  • There is a collider attached to the mouth of the dinosaur that detects the collision between the player and dinosaur.
  • The player can move between 3 different "lanes" (Left / Middle / Right) which are not visible. The player begins in the middle lane with the dinosaur behind.
  • If a player moves to a different lane the dinosaur will move to the same lane 1 second after the player has moved.
  • There is no way to win the game apart from gaining the highest score possible which would be the maximum value the variable could hold.


After finishing almost all of the game itself I began work on the Menu, Credits, Game Over, and Help screens.

I started creating the Main Menu first so that I could navigate to the other screens I would make. For the menu I created a new terrain which was a canyon that contained a volcano in the centre. I added the volcano because of the theory that the dinosaurs were either wiped out by a volcano eruption or a meteor that fell to Earth millions of years ago. I simulated a lava effect by creating a particle system that used the default particle although used a gradient for colouring each particle that was generated. I added a 2D orange circle sprite under the particle system because the particles generated were not enough to completely cover the top of the volcano.

From the dinosaur asset pack I downloaded I used the rest of the dinosaurs to add life to the menu scene. The same textures and tree's from the game scene were used in the menu scene.



I created the Help screen by taking a screenshot of the menu screen and putting the image as a texture on a Quad in unity. The GUI was created through a C# script using the same font from the game and menu. The help screen simply states how to play the game and how it works.


I created the Game Over screen from a image a found on the internet of a blood splatter. The text and button GUI are created by a C# script. I decided to use the blood splatter image because a Velociraptor (the dinosaur chasing the player) is a carnivorous dinosaur and there really isn't anything else that would have suited being eaten alive by a dinosaur for a game over screen.



The credits screen is very much like the help screen it uses a screenshot of the main menu terrain as the background and the GUI is created by code. The credits were created during week 8 and the reason they are like that is because they were just fillers until I changed it....... Which I didn't actually get around to in the end.


In week 8 I added audio to each scene, the main menu and game scene all used the same audio which I found on-line. The audio primarily used drums and flute, which I thought would suit the theme of prehistoric quite well. For the death screen I added a dinosaur roar as a little jump scare for players.