As I am coming to the end of university I wanted to ensure that I always have an online blog continues even once I've finished and as this one was made on the college email address I wanted to ensure that I could still access my blog. So I decided to start fresh and make a new one completely. I felt that it should be a continuation of my last one so its essentially a Part 2, but I also wanted it to be apart of my portfolio as well, as I felt that it should continue on from this one and should demonstrate all my skills that I am going to be learning after I finish University rather than reflect my time here. The new blog can be found here and I would appreciate the same amount of support I have received on this one! Thank you!
http://environmentsbymegatron.blogspot.co.uk/
Dinosaurs vs Unicorns
Meg Sugden's DFGA Blog 2012-2015
Tuesday, 19 May 2015
Personal and Professional Practice 3: 'Engage' Studio Brief - End of Year Show/Games Republic Preperation
For our end of year show at university and also for Games Republic which me and Sophie are going to at the beginning of June. We really wanted to be prepared for both the events and decided one of the things that we really wanted, especially for Games Republic, was matching T-shirts. We really wanted these to look simple but still professional so we designed them with Keith's face on the back covering that and with the name of the game below it.
We then also wanted to have our names on the front so we used the logo that I created for Extended Practice and then put our names in the same font writing as the rest of our game. The front is slightly more boring but we wanted it to be simple and not stand out too much. I really like the final result of them and I'm really excited for when they arrive!I then moved onto looking at getting all of my turntables together and exported so that they can be used on iPads at Games Republic, as we had already got the characters prepare with idles, walk and talking animations we simple had to set up the tables to get them ready, something that didn't take very long. What we plan on having at both the events is two iPad's set up at either side of the main game, one with these turntables on and one with the trailer on so that when people are waiting to play the demo of the game, this keep people interested and keeps them wanting to find out more about the game.
We then wanted to have some design boards set up at the end of year show and Games Republic to show our workings throughout the project. We wanted to print them all out in A3 as we are still not sure how much space we have at the events and A3 is still big enough to see all of the workings out. We wanted there to be design boards for both of the environments and then all of the characters as well to show how they were designed from start to finish.
For the events we wanted to have a card board cut out of Keith as we wanted people to be able to take pictures with him and he is really appealing for children and this will get them looking at us more as we have something physical that they can touch and interact with, again while waiting to play the game itself. We knew that we wanted a life sized one as he only 85cm tall anyway and we went down to the print room to get it done so that it looked as professional as possible as it had to survive two car journeys and two separate events.
Lastly me and Sophie sat down and looked at how we could set up for the end of year show as we wanted to ensure that we planned out our space correctly. We wanted to have a desk with two computers on both with the demo of the game on so two people could play at the same time. Then we wanted two iPads set up next to that, one showing the trailer for the game and the second showing the character turnarounds. Then we want to have the 9 design boards above where the iPads are so people can get in close and look at them, then we lastly wanted to have the cut out of Keith next to the pc's at the other side to make the space more fill. We then found that we had quite a blank space so we wanted to get Keith the Koala printed there to tell people the name of the game.
Monday, 18 May 2015
Personal and Professional Practice 3: 'Research' Studio Brief - Project Morpheus
Recently I have started to see a lot more development into Project Morpheus which is PlayStation's answer to VR and also provides them with competition towards the Oculus Rift, from which until recently was a lone contender in the new generation of virtual reality gaming. Over the last few years the Oculus has continued to be in development and it has since seen a lot more games being produced but still hasn't actually launched completely as a piece of hard ware that can be bought for gaming with.
But the Morpheus is definitely a step towards this further and since it is Sony bringing it out they can start developing their own games for it, bringing them as a company ahead of others like Microsoft. Its an interesting idea and move for them as they haven't been big on VR before and the PlayStation Move never really took off as much as the Wii or the Kinect for Xbox did, but it could work out for them. The overall looks a lot more stylish than the Oculus and does look like it could be more comfy, but this could only be determined after trying them both. But the recent footage of the demo 'The Deep', shown below from YouTube, does look incredible in quality, although looks terrifying!
'Revealing this new prototype is an important step in our journey to release Project Morpheus, but there is more to come. We’ll share additional details at E3 and beyond. In particular, we’ll show more VR games at E3 and later events as we get closer to launch.
A new dimension of gaming is almost here, and PlayStation again is at the forefront with Project Morpheus.' (Source)
But the Morpheus is definitely a step towards this further and since it is Sony bringing it out they can start developing their own games for it, bringing them as a company ahead of others like Microsoft. Its an interesting idea and move for them as they haven't been big on VR before and the PlayStation Move never really took off as much as the Wii or the Kinect for Xbox did, but it could work out for them. The overall looks a lot more stylish than the Oculus and does look like it could be more comfy, but this could only be determined after trying them both. But the recent footage of the demo 'The Deep', shown below from YouTube, does look incredible in quality, although looks terrifying!
A new dimension of gaming is almost here, and PlayStation again is at the forefront with Project Morpheus.' (Source)
Personal and Professional Practice 3: 'Position' Studio Brief - Final Portfolio
For my final portfolio I wanted to show that I have an online presence at the same time so I decided to set up an online portfolio using blogger, this gives me an opportunity to show off the work that I have been doing as well as giving a bit of information into it as well as I have the use of blogger to be able write at the same time. Below are just some screenshots of what the blog looks like with all of the posts planned out to show the development over my three years at Uni.
I used a really nice template that I found online and started by adding in the basic bits to begin with, and added in my Twitter feed so that people can follow me on there and then I added my YouTube account to the top of the page so that people can subscribe to me on there as well. I think the overall look is really nice! I have then added in a navigation bar and added in the main projects that I have completed so that I can ensure that they are separate to the rest of my blog. Then they are already there and have information about my previous work on it, then I have the main home page which has the different posts that I will be doing over the next few months as an alternative way of blogging on my new account, creating a continuation from my previous work.
I used a really nice template that I found online and started by adding in the basic bits to begin with, and added in my Twitter feed so that people can follow me on there and then I added my YouTube account to the top of the page so that people can subscribe to me on there as well. I think the overall look is really nice! I have then added in a navigation bar and added in the main projects that I have completed so that I can ensure that they are separate to the rest of my blog. Then they are already there and have information about my previous work on it, then I have the main home page which has the different posts that I will be doing over the next few months as an alternative way of blogging on my new account, creating a continuation from my previous work.
Personal and Professional Practice 3: 'Position' Studio Brief - Showreel/Trailer
For our end of year show and Games Republic we have to have a really high quality show reel and it got me thinking about how I could do this for my work and most recent game. I wanted to ensure I had a really strong show reel showing off all my work that I am proud of over the past three years. I started by looking at these show reel tips to see what the best way to create a show reel is, it gave me some really helpful tips to how to keep the audience engaged with it and keep them wanting that little bit more. (Link)
I then wanted to have a look at what kind of reels other gamers are using to display there works and there aren't really that many exciting ones out there, especially on sites like YouTube. They tend to be rather boring walk through's of the environment and the others are like the one below. They are okay and show what needs to be shown like the difference of before and after textures are added and this could be done with lighting as well as a different state. But it can be a little bit boring and I wanted to produce something a little bit more exciting and different for mine, showing off everything that I can produce.
Here is mine below, I have tried to keep it short and too the point, it shows off the environments that I have created in the past till now and also the extra bits that I have designed over the years along with characters on turntables as well to get a good variety of things. I wanted this to be exciting and short and be really engaging for an audience to watch and I feel that I have done this with my show reel below.
For our game, that we are going to be taking to Games Republic and showing at the end of year show, I decided that a trailer would be more appropriate so I watched through old game trailers to get an idea about how it should play out to be able to get a good idea about how to do ours. In the example below it shows the original trailer for Crash Bandicoot: Warped. This is a really good example as it is very similar to others that came out around the same time and gives away a bit of the story at the same time as showing off some of the game play and that about it, but it works well and this is the approach that we're going to go for as well.
Below is then mine and Sophie's trailer for our game that we will be showing at Games Republic and the end of year show. The trailer is inspired from games in the 90s and their trailers and hopefully shows off the different levels that we created in the game as well as the characters.
I then wanted to have a look at what kind of reels other gamers are using to display there works and there aren't really that many exciting ones out there, especially on sites like YouTube. They tend to be rather boring walk through's of the environment and the others are like the one below. They are okay and show what needs to be shown like the difference of before and after textures are added and this could be done with lighting as well as a different state. But it can be a little bit boring and I wanted to produce something a little bit more exciting and different for mine, showing off everything that I can produce.
Here is mine below, I have tried to keep it short and too the point, it shows off the environments that I have created in the past till now and also the extra bits that I have designed over the years along with characters on turntables as well to get a good variety of things. I wanted this to be exciting and short and be really engaging for an audience to watch and I feel that I have done this with my show reel below.
For our game, that we are going to be taking to Games Republic and showing at the end of year show, I decided that a trailer would be more appropriate so I watched through old game trailers to get an idea about how it should play out to be able to get a good idea about how to do ours. In the example below it shows the original trailer for Crash Bandicoot: Warped. This is a really good example as it is very similar to others that came out around the same time and gives away a bit of the story at the same time as showing off some of the game play and that about it, but it works well and this is the approach that we're going to go for as well.
Below is then mine and Sophie's trailer for our game that we will be showing at Games Republic and the end of year show. The trailer is inspired from games in the 90s and their trailers and hopefully shows off the different levels that we created in the game as well as the characters.
Personal and Professional Practice 3: 'Position' Studio Brief - CV
For our project we had to have an up-to-date CV to be able to get in-touch with companies and be able to send them my portfolio. It has come in really handy recently as I have started to apply for a jobs that are of interest to me. My CV is a little bland at the moment, but at the moment I have been trying to contact companies to get any work experience or internships with them so that I can keep adding to my CV over the next few months.
99
Keble Park South, Bishopthorpe, York, YO23 2SU
07947 600 298
meg.sugden@hotmail.co.uk
07947 600 298
meg.sugden@hotmail.co.uk
Megan Sugden
Personal
Profile:
From
a very early age I have always been interested in video games and always
found a lot of time to indulge in this aspect of my life. Since moving into
University I have made my hobby into a job opportunity and currently enjoy
working on environments for video games. Learning this has given me so many
new skills that involve collaborating with others to get tasks done and
ensuring that work is done to a high standard and on time. I have a very
enthusiastic and positive attitude that allows me to get very involved in
many different projects that will help me gain further skills and knowledge
in my area of expertise.
|
Key Skills:
·
Maya
·
Photoshop digital painting
·
Unity
·
Skills in C# and JS for creating scripts for game
levels
·
Advanced skills in Microsoft Office
|
Experience:
I was the
Student Representative from 2012-2015 for my course and feel that it gave me
the necessary skills to get involved in any issues that people on my course
may have and bring it up with the tutors in order to resolve the problems.
Completed a
D&AD brief in 2013-14 for a module which involved me working as part of a
team in order to make a 2 minute short film that aimed to show the effects on
a person who was suffering from depression and was self harming. It was a
fantastic experience that really opened up the situations people are put in
when under the stress of depression and the film provoked some really
exciting responses.
|
Education:
Leeds College of Art 2012-2015
BA (Hons) Digital Film, Games and Animation Results Pending (June 2015)
Tadcaster Grammar School Sixth Form 2010-2012
Three A
Levels Graphics (B), ICT (B), Fine
Art (C)
Tadcaster Grammar School 2008-2010
Nine
GCSE's A-C grades (Art and
Graphics, A)
|
Hobbies and Interests:
At the moment
in my spare time I enjoy going to the cinema on a weekly basis to see the new
films that are out, and at home play a lot of video games, old and new, Indie
and AAA. I love going for long walks with the dogs as well and love learning
new software that will help me in my studies in addition to designing and
creating environments and assets for video games.
|
References:
Available on
request
|
Personal and Professional Practice 3: 'Engage' Studio Brief - Codecademy (Make a Website)
When it comes to making a website there can be a lot of confusing terminology that has to be used in order for everything to be in line or the actual writing to appear and we can use HTML code to be able write things onto a website.
We can use the 'h' element to create headings in the text and this is displayed like this:
<h>writing</h>
We can use the 'p' element to create paragraphs and this is used for large parts of writing, like this:
<p>writing</p>
We can also add in links by using the 'a' element. This needs a website url in order to work, like this:
<a href="web address">display writing</a>
We can add image with the 'img' tag, this can embed them into the webpage, like this:
<img src="webpage url>
We can add in a bullet pointed lists as well, this is described as a 'ul' element, and each item that is going to be added needs to be in a 'li' element, like this:
<ul>
<li>writing</li>
<li>writing</li>
</ul>
On a real web page all the information inside is stored in a 'body' element. This keeps everything neat and the Doc type at the start, tells the browser which version of the HTML element and ensures consistency through different internet browsers.
Task: Remaking the Airbnb Website
I started by adding in a navigation bar onto the top using the 'li' element so that they where separate lines of text. I added 5 in total and separated these into 2 sections using a 'div' element. The first one being the navigation bar that we call 'nav' and the second being a 'container' which wraps all the text together.
We then went about adding in a large header and subheader which we did with the 'p' element. We used the 'jumbotron' 'div' element so to ensure that the file new these where going to be large and again wrapped these in a 'container div'.
We then added a subheading using the 'h3' element, which creates semi large writing, and put a 'p' element description below it and a link with the 'a' element under that, before again, wrapping them together.
After this piece of what was going to be the supporting content for the website we added 2 more like this, using the same structure as before. This was then put into a 'container' and then another 'div' element which we called 'learn-more'.
CSS Code Basics
CSS is used to define the design and layout of the page, it's used to control the layout of the page and the appearance of the HTML element. We can use the elements 'h1', 'h3' and so on, names to be able to alter different aspects, like the colour for example.
h1 {
colour: yellow;
}
CSS uses rule to do this and style the HTML elements. It starts with a selector, which is your HTML element, for example 'h1', then inside the brackets you have the property that you are changing, which in this case is colour, and the value that you are changing it too, yellow. We can also use the 'div' headers to separate areas so that they can be styled differently .
We can use the RGB colour system to be able to alter colour and access many different ranges of colour instead. This would just be changed like this below:
.jumbotron h1 {
color: rgb(102,153,0);
}
We can use the hex numbers which also represent colour values:
.jumbotron h1 {
color: #9933cc;
}
We can also change the font at this time and there are many different font families that you can choose from and these are featured in the brackets along with colour for that section.
.jumbotron h1 {
color: red;
font-family: 'Open sans', sans serif;
}
We can also change the font size. Text size can be measures in pixels, ems or rems. This again fits into the brackets for the section.
.jumbotron h1 {
color: red;
font-family: 'Open sans', sans serif;
font-size: 60px
}
This is pretty much everything to change. We can also look at adding in more properties that also add to the page that go around the text.
We can edit the background colour for the whole thing or we can just edit the background colour of a certain section.
.jumbotron h1 {
background-color: #0099cc
}
We could alternatively add a background image to the whole thing or just the one section as well from the web.
.jumbotron h1 {
background-image: url('http://goo.gl/0Dpi3y');
}
We can also add in a border to again either the whole thing, one section or even just a small part of the header. By setting the border, we can change the width, style and colour.
.jumbotron h1 {
border: 3px solid #cc0000
}
We can also add padding to the border so that we can increase the space between the border and the text writing to increase readability. We can also just add padding onto the different sides of the box by using the property changes of padding-top or padding=bottom.
.jumbotron h1 {
padding: 23px
border: 3px solid #cc0000
}
.jumbotron h1 {
margin: 14px
border: 3px solid #cc0000
}
And again the top, bottom and sides can be controlled separately. we can either add a figure or we can auto align it so that it will give the text the maximum amount of space. This can be added on both sides to centre the text.
We then need to link the HTML file with the CSS one and it's style sheet. This is put into a 'head' element and uses a 'link' element to connect the two. The 'rel' file is the link to the CSS file and used to style the page and the 'href' attribute gives the link.
<head>
<link href="main.css" rel="style sheet"/>
</head>
Applying the CSS Styling to the Website
We then changed the text style in the main.css document. We started by changing all of the etxt style for the navigation section. We can put this into a group under the 'div' class '.nav a' in the style sheet as its under the div class navigation, 'nav', and the elements we are editing are under 'a'.
We then added a background image to the header section and made it a certain height. We then changed the header (h1), so that it was easier to see, by changing the size, weight and colour. We then changed the paragraph below in that section so that it too stood out. We then uploaded a new font into the HTML file so that we could use it in the style sheet and change the font. I changed the background colour in the 'learn-more' section. We then changed the headings in that section. We finished by changing the colour of the links in the final section.
Layout of the Page
CSS can also control the layout of the page. CSS treats HTML like boxes, they can be 'inline' or 'block'. Block elements display on a new line, inline elements display on the same line. We can also change the position of the HTML to move it to a certain position. This is changed by moving it all of changing the different sides. We can move the text and images to certain parts of the page by using the float element as well. This places things to either side or top or bottom.
Applying New Positional Qualities
We started by changing the position of the navigation bar so they are all in line. I then edited the .jumbotron section so that the whole container of writing was slightly further down on the page.
Using Bootstrap
Bootstrap is a program that can be used to create features on a website like tabs and buttons that can be clicked on. This can be used for the creation of the website that I am looking at creating. We can use it to do other things as well like pulling all the texts to either side of the page. I used this program to be able to add columns into the grid like system for this website. This ensures that everything was in line, and I also went about adding in a new section to test out that I could do the grid system.
Bootstrap is a program that can be used to create features on a website like tabs and buttons that can be clicked on. This can be used for the creation of the website that I am looking at creating. We can use it to do other things as well like pulling all the texts to either side of the page. I used this program to be able to add columns into the grid like system for this website. This ensures that everything was in line, and I also went about adding in a new section to test out that I could do the grid system.
Bootstrap can also be used to add thumbnail images onto the
website. I added in some more images on the different columns and the end
result is really nice and you can see the images on the columns and how well
they line up. I then did some editing in the style sheet to add some borders
and also to change the font size and background colour to finish off this
tutorial.
Altogether I feel that I have learned a great deal of
information from this in order to be able to create my own website using these
basic layouts and trying to look at how they can be adapted in order to be for
my own purpose, showing off different elements of the code in practice. It took
about 3 hours to do all of this, and it was definitely worth the time as I
learned some really nice tips that will help with other aspects of coding as
well.
Personal and Professional Practice 3: 'Engage' Studio Brief - Unity Scripting Tutorials
Recently I have become even more interested and involved with scripting, especially during Extended Practice as we scripted our whole game ourselves, and I took the lead with my level and the hub world and gave Sophie a few scripts in order to get everything done on time. Below are the notes that I took from watching about 5 of the tutorials on the Unity website. I now hope to continue working through them, but they really helped me understand the basics of scripting and I was able to then use these in my final project throughout uni.
Variable and Functions
What are variables and functions, and how do they store and process information for us?
int myInt = 5;
Conventions and Syntax
Learn about some basic conventions and syntax of writing code - dot operators, semi-colons, indentations and commenting.
C# vs Javascript Syntax
Some of the core difference between C# and Javascript syntax in Unity.
If Statements
How to use IF statements to set conditions in your code.
Scripts as
Behaviour Components
What are scripts in Unity? Learn about the behaviour component that is Unity script and how to create and attach them to objects.
What are scripts in Unity? Learn about the behaviour component that is Unity script and how to create and attach them to objects.
So today I really wanted to begin to look at how Unity
scripting really works. After the small tutorial taken by Steve a couple of
weeks ago I was really interested in how it can be used in Unity to alter the
game objects even more. Now that I am getting to that very late stage in my
project I really want to start thinking about how I can use it effectively in
my final piece and how I can also do some more tests with it to alter weather
in Unity.
Scripts can be applied to any object. they have an example cube
that can fall to the floor in their scene and this has a rigid body on it which
means that the physics on it make it fall as if gravity where affecting it. It
also has an example script on it which changes the colour of the cube, a part
of it being:
gameObject.renderer.material.color= Colour.red;
gameObject.renderer.material.color= Colour.red;
To begin with we have the game objects which is the object
in the scene that the script is attached to, this shows the script what it is
affecting. We then have the renderer which is the mesh on the object, in this
case it is a mesh renderer. We then have the material which is applied to the
mesh renderer, and the colour is the property that we are changing on the
material, in this case the colour of it. The ending is simply what we are
changing the colour too and in this case it is simply red, as this is a colour
it knows.
We can also add a whole script that allows us to change
aspects of the game. We can create scripts in Unity by right clicking in the
projects area selecting an already existing script or creating a new one. This
script can then be taken from the asset folder and added to the objects
directly by clicking and dragging. It can also be added in by opening a new
component. The last way they can be added is selecting the object and then
choose scripts under the components menu at the top of the screen.
The whole script is featured below and this is a very useful
one that can be used for changing the colour of the game object. With this
basis, you can start to see how the cube properties can be affected in Unity
and through more understanding I can begin to look at how other things can be
changed.
using UnityEngine;
using System.Collections;
using System.Collections;
public class ExampleBehaviourScript
: MonoBehaviour
{
void Update ()
{
if(Input.GetKeyDown(KeyCode.R))
{
gameObject.renderer.material.color = Color.red;
}
if(Input.GetKeyDown(KeyCode.G))
{
gameObject.renderer.material.color = Color.green;
}
if(Input.GetKeyDown(KeyCode.B))
{
gameObject.renderer.material.color = Color.blue;
}
}
}
{
void Update ()
{
if(Input.GetKeyDown(KeyCode.R))
{
gameObject.renderer.material.color = Color.red;
}
if(Input.GetKeyDown(KeyCode.G))
{
gameObject.renderer.material.color = Color.green;
}
if(Input.GetKeyDown(KeyCode.B))
{
gameObject.renderer.material.color = Color.blue;
}
}
}
Variable and Functions
What are variables and functions, and how do they store and process information for us?
I then moved onto the next tutorial on the Unity website. Variables
are boxes that contain information and you need a different one for each bit of
information. We can use an 'int' function which stands for an integer, a whole
number. We can put this into a piece of code, give it a name and then also make
it equal a value.
int myInt = 5;
We can use a debug to be able to see how Unity reads the
line of code, so when this, along with the start up script that is already in
C# when you open up MonoDevelop, the computer will be able to debug the code
and produce an answer. So if we add this to a game object and then run it, the
debug menu will read it and then present us with the value of 5, as this is
what we have told the integer to be. When we debug we can also use other sums
as well, like make the debug run that integer but then multiply the number by
2, and we will be presented with 10.
To do something more detailed with the code we need to add
in a function, or a method. A function will take our boxes and then give us
boxes back, and this is known as 'return'.
When we make a function that doesn't give anything back, the type is
'void'. If we want it to return something to us, we have to change the setup
slightly.
We will use curly brackets around the function so that it is
all stored together. What we can see in the script below is that we have
started with this statement that says the integer in here is called myInt and
it has a value of 5. We have then started the void function, by telling it to
start. We have then said that myInt is equal to the value of this function
MultiplyByTwo(myInt). The computer does not know what the value or equation of
MultiplyByTwo is, only that myInt has the value of 5, so below we have to tell
the computer.
You can then see that we have expanded and told the computer
what the function MultiplybyTwo means. We have created a new integer, and told
it that we are going to be using another number with it, which is the integer
in the brackets next to it. We have just called this number for now as we are
going to be feeding another number into it later on. We have then used curly
brackets to define that the value of MultiplyByTwo is. We have created this
next integer and called it ret, the shortened word for return to that we know
it's going to be returning information to us. We have then given 'ret' a value,
in this case multiply by two, and we have finished off with the return
function, so that the computer knows the values need to be returned.
We now have this whole function working, and above the
Debug.log we can see that we are taking myInt and making it equal to the
MultiplyByTwo function and using the myInt value again so that it has a figure
to base the equation off.
This was very confusing for me to get my head around, but
when expanding the function and code like this, it helped me to understand the
different stages to how it works and why we need the different parts of code in
order for the whole thing to work., and work successfully.
using UnityEngine;
using System.Collections;
using System.Collections;
public class VariablesAndFunctions : MonoBehaviour
{
int myInt = 5;
void Start ()
{
myInt = MultiplyByTwo(myInt);
Debug.Log (myInt);
}
int MultiplyByTwo (int number)
{
int ret;
ret = number * 2;
return ret;
}
}
{
int myInt = 5;
void Start ()
{
myInt = MultiplyByTwo(myInt);
Debug.Log (myInt);
}
int MultiplyByTwo (int number)
{
int ret;
ret = number * 2;
return ret;
}
}
Conventions and Syntax
Learn about some basic conventions and syntax of writing code - dot operators, semi-colons, indentations and commenting.
Syntax
simply means the structure of the language. The dot operator works like writing
the line of an address, each is on a different line, and it allows Unity to
break up the elements, for example we have below a piece of script which has a
Debug.Log function it, you can see that each part is separated by dot
operators. This is helping Unity to break it up further as there are different
elements to each one. Transform has the three different movements, position,
rotate and scale associated with it, so we need to state which one we are
doing, in this case moving the position. Then again, position has 3 different
possible axis that the object can move to, x, y and z, in this case we are
moving it in the x axis and we have chosen all this by using the dot operator.
The next
piece of syntax we have is the semi-colon. The semi-colon is used to terminate
statements, which is why they are at the end of a statement. They do not need
to be at the end of curly brackets or pieces of code that are an if statement
for example.
Indenting
is an important part of writing code that makes it both presentable and
legible. It really just helps to ensure that everything matches up well. We can
do this easily by holding shift and pressing tab, this will indent the lines
selected by 1 at a time, making it simple to read down the page, as seen below.
Finally
comments can be used in a very simple way that has many different functions.
They can be used simply to leave messages to other people in our code, like if
our working with other people, or you can leave whole message in their as well.
This is done by either using //, if you want to leave on line, or /* if you
want to write over many lines, but must finished with */ otherwise the comment
will go all over the code. But this can
be good if there is a part of the code that you want to disable to test certain
parts of the code to see if their working. MonoDevelop is very helpful as it
will also change the colour of the text to green so that you can easily see
where you have comments in the code.
using UnityEngine;
using System.Collections;
public class BasicSyntax : MonoBehaviour
{
void Start ()
{
Debug.Log(transform.position.x);
if(transform.position.y <= 5f)
{
Debug.Log ("I'm about to hit the ground!");
}
}
}
using System.Collections;
public class BasicSyntax : MonoBehaviour
{
void Start ()
{
Debug.Log(transform.position.x);
if(transform.position.y <= 5f)
{
Debug.Log ("I'm about to hit the ground!");
}
}
}
C# vs Javascript Syntax
Some of the core difference between C# and Javascript syntax in Unity.
First of
all both of these scripts work equally well in running Unity and it is very much up to you as to which one
you use. Below are some of the main differences in the two from the tutorial on
the Unity website.
C# scripts
have the class declaration scripts shown but in Javascript they are hidden and
you automatically write inside the class, in C# you just have to do everything
inside of the first brackets.
C# starts with you declaring the type of variable that you are
going to be using, e.g int, you then name it, e.g myInt, and then typically
giving it a value, e.g =5. In Javascript the variable starts with using the
keyword 'var', we then name the variable, then we have the option to name the
type of variable, e.g. int, and then we can give it a value, e.g =5.
A function declaration in C# starts with a start of variable
that will return from the function, or the word void if we're not returning. So
this starts with the variable, int, you name the function, and then you have the parameters that are
changed inside, like the second script that we worked on. In Javascript a
function declaration starts with the keyword 'function' , we then name the
function, and then you add in the
parameter list. Below is what they would look like in a script respectively.
C# = returnFunctionName(type
parameterName)
JS = function FunctionName(parameterName:type) :return
JS = function FunctionName(parameterName:type) :return
The last key difference is the default access, so this is who
can access the script, and this is important if more than one coder is working
on them at the same time. The default for C# is private, and the default for JS
is public.
If Statements
How to use IF statements to set conditions in your code.
Often in coding you will need your code make a decision based on
a condition. Think about having a cup of coffee, when it's first made the water
is too hot to drink but after letting it cool slightly, the coffee if just
right to drink, but leave it too long and the coffee is too cold. We can use
code to be able to explain how this could happen.
First of all we need to set the limits of the coffee
temperature, so that the computer know what temp it has to be at what periods
of time. We can do this with a float function so that when it reaches certain
temps it will perform the void functions below with an update. After setting
the parameters we can see that there is an IF statement, this first part simply
shows us that when we hit the space bar, we can see the temperature of the
coffee, which itself is a function. So the coffee temperature is delta time,
which is the time in seconds from the last frame, so this will use the current
frame rate of any computer instead of counting down actual seconds as some
computer can have frame rate issues. We can see that after this we are
multiplying the time rate by 5f which means that we are moving the frame rate
on per frame instead of per second, just to speed it up.
We can next see that we are doing a void function and calling it
TemperatureTest, this is then what is imputed into the update that tells us the
temperature once we push space, but again, this is just an empty function so we
need to define what is going to happen when space is pushed. We can provide the
computer with an IF statement that essentially says it the coffee's temperature
is greater than the hottest drinking temperature then print what is below.
We can then combat this with an else statement that will work
with the IF statement and say, well if it's not too hot then do this instead.
So we can then tell the computer to print coffee is too cold when the coffee
temperature is less than the coldest drinking temperature. Then, what we can
do, is add in a third option.
So as we have a higher than and a lower than option we need one
in between so that when none of the other options work as the coffee is the
right temperature we can add in the final else statement that simply reads just
print that the coffee is right. We do not need parameters for this functions
there is no figures it needs to be above or below it simply need to be any
other option other than too hot or cold.
This is a really nice way to visualise how IF statements work
and can be used, and simplifying them down to something that everyone can
relate to. It's a really nice way of looking at it and I will definitely be
trying to do this myself now that it's understandable.
using UnityEngine;
using System.Collections;
public class IfStatements : MonoBehaviour
{
float coffeeTemperature = 85.0f;
float hotLimitTemperature = 70.0f;
float coldLimitTemperature = 40.0f;
void Update ()
{
if(Input.GetKeyDown(KeyCode.Space))
TemperatureTest();
coffeeTemperature -= Time.deltaTime * 5f;
}
void TemperatureTest ()
{
if(coffeeTemperature > hotLimitTemperature)
{
print("Coffee is too hot.");
}
else if(coffeeTemperature < coldLimitTemperature)
{
print("Coffee is too cold.");
}
else
{
print("Coffee is just right.");
}
}
}
using System.Collections;
public class IfStatements : MonoBehaviour
{
float coffeeTemperature = 85.0f;
float hotLimitTemperature = 70.0f;
float coldLimitTemperature = 40.0f;
void Update ()
{
if(Input.GetKeyDown(KeyCode.Space))
TemperatureTest();
coffeeTemperature -= Time.deltaTime * 5f;
}
void TemperatureTest ()
{
if(coffeeTemperature > hotLimitTemperature)
{
print("Coffee is too hot.");
}
else if(coffeeTemperature < coldLimitTemperature)
{
print("Coffee is too cold.");
}
else
{
print("Coffee is just right.");
}
}
}
Personal and Professional Practice 3: 'Position' Studio Brief - Business Cards
Again, as Uni is nearly over I really wanted to ensure that I had some really good business cards that I could take to events and carry with me so that I can give out my details so that people can begin to contact me more. I used two different designs for the back, both from this year. One demonstrating that I can produce a more realistic environment, the other a more stylised hand painted one.
I then added my basic details onto the other side, using my name, job title and some contact details so that people could contact me and check out my online space as well. I used the website Moo as it has some really high quality business cards and they have the ability to print on both sides and also have multiple designs on the back as well.
I actually went back and changed my details slightly before ordering them as I realised that my online space was going to change once I left Uni, as I wouldn't have access to my college email. I used the gmail address that I had already set up and created a new blog on their were I would begin to start posting stuff on a regular basis once Uni is over.
Personal and Professional Practice 3: 'Engage' Studio Brief - Job Hunting
As its nearing the end of Uni, job hunting has been even more important now as I would love to able to go straight into a job as soon as I finish. I have been looking on different job hunting websites for games and it has been difficult to find anything that suits me personally. At the moment I am not just looking directly for an environmental artist job, as there are only a few every now and again, but looking for anything that I think I can get stuck into but it also in the games industry so that I can move into the industry easier.
The first website that I have been using to look for general jobs is this one (Job Site 1) and then secondly this one (Job Site 2). This way isn't very efficient but there are some jobs on there that I can take interest in and get in contact with the companies, but I find that contacting certain companies can be a little easier sometimes.
I go through local and national companies on a weekly basis to see if I can find any jobs in certain companies that are interesting to me. This is a nice way of looking for jobs but it takes a lot longer to find something of interest. Recently I have found three jobs that interest me in the last week and I am hoping to hear something back from them soon.
Team 17 - Social Media Manager
TT Games - Environment Artist
TT Fusion - QA Tester
The first website that I have been using to look for general jobs is this one (Job Site 1) and then secondly this one (Job Site 2). This way isn't very efficient but there are some jobs on there that I can take interest in and get in contact with the companies, but I find that contacting certain companies can be a little easier sometimes.
I go through local and national companies on a weekly basis to see if I can find any jobs in certain companies that are interesting to me. This is a nice way of looking for jobs but it takes a lot longer to find something of interest. Recently I have found three jobs that interest me in the last week and I am hoping to hear something back from them soon.
Team 17 - Social Media Manager
TT Games - Environment Artist
TT Fusion - QA Tester
Subscribe to:
Posts (Atom)