Hey - Learning unity and need some things to experiment with!

Okay, this is how it is.
Since I’m not charging but rather looking for things to test myself with, I’m opening myself up to freelance work for (FREE)
I will tell you if i think i can do it or not beforehand, you don’t need to use the code and not obligated to anything. I just need some things to mess with.

ALL CODE is made in C#. Nothing else, sorry. I don’t know unityscript.

Small - medium complexity, large is welcome too but I don’t know how I’d be able to handle it.
I do NOT have pro version(Though, I have a spare PC that has it installed(legitimately with trial)).

The only thing is the code may at any time be available for the general public if I decide It’s a piece. It won’t be mentioned what project it’s in, whom it was sent to or anything similar.

I have the right to refuse as well :wink:

Thankyou.

Skype: Dabehman(I do voice aswell, if you so wish)

Hello!

how about a simple level randomization script, if you wanna get something thats good knowing, randomization always is.

Please post the scripts you make on this thread. This way you help others too and you get suggestions, ideas and help if you get stuck.

A person on the forum asked about collision mass for a vehicle and was on the route of using sphere’s to represent his vehicle. I got the idea that if you created a editor window to change a piece of geometry to a skinned mass of sphere’s you could use that as a collision mass. I further went on to explain that you could then use this collision mass as a “skin” for collision deformation. (deform the collision skin and deform the mesh to match) to achieve better realism. I did not test the computational workload, but it was an interesting thought.

Task:
Part 1: Create a EditorWindow that would convert a mesh to a collider then shoot that collider with a series of spherical raycasts to get the shape. At each point you would figure the depth of the sphere and check to see if that location plus the radius of all the sphere’s would support a new collider. Once you have all of your colliders, destroy the MeshCollider, disable the mesh and parent all of the sphere colliders to it.

Part 2: Create a deformation system that will collect all of the incoming collision data and determine if any collision information was substantial enough to warrant deformation of the collision mass and geometry. (Done easily in the OnCollisionEnter and OnCollisionStay, testing the normal of the collision to the velocity of the vehicle) If that value is greater than a certain amount then you apply the deformation to the meshes attached to the object and the collision mass.

No, you don’t have to do it, but its something to chew on. lol

Ouch bigmisterB, that one sounds tough. Though I’ll put it on my list of things I hope to one day try out.
Bloodsin, I’ve done some random level randomization scripts. But they are mostly 2D and thus only two axis. Pretty easy, I would step into the 3D realm except I prefer 2D when working on my own things since I dont have to rely on having PRO for nicer effects.

Also, Costy. I have quite alot of scripts. Though this one is the one I’m in the process of rewriting(Thinking how to go about making it smoother, maybe with lerp?)
I try to line most of my code. With the new script I’m going to try add a doublejump feature(Like, allow players to jump to a maximum height before they fall and can only jump once again even after falling, but with the new jump it’s a strict downfall. Also disabling any acceleration midair.)

using UnityEngine;
using System.Collections;
using System.Timers;
public class Charactercontroller : MonoBehaviour {
	Timer FallTime = new Timer(); // Timer. Unused, was going to experiment but didn't come out how I had hoped.
	public float MaxAmount; // Max amount allowed. Public to allow choosing from within the editor.
	public float Timer; // True or false(1 or 0) I chose not to use bool because I overthinked it at this time. Either will work. But I was wanting to add more options thats why I chose not to use bool.
	private float TimeLeft; // TimeLeft, unused. was going to be used for something else.
	private bool AllowedJump = true; // Allowed jump. If false they cannot jump, if true they can.
	private float StartTime; // Timer, didn't name right. It goes up if they are not colliding. EX: If they arn't touching the floor.
	tk2dSprite sprite; // Sprite for editing, which is the sprite of my ball.
	Transform SpriteBullet; // No idea what I was doing with this.
	float Countdown; // Another unused valuable.
	// Use this for initialization
	private float GameOver = 0;
	
	public bool getjump() {
		return AllowedJump; // Return AllowedJump. For use with the GuiDebug. 
	}
	public float StartTimer() {
		return StartTime; // Return Starttime. For use with GuiDebug.
	}
	void Start () {
		sprite = GetComponent<tk2dSprite>(); // Just setting sprite to the ball.
		
	}
	
	// Update is called once per frame
	void Update () { // Little more complex, I could of gone with a time one but if the game lags then they are allowed more time in air.
		// This allows a update-step adjustment to avoid cheating. Easier to alter aswell.
		if(Timer == 1) {
			StartTime++; // Increase the starttime each update.
			if(StartTime >= MaxAmount) { // If they were in air too long(MaxAmount) this is triggered.
				AllowedJump = false; // They are not allowed to jump anymore.
			}
			
		}
		// FALL TIMES//
		if(GameOver == 0) {
			if(sprite.transform.rigidbody.velocity.x <= 5) { // Restricting their movement so they can't go too slow.
				sprite.transform.rigidbody.velocity = new Vector3(5f,sprite.transform.rigidbody.velocity.y,0f);
			}
				if(sprite.transform.localPosition.y >= 3.5f) { // Restricting height
					sprite.transform.rigidbody.velocity = new Vector3(sprite.transform.rigidbody.velocity.x, -1, 0f);
				}
				if(Input.GetKey(KeyCode.D)) // Getting key, if I used GetKeyDown it would only go when they press it. Meaning they get one incremental and theyd have to press again.
				{
					if(sprite.transform.rigidbody.velocity.x <= 10) { // Restricting their velocity. Too fast means they won't see upcoming traffic and the background MAY fail to update in time and they will see background.
						sprite.transform.rigidbody.velocity += new Vector3(1.3f,0,0); // Increasing their velocity to the right.
					}
				}
				if(Input.GetKey(KeyCode.W)) // We don't want players to jump and that's it. It's not smooth, players don't want that. They want control. This was learned with super mario. For that, I restrict jump after a time.
				{
					if(AllowedJump) { // Check if they can jump.
						if(sprite.transform.rigidbody.velocity.y <= 2  sprite.transform.position.y <= 0.5f) { // Restricting velocity  height as a counter-measure for cheating.
							sprite.transform.rigidbody.velocity += Vector3.up / 2; // Increase velocity upwards.
						}
					}
				}
				if(Input.GetKey(KeyCode.A)) // Checking if key A is down. Allowing them to slowdown is good
				{
					if(sprite.transform.rigidbody.velocity.x >= 3) { // Check if their velocity is too slow. Too slow means they can cheat and dodge alltogether.
						sprite.transform.rigidbody.velocity += Vector3.left / 2; // Increase velocity to the left. We could also have done -= Vector3.right / 2.
					}
				}
			}
		}
	void OnCollisionStay(Collision floor) { // Checking if they hit the floor. This is called when they stay on the floor.(I think every two updates, probably.)
		//print(floor.gameObject.name); // Print to the debug within unity.
		if(floor.gameObject.name == "Floor") { // Checking if the object it's staying on is floor.
			StartTime = 0; // Reset starttime to 0 so it has to start from 0 again meaning jump is reset.
			AllowedJump = true; // Allow them to jump.
			//print("FOUND FLOOR!"); // Debug purposes. Printing to the console.
		}
	}
	void OnTriggerEnter() {
			GameOver = 1;
	}
}