Task 1 – Character Concept – #2 Ninja Dentist

Just noting down my ideas for a potential second character idea

Basic Character Sheet

  1. Name
  2. Role (Hero, Villain?)
  3. Age
  4. Height
  5. Weight
  6. Hair Colour
  7. Eye Colour
  8. Scars, handicaps (physical, mental, emotional)
  9. Sense of humour
  10. Basic nature
  11. What does the character want most (their goal(s))
  12. Philosophy of life
  13. Hobbies
  14. Kinds of music, art, reading preferred
  15. Favourite colours
  16. Educational Background
  17. Work experience/occupation
  18. Best friend
  19. Enemies and why
  20. Family background (economic, social, nationalility, religious)
  21. Description of home (physical, emotional atmosphere)
  22. Strengths
  23. Weaknesses
  24. Sees himself/herself as…
  25. Seen by others as…
  26. Most important thing about the character
  27. Reactions when happy/sad/angry
  1. Hero
  2. 27
  3. 6ft 1
  4. 76kg
  5. Brown
  6. Brown
  7. Mental scar – Lost his family due to endangering them because he was around the wrong people. Vowed not to practice ninjutsu after and decided to become a doctor to save people safely instead.
  8. To save people, since he couldn’t save his family
  9. Disection, stealth training, ninjitsu
  10. Doctor
  11. Fighting for others, he doesn’t give up unless he’s physically incapable.
  12. A hero with a debt to society.
  13. Just your average doctor, but a very dedicated one.
  14. Used to be a ninja but swore never to use his skills again

Type of game: Zombie/survival/fighting

Weapons:

-Dental floss tripwire

-Giant brush-katana type thing

-Syringe kunai

Moodboard:

ninjaaaa dentist moodboard

Key Item Pickup, Inventory and Door Open v2 scripts

We needed to sort out some kind of inventory system so that the player could find objects and pick up key items. I tried for a ling time to create my own script but after many failed attempts I was able to find an inventory system script on the unity asset store.

Inventory system

preeE

After doing some setting up I was able to treat this circle as a ‘key object’. When E is pressed the object is destroyed and a global Boolean variable is flipped which allows the player to open the main door.

inventory

You can also hold down the tab button to display the inventory, I created this key sprite so you can identify when you have the key or not.

