Showing posts with label Unity. Show all posts
Showing posts with label Unity. Show all posts

Tuesday, 6 May 2014

Steampunk: Building The Game

I have made the build for the final game which will be on the hand-in CD this file contains three scenes 0 is the main menu 1 one is the steam punk world with the normal character controller unit and number 2 is the same environment but with an oculus rift character controller both of fees scenes are accessible through the main menu screen which has been updated below and now contains code that allows the player to choose each environment and when in the environment have no mouse visible onscreen and be able to exit the game by simply pressing escape.


i have also made a icon file for the game which you can see below this is an icon file and can be added as shown below.









this was not a need asset in the final game I just thought it would be a nice touch to the game folder by having this icon over it instead of the normal default file picture as you can see below this is implemented on the actual physical steam game folder with the EXE and the data file inside of it.








Below are the three code scripts that allow what I discussed above to function in the game

// This simple script below centres the mouse cursor and also makes it invisible in the game build which helps immerse the player instead of having a mouse pointer hovering in the centre of the screen

#pragma strict

function Start () {
Screen.lockCursor = true;
}

function Update()
{

}

also when the mouse is invisible which this code above has inflicted on the game it is now impossible to escape again without doing control alt delete sub by adding this simple code below where you press escape it the game will exit

using UnityEngine;
using System.Collections;

public class Escape : MonoBehaviour {




// Use this for initialization
void Start () {

}

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

if(Input.GetKeyDown (KeyCode.Escape))
  {
Application.Quit ();
}
}


}

below is the main manu script that allows the play the normal game the play the oculus and exit the game using this code below

var isQuit=false;

function OnMouseEnter(){
//change text color
renderer.material.color=Color.red;
}

function OnMouseExit(){
//change text color
renderer.material.color=Color.white;
}

function OnMouseUp(){

if(this.gameObject.name=="GUIPlay")
{
Application.LoadLevel(1);
}

if(this.gameObject.name=="GUIPlayOcc")
{
Application.LoadLevel(2);
}

if(this.gameObject.name=="GUIExit")
{
Application.Quit();
}
}

Steampuck: Frame Rate (update)

i have managed to fix the frame rate by adding a fog and changing the render distance to just beyond the fog so the player can not see as far as i would like but this makes the game playable



 its now running at a steady 30 frames a second which is what i was aiming for.

Monday, 5 May 2014

Steampunk: fly through

I've decided to drop this as an idea as the kiss risk will take up the other button  on the main menu screen and save time I do not want to invest myself into making this fly through and then it not working I would rather spend my time concentrating on refining the environment than sorting out mainly the frame rate that has deteriorated  so for some reason.

Steampuck: frame rate

for some unknown reason the games frame rate has decreased to almost 4 frames a second the game had usually been running at about 12 frames a second this was still bad but I was gradually increasing it to on average of 30 frames a second but for some reason as I just said  it is now down to around four frames a second I have run occlusion culling and added a fog and will now attempt to decrease the render distance in order to hopefully save more memory at the moment the game is running with a ridiculous amount draw calls I may need to do some serious editing  in order to get the frame rate to a reasonable level in order for the environment to be playable as running at four frames a second is so glitchy it makes the game almost unplayable this will have to be my main focus of the last couple of days on the other hand sealing off of the environment and re-texturing is pretty much done anything now that is on my mind is setting up the oculus rift side of the game and getting the frame rate sorted.

Steampunk: Game Menu (Update)

Here i have been flowing atutorial on how to make a game menu following this step-by-step videoand using the code provided below I use this and implemented it in my main menu for the game environment in his he only has two start and except but from my ninth hoping to add a fly through option which will allow the player to be on a fixed path and see parts of the environment he would not probably find  by themselves.


and also using the code below in the game menu

var isQuit=false;

function OnMouseEnter(){
//change text color
renderer.material.color=Color.red;
}

function OnMouseExit(){
//change text color
renderer.material.color=Color.white;
}

function OnMouseUp(){
//is this quit
if (isQuit==true) {
//quit the game
Application.Quit();
}
else {
//load level
Application.LoadLevel(1);
}
}

function Update(){
//quit game if escape key is pressed
if (Input.GetKey(KeyCode.Escape)) { Application.Quit();
}
}

with this code the text colour will change as the mouse hangs over it as u can see in the pictures below.


Sunday, 4 May 2014

Steampunk: Main Menu

for my game environment even though it isn't a proper game I thought it best have its own in the main menu or title screen, this will also help when it is on show at the exhibition by having a nice interesting main menu instead of just being the player camera has been left by the previous person facing up or down or something inconspicuous to whether players finished they would ex-it and return to the main menu which will help drawing in visitors to the computer below are some screenshots of my final main menu that I designed.


