SOVA: A Rough Concept

Hello everyone.

My name is Gavrillo, and I am starting a project. I have just been introduced to Unity last week, but find its format one that can bear endless fruit in adept hands. Unfortunately, I know nothing of scripting and coding and find myself severely limited in my approach. My main area of expertise is illustration and concept art. However, through tutorials and premade scripts, I have started developing a very crude prototype of a project I envisioned. It is fortunate that this forum exists as I hope this will cross the attention of those much more familiar and savvy in terms of the technical aspects of game creation.

As it stands, I see this game as an experience that stresses atmosphere and minimal functions and interface options. The player will have to adapt quickly and gain experience through uncertain exploration from first person view. Its mood might seem brooding, but carries a jovial tune in its own right.

In addition to my prototype, I have put together this rough concept to better illustrate the kind of world this takes place in. However, as I update and refine the game, these concepts will most likely be changed, removed, or evolved.

I want to use this thread as a kind of progress journal as well as a means of encouraging community input to the many queries I am sure will often follow.

So, to begin, here are some problems I am currently having trouble successfully implementing into the game, and I will be as frank as possible:

  1. Is it possible to add a kind of flashlight function that shines through global fog and only attached to one camera? I currently have two cameras that the player can switch between and when I attach a spotlight to camera2, it is visible on both. Now, when I add the global fog to camera2 (since camera1 already has an independent fog attribute, it does not show).

  2. How would I add a sprint function to the character? I am using the default 1st person perspective that allows movement and jumping. In addition, how would I add walking and running sounds to the character? Also: is it possible to change the sound when they are walking over different terrain (grass, stone, wood)?

  3. How does one fix an object onto a camera, such as a visor, and is it possible to attach two cameras in this fashion, but from different positions?

  4. Is there any way to program an item to get bigger over the course of the game, such as a weapon? Let’s say that there are 10 stages to the weapon and I need the weapon to visually evolve every 5 minutes.

  5. For the character, is there a way to set a limit to how long they can sprint and have a cool down meter where their stamina replenishes. With this, how does one add vocal sound effects when you jump, huffing while sprinting, and exhaustion when they are no longer able to sprint?

I’ll start with these couple of questions and hope that you guys are able to help me. I will update as the game begins to be somewhat functional. However, for now, I will mostly update with rough concept art, starting with this first one.

Lastly, if anyone wants to team up with me and help me with the scripting and such, that would be much appreciated. Please, feel free to message me.

Thank you.

Gavrillo

That art looks really good. If you need a little input on scripting, let me know. I know the basics pretty well.

Sprint is pretty simple, you need to set a variable for the speed. Have this variable go up when the key is pressed for sprint. If you attach the script you’re using, I can help that out.

The way I’d attach something is to have the object follow the coordinates of the camera. So…
Gameobject.position = camera.position
Inside of Update();

Using a time function, you could make a variable increase per 300 seconds (5min).

I actually have a boost meter code that works well…

EDIT: I’ve come to post the sprint/boost code for you. This should work, though I didn’t test it. I just wrote it in notepad from mine.

var moveSpeed : int;                     //Standard movement speed - Set in navigator
var boostSpeed : int;		         //How much to add with sprint - Set in navigator
var progressBarEmpty : Texture2D;        //Texture of the empty bar - Set in navigator
var progressBarFull : Texture2D;         //Texture of the full bar - Set in navigator
var pos : Vector2 = new Vector2(20,40);  //Position of the sprint bar - Set in navigator
var size : Vector2 = new Vector2(60,20); //Size of the sprint bar - Set in navigator
var barDownRate : float = 0.1;           //How fast the bar goes down - Set in navigator, or else it is 0.1, which is what I use
private var moveSpeedConstant : int;     //Constant set to return to after sprint - leave as is
private var boostSpeedFinal : int;       //Constant set to go on sprint - leave as is
private var barDown : float = 0.0;       //Used for the bar to regenerate - leave as is

//Function initiates when script is launched, sets essential variables
function Start() {
	// Set move speed constant
	moveSpeedConstant = moveSpeed;
	// Set boost speed final
	boostSpeedFinal = moveSpeed + boostSpeed;
}

//Boost function (ON)
function boostOn() {
	//Remove bar as boost is consumed
	if (Time.time > barDown  barDisplay >= 0) {
        	barDown = Time.time + barDownRate;
        	barDisplay = barDisplay - .1;
   	}
   	//If bar is empty, no boost
   	if (barDisplay > 0){
   		moveSpeed = boostSpeedFinal;
   	} 
   	//Since bar is empty, moveSpeed is normal
   	else { 
		moveSpeed = moveSpeedConstant; 
	}
}

//Boost function (OFF)
function boostOff() {
	//Regenerate bar if not full
	if (barDisplay < 1){
		barDisplay = barDisplay + .0005;
	}
	//Set moveSpeed back to normal
	moveSpeed = moveSpeedConstant;
}

//Function draws the GUI as needed
function OnGUI() {
    	//Draw the background of the sprint bar
    	GUI.BeginGroup (new Rect (pos.x, pos.y, size.x, size.y));
        	
		GUI.Box (Rect (0,0, size.x, size.y),progressBarEmpty);

        	//Draw how much of the sprint bar is filled in
        	GUI.BeginGroup (new Rect (0, 0, size.x * barDisplay, size.y));
            		GUI.Box (Rect (0,0, size.x, size.y),progressBarFull);
        	GUI.EndGroup ();

   	GUI.EndGroup ();
}

//Function performs during every frame
function Update() {
	//Detect if boost button is being hit (shift)
	if (Input.GetKey ("shift")){
		boostOn();
    	}
	else { 
		boostOff();
	}
}

Hi, xKroniK13x.

Thank you for the kind words and the assistance. I will definitely try to apply this script to the game and see how will it work. Your input is very much welcome and as I update and revise my game, I will post thoughts here and what kind of problems I am running into. Thanks again.

Hope it works well! If you don’t want the GUI element of it, and just want it to stop sprinting when you run out, just remove the OnGUI Function part of that script.