[WIP Name] ORBIT [First Game]

Hello,

I am 13 years old and I have been in Game Dev for around 2 (And a bit) years, I have been scripting for 2 years, and I have been using Blender for at least 3. Until earlier this year, I have been using Blenders game engine to create games. I decided to make the shift to Unity after realising that Blender didn’t suit my needs.
I read a few UnityScript tutorials, and (Since I already knew some JS and BASIC scripting), I learnt a lot in a short amount of time.
After putting together many (And I mean MANY) different games, and having them fall beneath fruition, I have decided to make this game, and follow it all the way through, even if it is only for practise. (I will hopefully release it, but if I can’t, I won’t).

Current Game

New webplayer!
Some pictures (Grouped into an albulm)

  • At the moment there is only one level, because I am really getting all my scripting done. Once scripting is done, and I have replaced all the placeholder graphics, I will move onto level creation. Right now I am working on getting a good, fun game down before making it look pretty.

Controls:

  • Since I have decided that this is destined for mobile, I have tried to make the controls as intuitive as possible. All you do is press Space to orbit the asteroid. Your aim is to orbit the asteroid on the far left.
  • Press ‘ESC’ to pause the game. From there you can resume, restart, quit or get help. Help is currently not implemented, so ignore that.

Obstacles:

  • The black hole / gravity well in the middle is one of the first obstacles I have created. I have scripting it so I can vary the pull force through a variable in the inspector, so I can change all the aspects of it in a few clicks. You have to use this obstacle smartly - if you enter it too close to the centre, you are sucked in and you explode. You need to aim around the outside, and use the gravity to slingshot yourself toward another asteroid.

Known Bugs:

  • If you fly off out of the screen, you don’t die. You just keep flying forever.
  • Not sure if this is evident in the webplayer, but sometimes you don’t explode on impact with the black hole. I have fixed this, but it isn’t in the webplayer.
  • When you enter orbit (Around an asteroid) you orbit depending on its rotation – you don’t rotate around it with your local force / direction (If that makes sense, you’ll understand once you play the webplayer)
  • In the webplayer, the starting asteroid (The big one) is cut off, and the other asteroids are close to the outside of the screen. This is accidental - the screen size in unity is different to the webplayer. (I tried fixing it in the latest player - its better, but the starting asteroid (The big one) is still cut off quite a bit).
  • Help won’t show up when the help button is clicked.

KEY:

  • Fixed
  • Fixing
  • Not fixed

Future implementations:

  • Background
  • More obstacles (Think moving meteors – ingame, a meteor is an asteroid which you cannot orbit around, that moves, and pretty much crashes into you)
  • A better menu (Unity’s GUI system is good, but a bit slow and not the best look visually)
  • Overall graphical improvements

Other:

  • At the start, it had a very distinct graphical style. The asteroids where white, the lunar lander was white, pretty much anything that wasn’t the background was white. At that point, I hadn’t made the black hole. I have deviated from that style quite a bit, please let me know if you would prefer a more black white game, or the current one. Its easy it to implement and black and white one.

  • I have made it so that the speed the lander is moving correlates to the speed of the orbit - high speed, fast orbit.

  • The current name (Orbit) is pretty close to EvilAlienAlpha’s game, Orbitor. I must say, their game looks amazing. If anyone has another idea for a name that fits the game, I would happily use it, but Orbit is something that (I think) suits the game pretty well.


Anyway, thank you for having a look at this game. I hope I come across as someone sophisticated enough to actually be dedicated to making a game, not some 13 Y/O who just wants to make a remake of MW3 or some such.

This is my first game which I am intent on finishing. If you look through my post history, I have made a few games that were never released, or were barely worked on at all. This is different.

EDIT: I almost forgot to say! I am a big believer in open-source software, so this will be released completely open-source, so if you would like to look at any of my scripts or anything, just ask and I’ll post them up. If this is released, it may not be free, but still open source.

I got the orbit direction problem fixed - its a lot more natural now. The lander now rotates using RotateAround, instead of just transferring a parent over to a turning sphere. Using RotateAround means I can specify which way it rotates.

Now I really need to work on some more obstacles.

Will upload new webplayer soon.

EDIT: Also fixed being able to fly off screen forever – you still have a little leeway, but not much. I also fixed the black hole collision problem.

New webplayer up

