Showing posts with label Cat Posts. Show all posts
Showing posts with label Cat Posts. Show all posts

Tuesday, 14 May 2013

End Game

Here I will be describing the problems we had with our final instalment of vertical slice of our game Dionysus below you can see the first person controller facing outside the house pod. The added in the fog to hide the rendering of the trees as you can see where crossovers are this position of one of the parts and as you can see it is not their. This will be shown once the plant in front has been eaten also below you can see in the bottom right-hand corner. There is the mini map that Alistair made, which shows the position of the controller with red arrow.



below is a closer up image of previous few above, and their health by the top left-hand corner has also got smaller as decreases over time due to your hunger.


one of our main problems was that when you first eat one of the plants. The mini map will disappear forever and will not return. We looked into this and could not find a solution, even though the mini map was successful and worked well due to perhaps encoding it just disappears.and also, as you can see from the plants being eaten apart are described earlier, has now appeared.


below is the pause menu that cat made using the coding as shown on the blog . Unfortunately, due to the lock of the mouse and not coding the buttons to do their own functions. It doesn't work that this show that we were on the verge of finishing it and we needed more time to code


below is a video showing the character, leaving the part eating the plant, seeing the object to pick up and picks it up. This is just shows the basics and the core mechanic of our game.


Problems:
  • Getting the code to work for the health and death zones around Alistairs trees
  • to get the mini map to stay on the screen after plants being eaten
  • getting the pause menu to work
  • having an end game screen or reverting back to menu
Overview:

looking at the vertical slice. We believe that the core mechanic has been shown due to hallucinations from eating the plant to finding a part to the fix your ship. This is the core mechanic of Dionysus . We believe, for the first vertical slice. We have made. This is a great combination of all our knowledge and special skills and a unique talents from Alistair JJ, who mainly focused on 3-D and Alice and Cat who focused on coding and Rebecca, focusing on 2-D. The team had its ups and downs, but overall the vertical slice has come out to be a solid game yet you do not have a death screen and an endgame, but as I said above, the core mechanic of the game has been shown using this knowledge that we have learnt the game that we will make in the third year will be greater than this vertical size due to the knowledge lessons we have learned and all help us a lot in the future

Thanks for your help. Tanguay, Steve and Robin


AI Information code pontentially working

using UnityEngine;
using System.Collections;
public class Information : MonoBehaviour {
 // Use this for initialization
 void Start () {

 }

 // Update is called once per frame
 void Update () {

 }


// This function checks if the player has entered a trigger
 void OnTriggerEnter(Collider other)
 {
  // The switch statement checks what tag the other gameobject is, and reacts accordingly.
  switch(other.gameObject.tag)
  {
   case "FlowerInfo":
   hitObj.gameObject.BroadcastMessage("This plant seems to have healing capabilities");
   break;
  
      case "LeavingDoor":
   hitObj.gameObject.BroadcastMessage("Hello Comrade, you are missing parts for your distress beacon, search the canyon for this parts");
            break;
  
      case "DeathSpot":
      hitObj.gameObject.BroadcastMessage("Comrade, this area appears to be very damaging towards your health");
   break;
  
  
       }
 }
}

Pause Menu code

using UnityEngine;

using System.Collections;

public class PauseMenu1 : MonoBehaviour

{

public GUISkin myskin;

private Rect windowRect;

private bool paused = false, waited = true;



private void Start ()

{

windowRect =
new Rect(Screen.width /2 -100, Screen.height /2 -100, 200, 200);

}





private void Waiting()

{

waited =
true;

}



private void Update()

{

if(Input.GetKey (KeyCode.Escape) || Input.GetKey (KeyCode.P))

{

if (paused)

paused=false;

else

paused =true;



waited =
false;



Invoke(
"Waiting", 0.3f);

}



if(paused)



Time.timeScale = 0;



else



Time.timeScale = 1;





}









private void OnGUI()

{

if(paused)

windowRect = GUI.Window(0, windowRect, windowFunct, "Pause Menu");

}



private void windowFunct(int id)

{

if(GUILayout.Button("Resume"))

{

paused =
false;

}



if(GUILayout.Button("Options"))

{



}



if(GUILayout.Button ("Quit Game"))

{



}

}

}

Health Damage and Health Bar Code


public class HealthBar : MonoBehaviour
{
 //  player's health and health bar
 public float curHP=100;
 public float maxHP=100;
 public float maxBAR=100;
 public float HealthBarLength;


 void OnGUI()
 {
  //  creates the health bar at the coordinates 10,10
  GUI.Box(new Rect(10,10,HealthBarLength,25), "");
  //  determines the length of the health bar
  HealthBarLength=curHP*maxBAR/maxHP;
 }

