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();
}
}

9 comments:

  1. The way you've set up three distinct scenes, including Oculus Rift support, is impressive. It shows excellent planning and consideration for accessibility.
    Mezzanine floor delhi
    Industrial storage rack delhi

    ReplyDelete
  2. Hiding the mouse cursor is Hiding the mouse cursor is such a small but crucial detail for player immersion. It’s great to see you paying attention to these little elements!
    Cantilever rack delhi
    long span rack delhi

    ReplyDelete
  3. Adding a unique icon for the game folder may seem minor, but it adds polish and shows your dedication to creating a complete experience. Well done!
    Pallet Rack india
    warehouse racking system india

    ReplyDelete
  4. The inclusion of a VR environment is fantastic! Were there any challenges you faced when integrating the Oculus Rift character controller?
    Cantilever rack india
    Spare part storage rack india

    ReplyDelete
  5. Updating the main menu with environment options enhances user experience. Did you test it for seamless transitions between scenes?
    Fabric Roll rack
    Heavy Duty Warehouse Racking

    ReplyDelete
  6. Your attention to detail, like customizing the game folder with an icon, really elevates the project’s presentation. It gives it a professional feel.
    warehouse racking system noida
    Warehouse Pallet Racking System noida

    ReplyDelete
  7. It’s great to see that you’ve provided easy navigation between scenes from the main menu. Streamlined user flow is key for a smooth experience.
    long span rack noida
    Mezzanine floor lucknow

    ReplyDelete
  8. I’d love to hear more about the steampunk environment—what inspired the visual design and world-building?
    Racking system lucknow
    Dust Collector

    ReplyDelete
  9. I appreciate that you included the "Press Escape to Exit" functionality—it’s a must-have for player convenience.
    two tier rack noida
    Warehouse storage rack lucknow

    ReplyDelete