Monday, 15 April 2013

15th April 2013 Meeting

JJ: Finish AI

Alice: Applying pickup scripts

Alistair: Terrain and lighting

Toop: Sort out existing models, make more plants

Cat: Not sure so have this picture? ^_^


Cathleen here, just adding from what I've heard the deadline for this project is may 9th? so I'm not sure how everyone feels about the things they are doing or when they can finish them but i know that we should be aiming to have this game pretty much working with at least two pickups and respawns two effects (with any luck or else one) and some gui text that pops up with you encounter something important. From what I see alice has the pickup code it just needs applied, I want to work on making an effect occur when you pickup the plant so alice i think i'll be adding to you code for that ?  and also have gui text pop up in different place like when you leave the pod an introduction, when you encounter a plant information, that kind of thing.

I want to apologise that I have been off longer as in not back in time for class, and for not posting thing ill aim to have all my stuff uploaded for thursday so you can see some of it may be a repeat of what alice has posted in fact i think alice your code is better but i'll post what i was working on.
P.S. love the picture very goofy :D

Thursday, 28 March 2013

Priorities

High
 
Health aspect of gameplay:
  • Script including gradual health decrease including sharp decrease/death on impact for water, Alistair's trees and falling off cliff and health restoration on consuming fruit
  • Something on screen to show the players health. GUI Text should be fine for now.
Basic level AI gameplay:
  • GUI Text brought up when character controller is within vicinity of AI model explaining to player which part to find next
 


Medium
 
To reach our target of 5 different hallucination giving plants:
  • Only two (could get away with just one) more fruit plants need to be modelled (though the more we have the better c:)



Low

Aesthetic:
  • AI rigged and animated (texturing and rigging done - needs refinement and to be animated)
  • House pod textures fixed (mostly done)
  • Lighting adjustments (half done?)
  • Additional models in environment (Grass, bushes, trees, wreckage etc)
  • Skybox lines fixed
  • Refinement of some models (e.g. less boxy mangrove tree with better texturing)
  • Splash particle effect for bottom of waterfall
  • Shadows of fish/monsters/things in water - Particle system
  • Bubbles in swamp water
  • Getting the water less reflective to make the water look more murky
  • Fruit model (maybe untextured if we texture it in Unity?)
  • Seal off area?
  • Textured circuit board model
  • More models of parts


Completed

Explorable working environment
Refinement of models needing refinement (lily pads & mangrove tree)
Fish particle system in water
Start screen
Getting basic working prototype completed(Working script allowing the player to get fruit and trigger a hallucination effect - Having problems changing this via camera effects, will try with lighting instead - Place holder fruit added to Unity (basic sphere)
Script for whether parts are visible and picking up parts
Sound - background and effects
Changed waterfall texture to falling water instead of splash image.
Made models: clock, glass cup, toilet roll, girder debris, crates




Thought this might be helpful? Feel free to leave a comment or edit this with anything I've missed out or you feel should be a higher/lower priority :)

Wednesday, 27 March 2013

Picking Up Stuff Script!

using UnityEngine;
using System.Collections;
public class PickupObject : MonoBehaviour
{

 public int distanceToTestFor = 10;
 private int foodLayerMask = 1 << 8;  // food layer is on 8, so create a bitmask
 private Vector3 OFF_SCREEN_POSITION = new Vector3(0, -100, 0 );

 // Use this for initialization
 void Start () {

 }

 // Update is called once per frame
 void Update ()
 {
  RaycastHit hit;

  if ( Input.GetMouseButtonDown( 0 ) )
  {
   // cast a ray from the current screen position into the game world
   // to test if it hits an object that we can pick up
 
   if ( Physics.Raycast(Camera.main.ScreenPointToRay( Input.mousePosition ),out hit, distanceToTestFor, foodLayerMask ))
   {
//    hit.transform.position = OFF_SCREEN_POSITION; - this is only needed if you want to respawn the food
//    hit.transform.gameObject.SendMessage("Respawn");
  
    Destroy( gameObject );
   }
 
  }

 }

}

This is the script to be able to actually click on the food (plants) and be able to pick them up. We could use the pool of objects manager script from our coding lessons to respawn the food, but with this code, we will only be able to have lots of food sources which will then be "destroyed" when clicked on.  

I have put up the excersise we did in the coding session today on Dropbox, called excersise10.2, hopefully you will be able to see what we did with all the codes and that.

Plant Animations Update

Found a good way to animate the plants in todays coding session. Instead of animating the fruit disappearing in Maya and then splitting the animation in Unity we can have the plants modeled without fruit then make a sphere/capsule/etc in Unity (for the time being) with a transparent diffuse material and in animations lower the alpha so that the fruit will fade out after being clicked on. Should be easy to incorporate into the code as well.

If we have time we could model textureless (but UV mapped) fruit which could then have a transparent diffuse texture made in unity and applied to it so it looks more intersting than just a simple shape :)

