Saturday, 1 March 2014

Scripting

This week I have been focusing my attentions on some tutorials on the Digital-Tutors website. Throughout the week I have been working my way through 15 of the 18 tutorials/ videos on scripting in Unity, in addition to looking at the Stealth Project on the Unity website, to figure out how we will get our enemies to spot the player and chase after them.

Here is a screenshot of the scene that I have currently been working on, Lesson_15. So far I have coded the cube to move in all directions as well as being able to 'jump' in to the air, without flipping over.


As you can see I have 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 have 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 I am at now, where the cube in the scene can move about in all directions and jump in to the air without flipping/rotating over. 


I have found these tutorials extremely useful as they are broken down very nicely, which makes them very easy to follow along. Furthermore after you have finished a particular lesson, (each lesson is a video), you are then quizzed about a fact that was mentioned in the video. I have found this particularly good for me, as I find I learn better with quizzes and things like that in general, so I feel I have picked up more knowledge about what was mentioned in the video, than if I had gone straight on to the next video without the quizzes in-between. 

Over this weekend I am going to finish the next 3 videos that I have left to do on the Digital-Tutors website, then I shall continue on to the Enemy Sight script. However at this moment in time, I am finding it very difficult to transfer over what is being mentioned in the Stealth Project tutorials, over to the script that I currently have, which already has the enemies walking to specific waypoints. However if I get to a point where I cannot continue with it unless I have some help, I will focus my attentions on to the flickering light script (which needs to be tested) and the triggered events/ sounds scripts in the mean time, until I am able to get some help on how to implement the specific bits of code that are needed for the enemy to spot the player in our existing script. 

Here is a series of screen shots of the codes that I have been working on from Lesson_11 - Lesson_14.






Here you can see how they have progressed from a basic movement script, to a fully functional movement and jump script. 


1 comment:

  1. I really like this Alice, really cool to see the progression of the code, and I like how the posts are filled out and formative.

    ReplyDelete