Fixed bugs:

  • Fixed the orbit direction problem
  • Fixed being able to fly offscreen forever
  • Fixed black hole collision problem

Remaining bugs:

  • No help
  • Screen res is still different, so one asteroid is sort of cut off. (Its the one you start at, so it doesn’t affect gameplay or anything)

Implementations / Changes:

  • Asteroid Belt (Field?)
  • Different graphic for the black hole
  • Overall gameplay area is bigger, to account for the asteroid belt (Field?)

Anyway, now you have to make it to the asteroid directly to the left of the black hole. Its a bit difficult, so good luck :slight_smile:

Oh look!!! A fellow 13 year old has made a game…and its good. I really like the concept

Thank you, its good to see that I’m not the only one :slight_smile:

EDIT:

Also another project update. (Work goes fast when its the holidays)

Got almost everything planned out in Excel, and a couple of levels are past the concept stage and are being implemented. They’re only the early levels, so don’t expect anything difficult so far. Expect a webplayer with multiple levels soon.

Not bad, good gameplay idea, could be fun/challenging on the phone. I personally can’t even get past this first level yet, kind of difficult judging your flight path when aiming for asteroids that are a bit far off, and when you need to get close to them. Also… any thoughts or re-orienting the player ship when he’s orbiting an asteroid while facing it (so they don’t immediately crash into it when letting go)?

New webplayer – Includes 6 levels! WOO!

New bugs:

  • Once you finish level 6, since I have no more levels, you cannot proceed onto the next level. There is currently no indication of this.
  • Help still isn’t implemented
  • On levels 3 and 4 the winning asteroid is out of view… I’ll try to get this fixed.
    I uploaded a new webplayer, hopefully this is now fixed. (LOL, 3rd webplayer in 20 minutes)

New features:

  • Six great, new levels! (Pretty easy – I want to see how you did in them!)
  • The asteroid belt is implemented, but isn’t in any of the levels yet. Sorry.

That demo level that I had up is not going to be the first level, I have just uploaded another webplayer with some easier levels. About the re-orientating the ship, I’m a bit undecided. On one hand, it makes the levels slightly trickier, and on the other, it could probably get really frustrating and annoying for the player.
But, check out the new levels. They might be a bit easier.

EDIT: I think, when I resized my levels to fit the webplayer, I accidentally made the last level (The second one with two black holes) unpassable. Oops!

Well, I’m liking it. Can’t get past the level with the two black holes but that might just be my skill with this game.

Thanks! If the level you cannot get past is the level with the black holes horizontally adjacent to each other, I think I accidentally made that level unpassable – in the first webplayer, the screen res was out of wack with my unity project. So I squished everything together, and that led to the level being impossible to complete.

Also, new levels in the making. If anyone has any ideas on how to improve, don’t hesitate to say! I’m a little stuck on inspiration right now…

New Update!

Haven’t had time to upload a new webplayer, but the changes are not massive.

Fixed bugs

  • When you crash into something, the death screen appears immediately.
  • The speed you orbit is always a set speed

Features

  • The speed you orbit correlates to the speed which you entered orbit (So no going from super high velocity to low orbit speed - its all smooth!)
  • Line renderer!

Also, here is the code currently attached to my lander; (Wow, I am almost at 300 lines :P)

#pragma strict

private var axis : Transform; //RotateAround this
private var rotate : boolean; //Should I rotate?
private var side : String;
private var lander : GameObject; //This gameobject
private var guiMode : String; //Start, Pause, Death
private var emit : boolean; //Should the particleSystem emit?
private static var level : int = 0; //Level array
private var dead : boolean; //Makes it so you cannot go to winning screen when blown up
private var canWin : boolean; //Read above
private var rigidSpeed : float; //Used to get the speed of the rigidbody
//var spinSpeed : float = 60; //Orbit speed
var speed : float = 10; //Thruster speed
var explosion : GameObject;
var mainThruster : ParticleSystem;

function Start()
{
	lander = this.gameObject;
	Time.timeScale = 1;
	lander.renderer.material.color = Color.white;
	guiMode = "Start";
	emit = true;
	dead = false;
	canWin = true;
}