The code is far too long for me to post here (you can download it + the assets pack here: http://www.mediafire.com/download/w9p98xrg2u9j5tt/InventoryScripts+Assets.zip) but after editing the code and applying it to my door script I was able to create this message that is displayed when you get close to the door without a key.

youneedakey

Door Open/Close Script + Animation

We needed doors that the player can open so that certain areas could be blocked at the start so I made a rectangle in maya and animated it opening.

door3door4

Then I imported the door into unity and set up two animation takes so that I had two different states for the door being closed and opening. Essentially one was a 1-frame animation and the other was a 28-frame animation.

doortakes

I did this so I had control over the two states and I could reference them when it came to coding.

door1

After setting all this up the next step was to get the door to open with coding:

//put this script on both door and door trigger
var DoorGameObject : Transform; // This is a reference to the door GameObject that has your animation
private var HasTriggerBeenUsed : boolean = false; // This is to make sure that the button is not repeatedly pressed.
private var doorOpen : boolean = false;
public var myFirstPersonPickUp : FirstPersonPickUp;
public var DoorTrigger : GameObject;
public var CanOpen : boolean = false;
function OnTriggerEnter(otherObj: Collider)
{
{
Debug.Log("Can Open With Key + E");
CanOpen = !CanOpen;
}
}
function OnTriggerExit (otherObj: Collider)
{
{
Debug.Log("Cannot Open");
CanOpen = false;
}
}
function Start ()
function Update () {
if (Input.GetKeyDown("e") && HasTriggerBeenUsed == false && CanOpen == true) {
DoorGameObject.animation.Play("Doormove");
HasTriggerBeenUsed = !HasTriggerBeenUsed;
Debug.Log("Door open");
}
else if (Input.GetKeyDown("e") && HasTriggerBeenUsed == true && CanOpen == true) {
Debug.Log("Can't open door.");
}
}

This code basically says, if the E button is pressed within the trigger area and it hasn’t been opened before, it will open and play the door movement animation.

door2

Task 1 – Character Concept – #1 Jet

  • Name: Jet
  • Alignment: Antihero
  • Age: 19
  • Height: 5ft 9
  • Weight: 69kg
  • Hair colour: Dyed Greyish white
  • Skin colour: Tanned
  • Eye colour: Blue
  • Scars (Mental): Mother died protecting him and his brother from the government trying to take them to use as slaves when the mother could not pay tax
  • Sense of humour: Slapstick
  • Nature: Hasty, Moody. Can come across as stoic at times.
  • Goals: To free everyone from the corrupt government in his world.
  • Philosophy of life: “Life is meant for exploration and adventure. How can we move forward while we stick to these forced robotic routines?”
  • Hobbies: Skating, Graffiti, Parkour
  • Favourite music genres: Drum & Bass, Hip Hop
  • Educational background: College dropout
  • Occupation: Freelance graffiti artist/anarchist
  • Best friend: A childhood friend called Bolt. Also does parkour and is a mechanic. He made Jet’s board.
  • Enemies: His government because of what happened to his mother. He sees anyone in a position of power as an enemy.
  • Family background: Quite poor, lived in a small house (until he became a freelance artist).
  • Description of home: Lives in the slums of a semi-futuristic suburban environment where there is a massive divide in living conditions based on social status.
  • Strengths: Strong-willed, tenacious. A master of speed and maneuverability especially while on his special skateboard but chilled out at the same time.
  • Weaknesses: Once he’s angry, there’s no stopping him. Very anti-social, won’t be seen dead without his headphones on.
  • Sees himself as: A freedom fighter trying to send a message and spark a movement.
  • Seen by others as: A moody rebel always in a rush.
  • Most important thing about Jet: He has mystical spray paint that can bring his creations to life literally

Weapons:

Jet Shoes – These boots have triggers on the inside that activate a powerful turbulent blast that can be used to propel him, allowing him to have stronger kicks and run faster and even up walls. They are made with a heat resistant material combined with metal for duration and power in combat.

Skateboard – Uses this casually to get around, when used in combination with the jet shoes it can be used to move as fast as 40mph because of the lack of friction, and the momentum can be used to ride up walls.

Spray Paint – This special spray paint can has the special ability to manifest Jet’s creations into reality, meaning he can paint anything he wants, but of course the bigger the object is the more space and time he will need to paint what he wants. Also he can run out of paint as expected.

Moodboard:

jet moodboard

Flashlight + Respawn Scripts

Since our game environment is set in a post apocalyptic environment, we figured a useful game mechanic to have to be a torch seeing as electricity and light would be quite scarce meaning there would be a lot of dark areas, which can be an interesting game mechanic depending on the genre of game. This is seen a lot in horror games.

(Screenshot from The Evil Within, 2004)

(Screenshot from The Evil Within, 2004)

I approached this by creating a spot light and attaching it to the first person controller at an angle, as shown above.

light5

Then I attached a flashlight script to the spot light.

light4

I wanted the script to work like this:

Get right click input > toggle spot light on/off

By using this script I was able to do this successfully:


var FlashLightOn : boolean = false;
function Update()
{ // Right click = toggle flashlight
if(Input.GetButtonUp("Fire2"))
{
if(FlashLightOn==true)
{
GameObject.Find("FlashlightLight").light.enabled=true;
FlashLightOn=false;
}
else
{
GameObject.Find("FlashlightLight").light.enabled=false;
FlashLightOn=true;
}
}
}

Final result:

output_RIp7MF

Since the game is set on the rooftop people are bound to fall off at some point if there aren’t any barriers like railing or fences set up to prevent this. This is why I made this simple respawn code.

public var deathHeight : float = -5;
public var lives : int = 3;

function spawn()
{
if(transform.position.y <= deathHeight);
	{
	transform.position = Vector3(4, 1, 0);//change in full game to new respawn point
	}
}

This code is attached to the player and states, ‘If the player’s Y-value (number determining vertical position) goes below a certain number, it will transport the player back to the original position at the Vector3 values.

I kept the lives variable in just in case we decide to add the concept of lives to our final rooftop scene.

Games Mechanic – Rooftop Project Brief + Introduction

Our brief is to create a rooftop scene in a 3D game environment that the player can interact with. There has to be cover and it has to look believable for a game.

We had to pick roles between us, I wanted to do animation since that’s the area i specialise in but if I was just doing that I wouldn’t be contributing to the group until the last few weeks which would have been counter-productive.

In the end I decided to do animating and scripting, because scripting is very time consuming I could use all of that free time productively while also improving my scripting skills. I also volunteered to help out with texturing since that would be a big part of the game, textures are everywhere you look. Also if it came to it I would also be happy to try modelling.

We wanted our rooftop to be have a post-apocalyptic setting, the concept is that an alien race has come to earth and destroyed our civilisation, leaving the planet with broken buildings and slightly overgrown nature. We are thinking of developing this idea further and we’ve even thought about aliens inhabiting the planet and trying to start some sort of empire.