Friday, 27 March 2015

Spring Project - Boss Code

The boss code was a rather hard endeavor in hindsight. There were many aspects needed to make it work correctly and to actually have a flow to it.

Codes Needed:

  • Health
  • State Control
  • Attack Control
  • Types of Attacks
The health code was just an adaptation of the players health script. Calling the boss mesh instead. This was the easiest part of the boss scripts and only required a few adjustments to make it work as planned.

Boss Health Script











The creation of a basic state machine for controlling the state the boss was to be in was also not too hard. I just created 3 parameters Idle, Attack and Die. The die one hasn't been used at the moment due to the boss death being called in the health script but the code has been left for future optimization. The use of a basic trigger function to check for player entry allows me to prevent the boss from attacking before the player reaches him.

Boss States Scripts












The attack control script takes the current health value from the boss health script and changes the routines it uses based on the different health thresholds the boss reaches. The script containing all the attack creations are referenced here. It also taps into to change the amount of attacks based on health as well.

Attack Scripts












The final sets of scripts are the different types of projectiles. These being the normal missles, homing missiles and mines. Each act differently.

Burst Fire











The burst fire  creates a certain amount of missiles then waits for a time and then repeats this act. The missiles created are rather simple. Traveling forwards and exploding after a lifetime and on collision with anything.

Homing Missiles











The homing missile is just an edited normal one with parts of the shark movement attached to it to make it follow the player and blow up after its lifetime runs out.

Mines











The mines scripts have two ways of exploding. On trigger and on collision. Trigger makes it flash red and then explode whilst collision makes it explode instantly.

Spring Project - Shark Codes

One of the major game play mechanics within our game is the patrolling sharks which stalk the open waters looking for prey.
There were many parts to be created for the shark assest and I was tasked with the coding part of it. The shark went through a lot of stages. The first was the development of a follow code to make the shark follow and then attack the player. I took a basic script made by James (a group member) and developed it further. I then made use of the new Unity UI and created a texturespawn script that would be called by the attack of the shark. This was done by just getting the script within the SharkMovement start function and then calling it on each attack.

SharkMovement(and attack) Code
SharkAttackTexture Code
However you might be wondering upon evaluating the first script about how this script is actually called. The answer to that is simply a statemachine that controls the mode the shark resides in. Its kept in a patrol script when the player is outside of its trigger range but upon trigger entry changes to the sharkmovement code.

Shark Controller

The patrol script took a lot of work to produce correctly. I had to learn about arrays and how to use them to create reference objects. By assigning 3 of these reference objects as waypoints and adding a box collider trigger to all 3 so they act as a checkpoint for the patrol script. Basically the waypoint count starts at 0 and each waypoint has a reference of either 0, 1, or 2. Upon reach the current transform position, checked by trigger entry, the waypoint reference is increased by one. When reaching the last waypoint, 2, the reference is reset back to 0 to continue the patrol loop.

Patrol Code
These sets of code were not too hard looking back. The only issue really was understanding how to use arrays correctly and once understood allowed waypoints to be created easily. Making the shark follow these waypoints was a bit annoying but upon adding ridigbodys and the like I realized my mistake. Essentially a trigger input needs a rigidbody.

Thursday, 26 March 2015

Autodesk Maya - Character Model Assignment

This main assessment task was the modelling of a cartoon-Esq character from a supplied model sheet. This task was interesting and a large challenge for me. Having a main focus on digital art and coding has left me with a lower skill level in regards to modelling than I am happy with. As such I tried to approach this assessment as a learning task to test my current skill level and improve upon it.
I started off with the feet and following the reference, of both the character and the low poly character model you can see to the side, I began creating the edge loops that I would take into forming the rest of the body. Starting from this area is a very interesting approach and allows you a step by step build up of the model. Initializing the model in sections and allowing a focus on topology for each section.


As I progress on the model I make sure to keep checking the smoothed version as a way to try catch any mistakes that might occur later on in the process of soothing the entire mesh. Creating the hips and pelvis was a hard task for me after I failed the first time and didn't loop the edges around correctly.




I was rather impressed with how my UV unwrapping turned out. It looks neat and every group came out distorted.
I did my textures using directx shaders which apparently cannot be rendered correctly so I have been unable to provide a rendered view. However I think it turned out okay considering my lack of modelling practice at the moment. I want to continue making characters and try and learn the creation of topology better, especially around the shoulders and face. 



Tuesday, 24 March 2015

Life Drawing

This term also saw the development of more life drawings skills. And I feel my figure drawings have become more anatomically correct and interesting to look at. With the inclusion of colour and contrasts. I have found the use of charcoal much more easier and have begun to enjoy the range of tones and marks that can be made with a single piece. Furthermore I have found myself using the skills developed from life drawing in the creation of pieces for the assignments which is a nice development.









Monday, 23 March 2015

Autodesk Maya - Texturing an Alley

We were given an ambient occluded model of an alleyway and our task was to texture it all using photo shopped textures onto the unwrapped UVs. This method of working was very interesting to learn and I found in an actual enjoyable way to texture a model. Since I use photoshop to a large extent using it was a good way of creating textures. The process was rather smooth with the only issue being when I didn't order the layers correctly. However I do not see this working particularly well for organic models as mudbox or zbrush may work better. Yet I shall not discount this straight away.

Adobe Photoshop - Anthropomorphic Design

Within this assignment we had to create a frog human hybrid which was an interesting task to approach since I have not really drawn animals before. I decided to do a couple of sketches before approaching the task itself. Once this was done I was able to pinpoint features which made a frog appear frog like. Areas such as the eye, feet and hands are primary frog points. My final image I was relatively happy with, as it only took me a day or so to complete from start to finish of course there are still many areas I feel could be developed further. However as a concept I think this may be okay for now.