function Update()
{	
 //rigidSpeed = rigidbody.velocity.magnitude;
// Debug.Log(rigidSpeed);
 var forward : Vector3 = transform.TransformDirection(Vector3.up) * 500;
    Debug.DrawRay (transform.position, forward, Color.green);
    Debug.Log(level);
    
	//If far off screen, lose game
	if(transform.position.y > 30 || transform.position.z > 30 || transform.position.x > 30)
	{
		Explode();
	} else if(transform.position.y < -30 || transform.position.z < -30 || transform.position.x < -30)
	{
		Explode();
	}
	
	//Pause screen
	if(Input.GetKeyDown(KeyCode.Escape))
	{
		guiMode = "Pause";
	}
	
	//Turning the ParticleSystem (Fire) on and off
	if(emit)
	{
    mainThruster.particleSystem.Emit(1);
	} else {
	mainThruster.particleSystem.Stop();
	}
	
	//Checking what side asteroid is on
    var relativePoint = transform.InverseTransformPoint(axis.position);
    if (relativePoint.z < 0.0)
    {
		side = "Left";
    } else if (relativePoint.z > 0.0)
    {
		side = "Right";
	}
        
    //Rotate around that side
	if(rotate  side == "Right")
	{
	this.transform.RotateAround(axis.position, Vector3.right, rigidSpeed * Time.deltaTime);
	emit = false;
	} else if(rotate  side == "Left")
	{
	this.transform.RotateAround(axis.position, Vector3.left, rigidSpeed * Time.deltaTime);
	emit = false;
	} else {
	emit = true;
	return null;
	}
	
	if(dead)
	{
	Destroy(gameObject);
	}
}

//Get the rotational axis
function GetObject(rAxis : GameObject)
{
	axis = rAxis.transform;
}

//Function which destroys and adds the physics components
function rotateAroundFunc (on : boolean)
{
	if(on)
	{
		rigidSpeed = rigidbody.velocity.magnitude * 15;
		rotate = true;
		Destroy(constantForce);
		Destroy(rigidbody);
		emit = false;
	} else {
	rotate = false;
	lander.AddComponent("Rigidbody"); // Add the rigidbody.
    lander.rigidbody.useGravity = false;
    lander.rigidbody.drag = 0.9;
    lander.rigidbody.angularDrag = 0.05;
    rigidbody.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationY | RigidbodyConstraints.FreezeRotationY;
    rigidbody.constraints = RigidbodyConstraints.FreezePositionX;
    //Enable the ParticleSystem
    emit = true;
    //Add the constantforce
    lander.AddComponent("ConstantForce");
    constantForce.relativeForce = Vector3(0,speed,0);
	}
}

function OnCollisionEnter(hitInfo : Collision)
{
	if(hitInfo.relativeVelocity.magnitude >= 0)
	{
	Explode();
	}
}

function Explode()
{
	Instantiate(explosion, transform.position, Quaternion.identity);
	lander.renderer.material.color = Color.clear; // or whatever
	Destroy	(constantForce);
	Destroy (rigidbody);
	emit = false;
	guiMode = "Death";
	yield WaitForSeconds(1);
	Time.timeScale = 0.5;
	yield WaitForSeconds(1);
    Time.timeScale = 0.0;
    dead = true;
    canWin = false;
}


function Win(on : boolean)
{
	if(on)
	{
	Destroy(constantForce);
	Destroy(rigidbody);
	emit = false;
	guiMode = "Win";
	}
}