here is below the view of the scene in unity using an orthographic camera I added in the roughly written word play to show where I will have GUI text for the play button as I've not added this into the scene yet what I intend to do when I've finished with the layout of the scene is to bake it so that the title screen looks as real as the environment itself.




Friday, 2 May 2014

Steampunk: Skills

as I've talked in my previous posts about how I feel I am not truly showing my skill so I decided to use what I've learnt over the past year to accumulate this knowledge to show my true potential of modelling. below is a modular did warehouse that I've constructed  using a few modular parts combining them in order to make a large structure that is only using instances to save memory and also using my new and improved texturing skills and also using Ndo and Ddo to its full potential as I have not added  much detail in my buildings in my steam punk environment I'm hoping showing my skill I have now this is what I could have done to the entire environments if I knew what I know now at the beginning of the year.


above and below are the modular parts of the building I was talking about  at the top of the post here are some of the modules constructed in maya below are some of these modules gradually being textured.


below is the full range apart from one or two that I've not constructed yet that will make up this new warehouse my inspiration for this building came mainly from the Victorian inspired architecture of big public buildings hotels and stations by using these modular sections I will be able to build a detailed building but only using a few hundred policies as these modular sections will be instanced saving huge amounts of memory this is one of the other things I have learnt this year is the best thing to do to give great detail to the environment but also save memory so that the frame rate runs above 30 frames a second.


below are two images of the finished product of fees modular departs from the picture above combined to make a new building on what I'm very proud of this building is each module is interchangeable meaning I can add more corner turrets to the side of the building if I so wished or increase the width of the building on the right-hand side or adding more vertical pillars that is a separate object in order to add more detail.


Below is a close-up of the modular sections of the building as you can see I have used softon edge tool and Beverley in order to give the building in real organic flow of light around the edges and this time really looking into the normal map and spectator map to really give the detailed building deserves the normal maps on the building are a bit over exaggerated as Maya tends to do this.


Criticism: the problems so far with this model is that it is to clean in order to sort this out I am going to start using some of the textures in Ddo by using its tools I will make the marble look more like marble and the brick  more like brick as these tools can really bring out detail and make the text extremely real are using this software I believe this model will be one of the best  buildings I've constructed for my steam punk environment.


Wednesday, 30 April 2014

Steampunk: Pub (Update)

Here I have changed the textures of the pub and added in a new roof this I did because i felt that the image most people have of a pub it will have a roof on it.


as you can see from the picture above added the roof this has given the pub more style to it. as I said in one of my previous posts about the pub looking to 60s-ish from changing the textures to a dirtier more ruined look I feel also from the pipe work that I've added around the pub has dulled down this fact and I believe the pub now sits more in the environment than it previously did


Monday, 28 April 2014

Steampunk: Telegraph Pole

Below I started to make a Telegraph Pole










Steampunk: Placing

today I meanly placed assets around the environment to add detail to the environment






Steampunk: Valt Wall

Below I derided to finish off the vaulted warehouse and add its own walls to it as you can see I was using the same textures as the pilers blow is a few shorts of the wall and its final place in unity at the bottom of the post. in the unity environment I have been using the model of the walls I've made as a way of stopping the player falling out of the world as I'm now finishing off the environment by closing off gaps I thought best to finish off the Volta walls which I had not done as you can see below is my stage by stage of the wall and gradual integration as I mentioned above immunity.





Sunday, 27 April 2014

Steampunk: Pulley

the link for the skyline to the cable would need to be and interesting design the idea I had in my head but i still uesd the images below as reference



















Below using the idea in my head and using the images above I began to make the pulley as you can see i started with the wheel and then went on make other small parts and then went on to put these together to make the final Pulley.




Below is the final pulley that will make up the skyline.



below is it in unity


Below I have added in the hanging box's from the skyline.

Saturday, 26 April 2014

Steampunk: Skyline (Unity)



Below is my new layout of the skyline including the new edition I made overhangs the road near the centre of my environment this sort of tram in the sky really adding in the steampunk style








Below is the blue line showing the way skyline gradually goes up the environment and out of sight of the player




Friday, 25 April 2014

Steampunk: Textureing Ddo



Using the software Ddo I'm finally going to be to add to the textures was at the growing but not the mould that I've been talking about in previous posts in this post I'm showing the textures I previously had now updated using this software to make the textures look exactly have I've always wanted them to look













As you can see below are the various screenshots of my environment with these new textures