Updated the lily pads - removed the fruit in the centre and added more polys so they are more rounded and look less like dog beds

Also made a circuit board which could be used as one of the parts to be picked up. This probably won't be used however as it'll be easier to use transparent/difuse in Unity which will work with the hallucinations better and could be replaced by a planar map with alpha channel as this would use less polys

Friday, 22 March 2013

Terrain Picture

 
Here are some update pictures of what the tarrain looks like so far we have added the tree and other assates to the tarrain
 


 
Here is one of the planets the toop made which has been added to the tarrain.
 
 
This is a view from under water to show that the codeing that alice did makes a mist under a serten level.
 

 
above are the two panaramic views of the canyon.
 

Here is the pod in the new tarrain

 
A.I that JJ made in the tarrain textureing needs to be finished
 

 
Above are the two pictues of the inside of the pod to also show how the textures have filped onto the wronug parts of the pod maybe me combineing the pod in maya moved the uv textures i will have to find out whats wroung.
 
Problem:
 
  • Texturing of the pod
  • Lighting of the tarrain
  • Making the mist underwater thiker.
Things to Do:

  • Changing the mirror texture
 

Viney tree Unity Tree Maker

Used Unity's tree maker software to create a new tree for the game. This tree has vine like branches which hang down and will hopefully give a more swampy effect to the terrain.

Green Fog for Underwater Script

using UnityEngine;
using System.Collections;

public class Underwater : MonoBehaviour {

 //This script enables underwater effects. Attach to main camera.

    //Define variable
    public int underwaterLevel = 1064;

    //The scene's default fog settings
    private bool defaultFog = RenderSettings.fog;
    private Color defaultFogColor = RenderSettings.fogColor;
    private float defaultFogDensity = RenderSettings.fogDensity;
    private Material defaultSkybox = RenderSettings.skybox;
   

    void Start () {
     //Set the background color
     camera.backgroundColor = new Color(0.70f, 200, 0.15f, 70);
    }

    void Update () {
        if (transform.position.y < underwaterLevel)
        {
            RenderSettings.fog = true;
            RenderSettings.fogColor = new Color(0.70f, 200, 0.15f, 70);  < This is where we have changed the colour.

            RenderSettings.fogDensity = 0.2f;  < This is where we have changed the density
           
        }
        else
        {
            RenderSettings.fog = defaultFog;
            RenderSettings.fogColor = defaultFogColor;
            RenderSettings.fogDensity = defaultFogDensity;
          
        }
    }
}

Thursday, 21 March 2013

Underwater Script

using UnityEngine;
using System.Collections;

public class Underwater : MonoBehaviour {

//This script enables underwater effects.     //Define variable
    public int underwaterLevel = 1064;

    //The scene's default fog settings
    private bool defaultFog = RenderSettings.fog;
    private Color defaultFogColor = RenderSettings.fogColor;
    private float defaultFogDensity = RenderSettings.fogDensity;
    private Material defaultSkybox = RenderSettings.skybox;

    void Start () {
    //Set the background color
    camera.backgroundColor = new Color(0, 0.4f, 0.7f, 1);
    }

    void Update () {
        if (transform.position.y < underwaterLevel)
        {
            RenderSettings.fog = true;
            RenderSettings.fogColor = new Color(0, 0.4f, 0.7f, 0.6f);
            RenderSettings.fogDensity = 0.04f;
          
        }
        else
        {
            RenderSettings.fog = defaultFog;
            RenderSettings.fogColor = defaultFogColor;
            RenderSettings.fogDensity = defaultFogDensity;
          
        }
    }
}


This is the script we have used for the underwater effect. We have added it to the main camera.

Monday, 18 March 2013

18th March Discussion

Alice: Door animations with scripting have been completed.
To do: Health control script/death spot, underwater effects script.

Alistair: House pod completed (may need some tweaks) .
To do: Terrain needs a few more textures and lighting adjustments + plants.

Toop: Made a plant asset (scenery), mostly completed a tree asset and did textures.
To do: Make more assets, non-fruit plants + fruit plants.

JJ: Model of AI is complete, texturing is nearly completed.
To do: AI needs UV unwrapping and to be rigged.

Cat: Made plant asset (respawn point).
To do: Health control script/death spot.


Solar Panel Code

function Update () {
        transform.Rotate(0,2 *Time.deltaTime);
}

This is some code that Alistair found that we could use to rotate the solar panels to make it look like they're following the sun.