 void ChangeHP(float Change)
 {
  //  takes whatever value is passed to this function and add it to curHP.
  curHP+=Change;

  // This if statement ensures we don't go over the max health
  if(curHP>maxHP)
  {
   curHP=100;
  }

  // This if statement is to check if the player has died
  if(curHP<=0)
  {
   // Die
   Debug.Log("Player has died!");
  }
 }

 // This function checks if the player has entered a trigger
 void OnTriggerEnter(Collider other)
 {
  // The switch statement checks what tag the other gameobject is, and reacts accordingly.
  switch(other.gameObject.tag)
  {
  case "Heal":
   ChangeHP(5);
   break;
  case "Damage":
   ChangeHP(-25);
   break;
  }
  // Finally, this line destroys the gameObject the player collided with.
  Destroy(other.gameObject);
 }
}


Now we just need to add a timer which Alice is currently looking into :)

using UnityEngine;
using System.Collections;

public class HealthBar : MonoBehaviour
{
 //  player's health and health bar
 public float curHP=100;
 public float maxHP=100;
 public float maxBAR=100;
 public float HealthBarLength;
 private float updateDisplayTime = 0F;


 void Start()
 {
   updateDisplayTime = Time.time + 5F;
 }

 void Update()
 {

        if ( updateDisplayTime < Time.time )
     
   {
         curHP -= 3;
         updateDisplayTime = Time.time + 5F;
   }

    if ( curHP <= 0 )
      {
          this.enabled = false;
      }
 }
 void OnGUI()
 {
  //  creates the health bar at the coordinates 10,10
  GUI.Box(new Rect(10,10,HealthBarLength,25), "");
  //  determines the length of the health bar
  HealthBarLength=curHP*maxBAR/maxHP;
 }

 void ChangeHP(float Change)
 {
  //  takes whatever value is passed to this function and add it to curHP.
  curHP+=Change;

  // This if statement ensures we don't go over the max health
  if(curHP>maxHP)
  {
   curHP=100;
  }

  // This if statement is to check if the player has died
  if(curHP<=0)
  {
   // Die
   Debug.Log("Player has died!");
  }
 }

 // This function checks if the player has entered a trigger
 void OnTriggerEnter(Collider other)
 {
  // The switch statement checks what tag the other gameobject is, and reacts accordingly.
  switch(other.gameObject.tag)
  {

  case "Heal":
   ChangeHP(5);
   break;
  case "Damage":
   ChangeHP(-1);
   break;

   if ( updateDisplayTime < Time.time )
    
  {
        curHP -= 10;
        updateDisplayTime = Time.time + 5F;
  }

   if ( curHP <= 0 )
     {
         this.enabled = false;
     }

  }
  // Finally, this line destroys the gameObject the player collided with.
  Destroy(other.gameObject);
 }
}


The "private float updateDisplayTime = 0F;" we managed to find from one of Alisters lessons, so that there is a counter to how quickly the health decreases when you're near the trees.

Thursday, 2 May 2013

Following AI code update

Hope we have fixed the ai circling bug with this snippet of code.
if we change this part of the previous code

//move towards the player
myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;

to:


//move towards the player if not too close

if ( ( myTransform.position - target.position ).sqrMagnitude > 4F )
{

myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;

}
 
it should only move towards the player if the player is a certain distance away so it should in theory stop moving all together if it is so many units close to the player.

Wednesday, 1 May 2013

ColourFilterControl script


public var cameraNormal : GameObject;
public var cameraRed : GameObject;
public var cameraBlue : GameObject;
public var cameraOrange : GameObject;
public var SWITCH_TO_NORMAL_CAMERA_TIME : float = 10;
public class ColorFilterControl extends MonoBehaviour
{
 public static var Instance : ColorFilterControl = null;
 public function SwitchToRedCamera()
 {
  CancelInvoke("SwitchToNormalCamera");
 
  cameraNormal.SetActive(false);
  cameraRed.SetActive(true);
  cameraBlue.SetActive(false);
  cameraOrange.SetActive(false);
 
  Invoke("SwitchToNormalCamera", SWITCH_TO_NORMAL_CAMERA_TIME );
 }

 public function SwitchToBlueCamera()
 {
  CancelInvoke("SwitchToNormalCamera");
 
  cameraNormal.SetActive(false);
  cameraRed.SetActive(false);
  cameraBlue.SetActive(true);
  cameraOrange.SetActive(false);
 
  Invoke("SwitchToNormalCamera", SWITCH_TO_NORMAL_CAMERA_TIME );
 }