function OnGUI()
{
	    GUI.contentColor = Color.white;

	if(guiMode == "Pause")
	{
			Time.timeScale = 0;
			
			if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2-60,150,30), "Resume Game?")  guiMode == "Pause")
			{
			guiMode = "None";
			Time.timeScale = 1;
			}
			if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2-20,150,30), "Restart Game?"))
		    {
				if(Application.loadedLevel == 0)
		    	{
		    		Application.LoadLevel (0);
		    	} else if(Application.loadedLevel ==1)
		    	{
		    		Application.LoadLevel (1);
		    	} else if(Application.loadedLevel == 2)
		    	{
		    		Application.LoadLevel (2);
		    	} else if(Application.loadedLevel == 3)
		    	{
		    		Application.LoadLevel (3);
		    	} else if(Application.loadedLevel == 4)
		    	{
		    		Application.LoadLevel (4);
		    	} else if(Application.loadedLevel == 5)
		    	{
		    		Application.LoadLevel (5);
		    	}
			}
        	
			if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2+20,150,30), "Quit Game?"))
		    {
				Application.Quit();
        	}
        	if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2+60,150,30), "Help?"))
		    {
				GUI.Label (Rect (Screen.width/2-75, Screen.height/2+70,150,30), "Press Space to orbit a planet -- watch out for black holes! Press ESC to pause!");       
		 	}
	}
	
	if(guiMode == "Death"  dead)
	{
			Time.timeScale = 0;

			if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2-20,150,30), "Restart Game?"))
		    {
		    
				if(Application.loadedLevel == 0)
		    	{
		    		Application.LoadLevel (0);
		    	} else if(Application.loadedLevel ==1)
		    	{
		    		Application.LoadLevel (1);
		    	} else if(Application.loadedLevel == 2)
		    	{
		    		Application.LoadLevel (2);
		    	} else if(Application.loadedLevel == 3)
		    	{
		    		Application.LoadLevel (3);
		    	} else if(Application.loadedLevel == 4)
		    	{
		    		Application.LoadLevel (4);
		    	} else if(Application.loadedLevel == 5)
		    	{
		    		Application.LoadLevel (5);
		    	}

        	}
        	
			if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2+20,150,30), "Quit Game?"))
		    {
				Application.Quit();
        	}
        	if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2+60,150,30), "Help?"))
		    {
				GUI.Label (Rect (Screen.width/2-75, Screen.height/2+70,150,30), "Press Space to orbit a planet -- watch out for black holes! Press ESC to pause!");       
		 	}
	}
	
	
	if(guiMode == "Win"  !dead)
	{
			Time.timeScale = 0;
			GUI.Box (Rect (Screen.width/2-75, Screen.height/2-20,150,30), "Win Menu");

			if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2-20,150,30), "Next level?"))
		    {
		    //	GUI.Box (Rect (10,10,100,90), "Loader Menu");
		    	if(Application.loadedLevel == 0)
		    	{
		    		Application.LoadLevel (1);
		    	} else if(Application.loadedLevel ==1)
		    	{
		    		Application.LoadLevel (2);
		    	} else if(Application.loadedLevel == 2)
		    	{
		    		Application.LoadLevel (3);
		    	} else if(Application.loadedLevel == 3)
		    	{
		    		Application.LoadLevel (4);
		    	} else if(Application.loadedLevel == 4)
		    	{
		    		Application.LoadLevel (5);
		    	} else if(Application.loadedLevel == 5)
		    	{
		 			GUI.Label (Rect (Screen.width/2-30, Screen.height/2-80,150,30),"You have beaten the game! Well done!");
		    	}
        	}
        	
			if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2+20,150,30), "Quit Game?"))
		    {
				Application.Quit();
        	}
        	if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2+60,150,30), "Help?"))
		    {
				GUI.Label (Rect (Screen.width/2-75, Screen.height/2+70,150,30), "Press Space to orbit a planet -- watch out for black holes! Press ESC to pause!");       
		 	}
		 		GUI.Label (Rect (Screen.width/2-30, Screen.height/2-60,150,30),"You win!");
	}
	
	if(guiMode == "Start")
	{
			Time.timeScale = 0;

			if (GUI.Button (Rect (Screen.width/2-75, Screen.height/2,180,30), "Are you ready to ORBIT?"))
		    {
			guiMode = "None";
			Time.timeScale = 1;
        	}
	}
}

LOL this makes my basic coding look like preschool work

Haha, its not that complex when you get into it :slight_smile: Just, when you keep adding to it, it gets bigger.

Update! Sneak peek at new art style, let me know if you like it. (I know the asteroid in the top right corner (The big one) is a big pixelated, that just because I scaled the asteroid up. Won’t be like that in the end.

If above doesn’t work, Mirror link

Looks good. The asteroids needs more bumpiness/craters and I can’t easily tell what the white/black circles are.

Thankyou. The black / white circles are moon/planets, that sort of thing – something for the background. I will probably remove them - they where just things to fill in the background.

I am probably going to have to postpone development on this for a month or so due to IRL reasons. Worst case scenario - postponed till December the 5th, but most likely it will only be a month or so.

Thanks.

personal reasons -__- the worst kind…I hope everything gets settled out

Oh, its nothing bad, its just some unexpected commitments unexpectedly came up! :slight_smile: