My name is Alice Sullivan, I am a third year University student. I am currently studying Computer Games Arts at the University for the Creative Arts in Farnham. This blog will contain a variety of work I have been working on in the last three years as well as some recent work. Hope you like it :)
Showing posts with label Unity. Show all posts
Showing posts with label Unity. Show all posts
Sunday, 11 May 2014
Final Year Project - Contained
For my final year at University I have been working on a game with three other students. I am hoping to have some more screenshots of the code I have worked on for this project, as well as some videos showing the elements that I have scripted.
Sunday, 27 April 2014
Pressure Plate Puzzle
After yet another change to our game idea (after being merged with another group), we decided to scrap the other puzzle ideas and go for something which could be incorporated whilst navigating your way around a maze.
Once again I watched a tutorial on the website Digital-Tutors. The tutorial is titled "Creating an Action-Adventure Puzzle in Unity". I had worked my way through the 16 videos and completed each of the quizzes at the end of the videos (which are extremely useful). Within this tutorial there is a puzzle which the player has to complete; to complete the puzzle they have to walk over certain pressure plates, in a certain order for a door to open.
For our game the idea that we stuck with after being merged with a new group was much like our original idea. The player has to navigate a maze and avoid the aliens to be able to escape the farming facility. Whilst avoiding the aliens around the maze, I thought this puzzle would be perfect for the player to complete, as it would not detract from the original idea. By completing this puzzle, they would then be able to unlock the door and escape.
Once again I watched a tutorial on the website Digital-Tutors. The tutorial is titled "Creating an Action-Adventure Puzzle in Unity". I had worked my way through the 16 videos and completed each of the quizzes at the end of the videos (which are extremely useful). Within this tutorial there is a puzzle which the player has to complete; to complete the puzzle they have to walk over certain pressure plates, in a certain order for a door to open.
For our game the idea that we stuck with after being merged with a new group was much like our original idea. The player has to navigate a maze and avoid the aliens to be able to escape the farming facility. Whilst avoiding the aliens around the maze, I thought this puzzle would be perfect for the player to complete, as it would not detract from the original idea. By completing this puzzle, they would then be able to unlock the door and escape.
Below is the Pressure Plate Script.
Below is the Puzzle Logic Script
And finally, below is the Torch Script.
During this tutorial I encountered a few problems. One of my group members managed to help me fix one of the problems, where I had just mis-named something.
Friday, 25 April 2014
Moveable Cube
During this third year group project, because I have only just started to focus on the coding and unity side of things, I have been using the website Digital-Tutors to watch and complete some tutorials.
One week I worked through a series of tutorials on the website, which showed you how to code a cube to move in all directions as well as being able to jump in to the air, without flipping over.
In the screenshot above you can see that I had been saving each lessons scripts as well as saving important scenes so that I can refer back to them with ease at a later date.
Below is a screenshot of the code that I had been learning in the tutorials. This particular code has materialised over many lessons. Starting at Lesson 11 where I learnt how to code the basic movement of an object, to Lesson 15 where the cube in the scene can now move about in all directions and jump in to the air without rotating over.
I have found these tutorials to be extremely useful as they are broken down very nicely, which makes them very easy to follow along at a good pace. Furthermore after you have finished a particular lesson, you are then quizzed about a fact that was mentioned in the video.
Below are a series of screenshots of the codes that I had been working on from Lesson 11 to Lesson 14.
Here you can see how the code has progressed from a basic movement script, to a fully functional movement script with the jump element.
Rotating Pieces Puzzle
A puzzle idea that one of my group members came up with was the idea of having objects blocking the path of the player so that they cannot continue until they have been moved. The problem is however that these objects blocking the path rotate, so the player needs to rotate them until they are at the right angle so that they can the progress forward on to the next stage of the level.
The script written rotates the object, there is no animation on the object - which was an idea we had at the beginning.
In the screenshot above it shows the beginning scene.
When the player walks up to the object, all they have to do is click the left mouse button on the object and it rotates it to another position.
Each time the player clicks the object it will change its rotation, the player can do this until it is at the right angle for them to continue on through the level.
Above is another screenshot of another rotation.
Here is a screenshot of the object behind the original one rotating as well. This script can now be applied to any object that we would like to be rotated.
Below is a photo of the script that rotates the object.
Below is a script for when the puzzle is complete.
This particular puzzle I found quite challenging, and I did need help from one of my lecturers - however this helped me understand a lot more of what was happening within the code as he was able to explain it to me face to face.
Stair Puzzle
For one part of our game (when we decided to incorporate puzzle elements), the protagonist character would drop to the floor below once she passes over a certain point within the level, as the ground below her gives way.
Her only way to escape then from this room would be to build a set of stairs out of the objects around her (boxes, barrels and crates etc.) back up to where she came from so that she could continue on and make her escape.
Above is the basic layout of the blocks (these will be the boxes and barrels etc). They then fall to the floor, which will be shown in the photo below.
In the screenshot the boxes have fallen to the floor, so that the player can now go over to them and interact with them.
Above, the player is holding the block by clicking the left mouse button on the object, and holding it down to keep it in the air. The player can now move the block up and down as well as left and right and can move with the box when it is being held.
The player is then able to stack the blocks thus enabling them to form a set of stairs in any location they wish.
Above is a screenshot of a trigger area which will load the next level of the game. This was not necessarily going to be needed in our game, however I played around with it and as shown in the photo below it changes to a new level when they player walks in to the green box.
Below are some screenshots of the scripts. The first screenshot is of the Pick up and Drop script.
Below is a screenshot of the script that enables the level to change once the player has entered the green box.
I found this particular exercise quite challenging, yet it was really fun once everything started to come together and work in the way that I wanted it too.
Puzzle Level
Due to a change in my group circumstances early on in the year for my third year project, our game temporarily changed to include a puzzle level (basically a 'dream' world). The first two puzzles that we came up with for this level were to involve 'levers' to alter the world around her. By pressing the levers (shown in the screenshots as grey boxes) some items in the world will change to a position so that the player can advance further. For example one lever moves a box underneath a grate so that the player can used it as a 'stepping stone' to get to the other side.
This first photo above is just showing the layout that we created quickly. In the bottom right hand corner there is an additional room that had yet to be placed (this room was designed to be a 'downstairs' and the player would end up falling in there after completing the puzzles in the main level. The only way for them to get out of this downstairs room was to build a set of stairs up to the opening so that they could continue on.
This photo above is showing the 'stepping stone' block up in the air before the player has activated the 'lever' (trigger) to lower it down.
This photo shows when the lever has been activated; the box has moved to its correct position so that the player can now advance to the other side. The box has an animation moving it down.
Above is the beginning stage of the grate and box puzzle. The grate would be a safe place for the player to jump in to and progress to the next stage of the game. In this screenshot the grate is too high to jump in from the ground, so the box to the left is needed to be able to give that extra height to enable the player to jump in. Just like the previous puzzle, a lever is needed to be activated to move the box across.
The large grey box on the right hand side of the screenshot is the lever. This has been activated by the player, so now the box has moved under the grate so that the player is now ready to advance to the next section. Once again the box had an animation.
(Photos of the code to follow soon).
Pick up and Throw Code
For our protagonist character we thought that she would need to be able to pick up the orb and be able to throw it away from her if an alien came near her (our game is about Aliens farming humans on a global scale).
As I am the main coder for our group, I created a new Unity Project - (just in-case I ran in to major problems) I did not want to ruin the main file.
This second screenshot is the last part of the Pick up and throw script.
Now below is the screenshot of the Object properties script.
As I am the main coder for our group, I created a new Unity Project - (just in-case I ran in to major problems) I did not want to ruin the main file.
In the above screenshot, I have tried to give an overview of the basic scene that I have created.
Over on the right hand side you see the three scripts that I have used. The first one is the Object Properties script, which is in C#. This script is attached to the object that you want to pick up. For this script to work, the object needed a collider so that the character controller could be able to pick it up. It also needed a rigid body component added to it as well.
The next script is another C# script, called Pick up and Throw. This is attached to the character controller which enables it to be able to pick up the object when the player presses the 'f' key on the keyboard, as well as being able to throw the object when the player clicks the left mouse button.
The final script is Javascript (In my first year at University we were given brief tutorials on how Javascript works). This script is called Power Meter. This also goes on the character controller, and this controls the power in which the object is thrown by the character.
Here, below are the screenshots of the Pick up and Throw script, as well as the Object Properties script.
This first screenshot is part of the Pick up and Throw script.
Now below is the screenshot of the Object properties script.
Hopefully in the not too distant future I will have a video showing how these scripts work within the Unity scene.
Subscribe to:
Posts (Atom)