 public function SwitchToOrangeCamera()
 {
  CancelInvoke("SwitchToNormalCamera");
 
  cameraNormal.SetActive(false);
  cameraRed.SetActive(false);
  cameraBlue.SetActive(false);
  cameraOrange.SetActive(true);
 
  Invoke("SwitchToNormalCamera", SWITCH_TO_NORMAL_CAMERA_TIME );
 }

 public function SwitchToNormalCamera()
 {
  cameraNormal.SetActive(true);
  cameraRed.SetActive(false);
  cameraBlue.SetActive(false);
  cameraOrange.SetActive(false);
 }


 function Awake()
 {
  if ( Instance != null )
  {
   Destroy (this );
  }
  else
  {
   Instance = this;
  }

 }

 function Start ()
 {
  SwitchToNormalCamera();
 }

}

PickUp fruit - initiate effect code


#pragma strict
public enum ColorFilterType { normal, red, blue, orange };
public var colorSwitcher : ColorFilterType;
function OnTriggerEnter (other : Collider)
{
 renderer.enabled = false;

 switch ( colorSwitcher )
 {
  case ColorFilterType.normal:
 
   ColorFilterControl.Instance.SwitchToNormalCamera();
   break;
  
  case ColorFilterType.red:
 
   ColorFilterControl.Instance.SwitchToRedCamera();
   break;
  case ColorFilterType.blue:
 
   ColorFilterControl.Instance.SwitchToBlueCamera();
   break;
  
  case ColorFilterType.orange:
 
   ColorFilterControl.Instance.SwitchToOrangeCamera();
   break;  
 }
 
 yield WaitForSeconds (8);
 renderer.enabled = true;
}
/*function update();
{
 if (renderer.enabled = false)
*/

Monday, 29 April 2013

Beacon pickup / rotate code

using UnityEngine;
using System.Collections;
public class Pickup : MonoBehaviour {
 // Use this for initialization
 void Start () {

 }

 public float rotationSpeed = 100.0f;
 // Update is called once per frame
 void Update () {
 transform.Rotate(new Vector3 (0,rotationSpeed * Time.deltaTime, 0));
 }

 void OnTriggerEnter(Collider col){
 if(col.gameObject.tag == "Player"){
   col.gameObject.SendMessage("CellPickup");
   Destroy(gameObject);
  }
}
}

Monday, 22 April 2013

Possible sound code ?

Hey I know we haven't talked about this butu i thought a possible effect could be once you pick up a plant the beacon component will appear with an invisible collider and using this code:

function OnTriggerEnter(otherObj: Collider){
    if (otherObj.tag == "Player"){
        audio.Play();
    }
}

function OnTriggerExit(otherObj: Collider){
    if (otherObj.tag == "Player"){
        audio.Stop();
    }
}


we could have a sketchy noise pollution type track play whenever you enter the invisble collider I'm trying to work out if i can make it fade in and out kind of thing so i will update if i do. Found this whilst looking for effects stuff

Possible colour correction effect code?

using UnityEngine;
using System.Collections;

public class EffectsList : MonoBehaviour

{

public ColorCorrectionCurves[] arrayOfColorCorrectionCurves;




public GameObject mainCameraObject;




void Start()


{

arrayOfColorCorrectionCurves = mainCameraObject.GetComponentsInChildren<ColorCorrectionCurves>();



}

}


Monday 22nd April Discussion




In light of our problems with code to initiate hallucinations effects, it's been agreed that for now we should leave that to a if we can get it done in the end thing.
So instead want we have come up with is :-

Alice - if we can make it so :
-health = 100, and decreases automatically by 1 every second
- a deathspot were health additionally decreases by two every second

Jj -
Working on sound so just a list of sounds we would need (comment if any problems or such)

- door opening/closing
- wind (you could do your whistling effect :P) or a natural atmospheric type sound effect?
- an ambient type tune for background?

Toop-
working on with additional models
- wreckage to jump on kind of thing like to make the game more...dynamic? interesting :D

- atmospheric things bushes and such

Alistair:-
Texturing the A.i.
Modelling a cave to explore -

add like some pathways that go off so its not just a straight cave, something interesting to explore :DDD

Cathleen :-
Modelling Beacon Pick-up items
Adding the picking up code with GUI text to items.
Modelling some interactive natural features (like climbable rocks and possibly vague ruins?)

Tuesday, 16 April 2013

Possible Following A.I. code?

 I found this on UnityAnswers, its originally for an enemy to follow player but it doesn't have any triggers in it its simply the following aspect of the script. It's Java.

  1. var target : Transform; //the target
  2. var moveSpeed = 3;
  3. var rotationSpeed = 3; //speed of turning
  4.  
  5. var myTransform : Transform; //current transform data of A.I.
  6.  
  7. function Awake()
  8. {
  9. myTransform = transform;
  10. }
  11.  
  12. function Start()
  13. {
  14. target = GameObject.FindWithTag("Player").transform; //target the player
  15.  
  16. }
  17.  
  18. function Update () {
  19. //rotate to look at the player
  20. myTransform.rotation = Quaternion.Slerp(myTransform.rotation,
  21. Quaternion.LookRotation(target.position - myTransform.position), rotationSpeed*Time.deltaTime);
  22.  
  23. //move towards the player
  24. myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime;
  25.  
  26.  
  27. } from what I can gather so long as we have the firstperson camera tagged player (which i think it is) we attach this code to the A.I. and it should follow no matter how far away the player is. Also this was on UnifyCommunity wiki. .http://wiki.unity3d.com/index.php/Flocking

Monday, 11 March 2013

Monday 11th March Group Discussion

Okay here is the down-low

For the end of this week -

Alistair -
Finish off the texturing on the pod, and finish the terrain adding in the 3D assets that everyone else will have done, plants mainly. and using Toop's textures for the terrain.


Alice -
If you can work on getting the health control scriptand death spots working, we want deathspots preferably where ever the methane trees are so a small sphere radius?
Also for the health control we are thinking decrease health by one every 120 seconds I think its should work you just need to literally change the seconds in the script and the decrease health from i think it was 5? to 1 ? if theres any problems though I'll help out and brainstorm


Cat - I'm going to be using the unity book and hopefully ill get fixing the door animation and adding javascript code to it to make it open so its using a onMouseDown function also I will be adding the pick up code on to the plants using what we did last year with tanguy.

Jamie - Work on with the A.I.  as far as i know you just need to texture and rig it , comment to me are you going to use C.A.T?

Toop - from talking with alistair can you comment what textures if any that you need to get done ?
Grass textures amd rock textures ?


Also everyone please get your plants finish if not already and add concept images for them >.< pwease?

Monday, 4 March 2013

Monday 4th March Group Discussion

Okay Guys, I'm a bit worried I know I haven't been in a lot so you are probably confused as to what to have done or possibly when ?

So far what seems to be done and dusted is Alistair's Pod, the layout of the terrain and i think some plants have been modelled?

What needs to be done soon as in as soon as monday if at all possible is the A.I. the plants and the Texturing for the terrain so methan affected grounds and such.

I don't know if everyone has been having any problems with the tasks they're doing but if you do just say and we can all help each other out thats cool, you all know i had problems with the code, but after yesterdays class I actually have an idea of what to do now.

Alice your code has no errors but like one of my attempt at least on the unity scene i have from Dropbox it doesn't have errors but it doesn't seem to do the thing we want :S

So over the weekend please please please add the finishing touches to

Jamie - A.I. get it built and hopefully textured?
- Toop - Textures for the terrain , grass, rock, water? etc
-Plants - can everyone build their plants please and hopefully have them done for the week of the 11th?
- Alice and Cat - Code for door animation and also using what Alistair Lam taught us I think adding Death Spots so we have methane affected areas where you loose health is good.
Alistair - Can you texture the pod, add more marshy effects to the terrain e.g. pot holes? more water affected areas? and possible look into how to get the trees and plants to paint using unity?

If you have any problems like you don't think it'll be possible to have whatever done by Monday post a comment here, on facebook or text me so we can sort out something ASAP

We need these things done so we can move on to code for picking up plants and interactions with the A.I. and such so I'm sorry if I'm adding on to the pressure D:

COMMUNICATE ! xD otherwise no one knows what's up  and sorry if it seems I haven't been keeping an eye on the work >.<

Monday, 25 February 2013

Monday 25th Feb Group Discussion

Here are the basic tasks we're outlining to be done for Monday 4th March:


JJ: Carry on with the concept art for the terrain and A.I. and have this done for Monday the 4th March? and start working on your plant asset and hopefully have it finished for two weeks time?



Cat and Alice: Working on getting code together (with Alice) e.g. player movement, collider meshes, hopefully some door opening interactions? for Monday 4th March?



Toop: Can you work on moodboards for the textures for the terrain also maybe some concept images for alistairs pod on the inside?  making it look like living quarters? and can you work on your plant asset to have finished for two weeks time as well?


 Alistair: Can you work on getting the terrain set up so we can at least move around in it and add some basic code, add your pod asset and start adding the interior like in toops concept images??
maybe have this almost finished for the 4th of March? if possible?

Thursday, 21 February 2013

What gameplay we want ( Research )

Character movement is already builtin unity so we dont need to worry about,
if we are using c#
we need
collisions
item pick
hallucinations
giving item to a.i/distress signal
a.i. fixing itself
sound
guitext

we need to look at what puzzles we will have an how to implement them which alice will be doing ill also help out with that and think of stuff so if alice makes a post i will add to it or vice versa?
comment away - cat

A.I. concept images and moodboard images ( Research )




I'll put up some preliminary sketches of what the A.I. should look like combining some of the images from above, JJ just let me know if you think its too much or if you want just use the concepts as a general guideline but model what you can produce best and upload images of every step just for Tutors sake and stuff you know the drill. ^.^ - Cat

Monday, 18 February 2013

Monday 18th Feb Group Discussion

Cathleen Guiney
This is what we need to have done preferably soon (most of it is on it's way anyhow from what I've seen from Alistair and the blog)
-Cathleen Guiney: Alistair Gardiner I need the terrain make it small enough to explore but not too small that we can't do much with it,
also start creating the pod 3d asset making it look like the living quarters of the game?

 
-Cathleen Guiney: Jamie Jamieson I'm going to be finishing off my A.I. concepts but if you want to feel free to come up with some of your own otherwise what would be good is if you could start modelling it so we can add that and me or alice can add code to it. I already put up a blog post with moodboard images of ideas of what I wanted to add, but say if you want to do something less adventurous ?
 
-Jamie Jamieson: ill get photoshoping some of my own stuff and well compare it all.

-Cathleen Guiney: Alice Sullivan, Toop told me you were working on puzzles or thinking up puzzles thats great! make a blog post on whatever you find, if you find ones that require code say what kind the mechanics of them be very technical so we know how to go about them? if we need anymore 3D assets for some? talk away to me on facebook ill also message you my phone number if you dont have it
 
-Cathleen Guiney: Rebecca Toop Can you work away with what you were doing on the blog finding texture we can use for our murky swampy environment, it's great how you looks up water as well we need that !
 
-Cathleen Guiney: and everyone if your plants from steves assignment need some finishing off can we get that done, so we have some plants to work with
 
-Cathleen Guiney: I'm going to start looking up what code we need to get player movement happening and possibly collisions depending on how far i get, any i make through unity I will upload to drop box and i'll probably put any tutorials i find on the blog so when it comes to toop, alistair and jj adding their section of code you guys have somewhere to look

If anyone has any problems or anything just comment, text or facebook on the group blog, I think this is reasonable enough for now, but I can't sort any problems out unless you be direct with me so yeah, hope this is good. - cat


Tuesday, 12 February 2013

Storyboard and beginning scene image ( Research & Concept Art )

1: kids running (they are running towards the ship to board)
2: kids running up to adults and waitin in a mass group to board
3: so many years laters, the ship about to prepare to land
4: people aking up from cryo sleep
5: frantic running (well after effects type stuff) and fire outside the window
6: extreme angle of ship about to crash
7: people in thir spacesuits firey type light?
8: the fragment of the ship thats crashed
9: a hand emerging from rubble 
le fin
 
obviously the sounds we put to this will make everything come togethe i plan to have from 1 to 4 narrated with an advert style voice over, 'volunteer from around the world cant wait to board Midas (ships name________) for the opportunity of a lifetime to help discover the secrets of newly discovered planet __________ (i want to talk about the planet name tomorrow not about changing it but youll see what i mean when we discuss it?) and then it will start to fizzle nd crack and then there will be screaming and fire noises. i think this is better than trying to make a vector style advert (one because im no good with this ) and because i think dead spcae 3 had a great effect with its art style and that mixed with the contrasting sounds i think will explain our game? any comments would be a great help 


the art style im doing these guys on diffeent layers so i can animate it on after effects . 
 
Alistair: This video from Homeworld 2 shows I good crash of a ship at the start which I think we should use the same style as I think this was done in afteraffests with drawn images. The other video was done in the same why but I think these are good exarples of what we want to do.
 
 
 
Alistair: using the ideas above I made this clip of 30 seconds with the ship bracking up in the atmosphere of the planet it is basic but its the idea I had in my head.
 

Friday, 8 February 2013

Game Trailer/Intro? ( Research )




Inspiration from artist Erik Tran, who uses very retro designs for posters.

Below are three videos of the style we would like to use with the fallout 3 paying a place in a bunker advert and the deadspace 3 in after effects and metro last light with the video fadeing out and as the ship is crashing.

 
 
Alistair: This is a video i made in after effects with a space ship destroying the ISS and ibiza we would like to do somthing simuler to this for the ship crashing to the planet :D