clyde

Amateur Game Making Night

Recommended Posts

In MonoDevelop (the scripting program that comes with Unity), if you press ctrl and ' while a variable or method or whatever is highlighted, it'll take you to the webpage where there is some example code. That in combination with the detailed errors I get in the console and the way MonoDevelop auto-suggests the parameters it is expecting get me much farther than if I had to remember how everything has to be written. I'm not sure if that's what you are asking though.

Do you have an example of what you would want the guide for?

Share this post


Link to post
Share on other sites

Question for all you programmers out there. Do you folks keep a syntax guide handy when you're coding? I'm learning JavaScript through Codecademy (my first programming language) and as I'm finishing up the last course I find that I still need to turn back to earlier lessons to remember what the thing I'm about to make looks like.

 

If you do have a guide, which one do you use? Not asking just for JS specifically- though if you have one for that I wouldn't mind taking a look at it.

I mostly work in either an IDE (meaning it automatically checks syntax, usually with suggested fixes), or a text editor that I've configured (emacs or sublime) so that it will highlight syntactical errors. That plus a tiling window manager so that you can easily keep a code window and a reference window next to each other make it pretty easy.

Share this post


Link to post
Share on other sites

Do you have an example of what you would want the guide for?

in JavaScript- for instance- there's at least three ways to build an object. Off the top of my head though, I can only remember two of them. If for some reason I needed the third way, I would appreciate a guide of some sort that gave example code.

 

My anxiety is assuaged by your and osmosisch's answers though, as it seems the things you build in helps you along. I'm going to be building in Game Maker (as it seems a bit easier than Unity and it's something I already have), so hopefully that has some of the same tools.

Share this post


Link to post
Share on other sites

Any video of it? I'm curious to see it.

Not yet, I'll get one in a bit. I actually just had what I think is a pretty great idea to combine this jump-around-shooting-game thing with some of the adventure game stuff I've been doing. The result will surprise you (if I get it done)

Share this post


Link to post
Share on other sites

Is a class just a method that other classes can use?

 

No, not really.

Think of a class as a template for an object.

Example: You have the class Vehicle. In this class you can specify how many wheels it has, what kind of engine or maybe its color.

A method is another word for a function, which means something that you feed input to and returns an output.

 

Let's say you want to make a car.

First you specify the template, then name it. Vehicle blue_car;

 

Then you have vehicle functions.

Maybe you want to be able to paint the vehicle? Define a method/function inside the class that changes the Color attribute in the Vehicle class.

blue_car.paint("green");

Share this post


Link to post
Share on other sites

I just finished the JavaScript course and it turns out JS and Java are two very different things. I did not know this.

 

I don't feel like I wasted my time- as I'm now way more comfortable with the idea of programming- but I wish I had known before. The thing is I don't know where to go now. The reason I started up the course was because even though there are step-by-step videos and guides out there that teach you how to build stuff in Unity and GameMaker, I really wanted to have a decent grasp of a related programming language that gave me a better understanding of what was going on with the code. While I know a little more about methods, functions, parameters, variables, etc., I still have that anxiety telling me I should know more before trying to make a thing when all I want to do is make a thing. Blergh.

Share this post


Link to post
Share on other sites

If you were going to work in Unity, I would strongly recommend the Space Shooter tutorial. You would be surprised how much you understand even though it's a different language. I did the Code Academy section on Python and that was my reaction. I knew what loops were, I just had to get used to a diffent syntax. I don't know much about Game Maker though.

Also, this would be a good time to mention that the javaScript that Unity uses is not javaScript. At least, that is what I have been told.

Share this post


Link to post
Share on other sites

I just finished the JavaScript course and it turns out JS and Java are two very different things. I did not know this.

 

I don't feel like I wasted my time- as I'm now way more comfortable with the idea of programming- but I wish I had known before. The thing is I don't know where to go now. The reason I started up the course was because even though there are step-by-step videos and guides out there that teach you how to build stuff in Unity and GameMaker, I really wanted to have a decent grasp of a related programming language that gave me a better understanding of what was going on with the code. While I know a little more about methods, functions, parameters, variables, etc., I still have that anxiety telling me I should know more before trying to make a thing when all I want to do is make a thing. Blergh.

 

Here's the thing about programming, when you first start out the programming the conceptual nature is completely intertwined with the syntax, javascript is programming and programming is javascript. The first time you make a jump from one language to another it might very well feel like you're learning programming all over again, but you'll soon start realizing that an if in one language works the same way as an if in another. Being able to divorce the conceptual ideas of programming from the syntax of programming is an important step for anybody learning to code. I know your goals aren't necessarily becoming the best coder in the world, but hopefully there's some comfort there and you can appreciate your time is not wasted. Also you can use Javascript in Unity.

Share this post


Link to post
Share on other sites

Progress report for week #8

 

What were my goals for this week?

What are my goals for week #8?

-Work more on the GUI.

I'd like to have some form of transitioning animation for the textBox and a choice-menu that is as automated as my regular dialogue.

 

I mean... that's what I want to do. I'll write down some other stuff that I can work on optionally.

*3d Hanenbow

*More story for the dance-game. I gotta figure out if I'm going to try to make a 3d model of a flopping fish at some point. It's going to be too hard. I doubt I'll do that.

*I do want to make a game within a week at some point, so I might look at my options again for next week. You know what? let's just make that a goal.

 

-Prepare to make a a game on week #9. 

 

What challenges might I face and how can I prepare for them?

-I don't think that implementing choices in the GUI will be very hard. The only thing I see having a problem with is getting the characterCamera to move with the textBox. I tried doing that earlier this evening and it was weird. To prepare, I'll brain-storm some tricks I could use that wouldn't require me to move the viewport (after I give it another go).

 

-I'm making a game during week #9? That's a scary expectation. I guess I'll just look at what I can do reliably, see what parts I can use from the other games and then consider what I can do. I might have to write some amount of a plan that will make sure I finish something. There will need to be a point at which I just take everything that works and make it cool. I'm psyched. That'll be fun. Also, I need to remember that if I fail, I'll still gain a lot of experience from such an attempt. It'll be fun.

 
So before I looked over the posts I've made here in the last week, I was thinking that I didn't really do much except make the balls bounce around. I didn't realize that the text-box wasn't lerping last Monday. Reading the posts make me realize that I actually accomplished a good amount.
 
Which of my goals did I accomplish?
-I did animate the text-box. I also built the logic for the choice system.
Accomplished!
 
-I did end up working on the Hanenbow-inspired toy. Just in two dimensions, but that's arbitrary. I actually put a first-person character controller into the scene to walk around it for novelty so it was 3D at that point.
Accomplished! and that wasn't even a real goal!
 
-I did a lot of preparation for making a game on week #9, though it was mostly just trying to manage my expectations. 
Accomplished?
 
What happened?
-I learned how to lerp the text-box and I really like watching it go back and forth. I spent about as much time trying to get the portrait to move with the text-box, but it is super weird because viewports are significantly different from game-objects. The viewport does things like shrinking when it gets to the edge of the screen instead of just going off of it. Not that I got that far. I had a really hard time trying to convert the normalized whatever to spacial units. I might have given it more time if I had any amount of reasonable success, but I didn't so I moved on. I'm probably just going to attach static sprites to the text-box because I really don't care that much about the effect of having it be a camera. I actually worked on the text-box sprite for this purpose today. 
So then I got really curious about lerping; I wanted to see what happened when two lerping rigidbodies collided and so I made some spheres to find out. One thing led to another and I ended up adding sounds for the collision and then I got excited about the pitches and colors changing values with collisions. It was really fun. It was so much fun that I'm going to make it for this week's make-a-game project. 
I also made a lot of progress on the choice-system for the visual novel/twine system. I just wrote a bunch of confusing details about this. I don't want to erase it, but its just confusing so I put it in a spoiler-tag

It was more difficult than I thought it would be because it was the first time I've tried to integrate two systems into each other at that scale. At first it was hard to tell what variables I should share between the two systems and what needed its own values. I spent a lot of time trying to figure out the differences between arrays and arrayLists and hashtables and dictionaries and all that. I still don't have a clear picture of it. I spent a while trying to make a multi-dimensional array, but then realized that I could just do what I did with the dialogue lines and the portraits (for those I had two separate arrayLists that use the same index). So I have an arrayList for the options of the choices (strings like "Take the money.") and an arrayList for the boolean values that will be associated with each option. That way I can just tell it to change the bool to true for the index that is correalatory to the option. Sorry, it's not as confusing as I'm making it sound. The point is I figured out a way to do it. I have a Choice() method in the Awake() method that allows me to write options in a similar way as how Say() writes lines of dialogue. I ended up using the index for the values I assign in Say() as reference points for when the choices occur. I would post the code but it is really messy right now, I need to clean it up and comment it better. But before I do that I need to make the choice text move with the text-box sprites I made in Gimp for the options (that hasn't been done yet). 

For my preparations of making a game on week #9, I came up with a bunch of dumb narrative ideas that would use a single mechanic that I've already been able to make. Then I didn't like those because I don't want to make something just to prove that I can make it, so I came up with some great game ideas that are beyond my current abilities or that can't be done well within a week. So then I was like "Fuck making a game, I'll just make something with the musical balls that I can feel proud of." So that is what I am doing. I am REALLY bad at being able to tell how long something will take me to make, so my plan is to work through Wednesday on making the musical toy (it's not really a game, see?) and then use Thursday, Friday, and Saturday to fix everything up and make it look awesome.
 
What are my goals for week #9?
-MAKE A GAME! Musical Toy!
 
What challenges do I face and how can I prepare for them?
-I have a really hard time properly allocating time because the weirdest shit causes problems for hours. So the plan is to try to finish it by Wednesday and then embellish it for the remainder of my time. To encourage myself to stay on schedule, I'll be writing progress reports on Wednesday (which is when the game is feature-complete) and then one on Friday (which is when it really should be kinda done).
Psyched.

Share this post


Link to post
Share on other sites

Abandoning Irrlicht for the time being for (being yet another free 3D engine that was) making me think far too much about vertex shaders. T_T I see some of Unity's built-in pathfinding has been made free since I last looked into it, so I may begrudgingly return to some of my Unity projects after all. =P

Share this post


Link to post
Share on other sites

Thanks for the positive words, SpennyDubz. After putting down coding for a couple of days, I feel ready to get back into it. :owned:

Share this post


Link to post
Share on other sites

It only took me two hours to convert what I have of the musical ball game into 2D. I was expecting to get a massive performance boost, but I'm not seeing it. Still, I'm excited about being familiar enough with the tools that I could convert it so quickly.

I don't get it. The only think I can think is that it's because I'm using a sprite in the 2D version and internal assets in the 3D version. I have a hard time imagining that this would make up for all that additional geometry though.

Theses two scenes are running the same scripts (except the 2D one has 2Dcolliders and such). The only other difference I can think of is that I created the physicsmaterial (within Unity) in the 2D version and used a standard asset in the 3D.

This is the 3D version:
9UDHzWr.png

 

 

This is the 2D version:

AuXHjUp.png

 

Any ideas are welcome. I've never optimized before. As of now, I'm just going to drop the 2D version and continue working on the 3D one because it's more finely tuned and I like the look of it more. 

Share this post


Link to post
Share on other sites

So I'm doing this thing at the moment where I'm going to try to make a game (or at least something) each week. I'll show you guys whatever I end up with at the end of this week... the idea is kinda conceptual, so I may not pull it off, but whatever.
 
I've been putting up vines of bits and pieces as I develop; this is what it looked like yesterday.

Share this post


Link to post
Share on other sites

So I'm doing this thing at the moment where I'm going to try to make a game (or at least something) each week. I'll show you guys whatever I end up with at the end of this week... the idea is kinda conceptual, so I may not pull it off, but whatever.

 

I've been putting up vines of bits and pieces as I develop; this is what it looked like yesterday.

Something about that octopus seems cool. Whats the basic mechanic for this?

 

I've been working on two new characters.

FlorentStumpGenesis_zps800c55f9.gif

This one is named Florent. His super move, "Stump Genesis" doesn't have a completed animation, but I thought it looked cool enough to post anyways. 

Share this post


Link to post
Share on other sites

Ok. Wednesday deadline has come and I must stop adding features. I made a build for y'all's amusement. 

 

Pitch Is Scale

 

This was just me trying to get features in and making it kinda/mostly work, so some explanations are necessary. 

-Use the left mouse-button to make balls.

-Press the spacebar to pause and unpause balls. 

-The "0"in the top left hand corner opens up the menu.

--The slider does nothing currently (I was using it for something, but then I started using something else and I thought I may end up needing it so I left it in).

--Here is the cool part. Clicking the button that talks about collision toggles that setting. The plus/minus buttons on the left adjust a pair of integers. This pair creates a simple fraction. When collision is turned on, the balls will change their pitch by this factor. You can also change the pitch of balls individually by clicking on them when this menu is open.

--The plus/minus on the right is to change which sample the ball uses. I can't remember if the balls will change samples if they collide. I think it's only when you click on them. I'll eventually clean up those options. You will certainly be able to at least change which sample is active when you make balls. I can't remember if I did that yet.

 

So that's the basic idea. I really wanted to make it so you can put ground in, but I ran into difficulties and Wednesday is my deadline. I may put them in if I have time for a another pass before Tuesday. I will definitely put them in in a future version of the game, but this is an exercise in bottling up the potential so that's what I am doing; I'm limiting my options in order to manifest a result.

 

At my job today, I started thinking about how I can make everything look awesome (that is phase 2). That was when I realized that this week-deadline is actually kind of cool. I won't be able to do everything I want to it, but demarcating time for processes that I don't usually give time to is a good idea. I think I can make it look awesome, but I haven't tried making anything in  a game look awesome yet, so here is my chance!

I'm debating between sticking to minimalism or going for more of a children's book type of thing. I might start with making everything easy to understand with minimalist design and then embellishing it with animal characters and such. I have the rest of the week to do so. This is really fun.

Here is all the code currently. I'm putting it up so it can be compared to the finished code. I've only gone in and erased a bunch of stuff once (turns out, that is my favorite part of writing scripts) so there is lots of stuff that doesn't actually do anything and a lot of the comments were things I turned off and on to debug and all that. I would be careful about using any of it. If I was you, I would wait until I put up the pure shit on Monday.

 

I had it so that collisions created color changes, but that feature became low priority to implement well.

using UnityEngine;
using System.Collections;

public class ChangeColor : MonoBehaviour {

	//colors
	Color currentColor;
	public float redValue;
	public float greenValue;
	public float blueValue;

	// Use this for initialization
	void Start () {
		currentColor=new Color ( 1f, 1f,1f,1f);
		renderer.material.color = currentColor;
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void DifferentColor(){
		currentColor = new Color (currentColor.r+redValue, currentColor.g+greenValue, currentColor.b+blueValue);
		renderer.material.color = currentColor;
	}
}

 

 

This is basically the menu script. It's attached to the main camera

using UnityEngine; 
using System.Collections;

public class SharedValues : MonoBehaviour {

	public static float userFloat=1;
	public static float numerator=1;
	public static float denominator=1;

	int audioSampleIndex;
	public  AudioClip[] audioSampleLibrary;
	public static AudioClip sample;

	public static bool isGuiOn;



	string pitchChangeMessage="Collisions do not change the pitch.";

	void OnGUI(){
		if (GUI.Button (new Rect (0, 0, 20, 20), "O")) {
			isGuiOn = !isGuiOn;
		}
		if (isGuiOn){
			userFloat=GUI.HorizontalSlider(new Rect (20, 25, 600, 30), userFloat, 0f, 20f);
			string userFloatMessage= userFloat.ToString();
			GUI.Label(new Rect(20, 40, 100, 100),userFloatMessage);
			//A button that detremines whether pitch is increased or decreased.
			if (CollisionConditional.collisionPitchChange==true){
				pitchChangeMessage="Collisions will change pitch.";
			}
			else {
				pitchChangeMessage="Collisions will not change the pitch.";
			}
			if (GUI.Button (new Rect (20, 60, 500, 30), pitchChangeMessage)){
				CollisionConditional.collisionPitchChange=!CollisionConditional.collisionPitchChange;
			}
			string numeratorMessage= numerator.ToString();
			GUI.Label(new Rect(20, 100, 100, 100),numeratorMessage);
			if (GUI.Button (new Rect(20, 200, 100, 50), "+")){
					numerator=numerator+1;
				}
			if (GUI.Button (new Rect(150, 200, 100, 50), "-")){
					numerator=numerator-1;
				}
			string denominatorMessage=denominator.ToString ();
			GUI.Label (new Rect(20, 250, 100, 100), denominatorMessage);
			if (GUI.Button (new Rect(20, 300, 100, 50), "+")){
					denominator=denominator+1;
				}
			if (GUI.Button (new Rect(150, 300, 100, 50), "-")){
					denominator=denominator-1;
			}
			string audioSampleMessage=sample.ToString ();
			GUI.Label(new Rect(300, 100, 100, 100),audioSampleMessage);
			if (GUI.Button (new Rect(300, 300, 100, 50), "+")){
				if (audioSampleIndex<audioSampleLibrary.Length-1){
					audioSampleIndex=audioSampleIndex+1;
					sample=audioSampleLibrary[audioSampleIndex];
				}
				else {
					audioSampleIndex=0;
					sample=audioSampleLibrary[0];
				}
			}
			if (GUI.Button (new Rect(400, 300, 100, 50), "-")){
				if (audioSampleIndex>0){
					audioSampleIndex=audioSampleIndex-1;
					sample=audioSampleLibrary[audioSampleIndex];
					}
					else {
						audioSampleIndex=audioSampleLibrary.Length-1;
						sample=audioSampleLibrary[audioSampleIndex];
					}
			}
		}
	
	}

	// Use this for initialization
	void Awake () {
		sample = audioSampleLibrary [audioSampleIndex];
	}
	
	// Update is called once per frame
	void Update () {
	
	
	}


}
 

 

This pauses the balls. Eventually, I'll probably make it so the space-bar opens the menu and pause the balls simultaneously.

using UnityEngine;
using System.Collections;

public class ButtonConditional : MonoBehaviour {

	float timerAmount = 0.5f;
	float timer;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		timer = timer+Time.deltaTime;
		
		if ((timer + timerAmount > Time.deltaTime) && (Input.GetButtonDown ("Jump"))) {


			this.rigidbody.isKinematic = !this.rigidbody.isKinematic;
			this.rigidbody.useGravity=enabled;
			timer=Time.deltaTime;
		}
	
	}
}
 

 

This is where I put the methods that change pitch or audio-clips. This is the first time I've tried to manage multiple scripts on the same game-objects. The way I decided to do it was to separate it based off of general conditions and general actions. If I thought that one action would always be used with the same condition, I left it in the same script. But if I thought that I may use the same action in different conditions or different actions for the same conditions, I separated it this way. Trying to get comfortable with sharing variables and methods between scripts is the most significant thing I'm learning from this project thus far. 

using UnityEngine;
using System.Collections;

public class ChangePitch : MonoBehaviour {

	//An integer to divide the picth by.
	public float factor = 1;
	public float pitchMultiplier=1;
	//This is to maintain the multiplied scale
	float newRatio;

	//GameObject mainCamera;
	//SharedValues sharedValues;
	//AudioClip[] audioSampleLibrary;
	//int audioSampleIndex;


	// Use this for initialization
	void Start () {
		audio.pitch = audio.pitch * pitchMultiplier;

		//Getting the array of audioclips from SharedValues
		//mainCamera = GameObject.Find ("Main Camera");
		//SharedValues sharedValues = mainCamera.GetComponent<SharedValues> ();
		//audioSampleLibrary = sharedValues.audioSampleLibrary;


		//Debug.Log (audio.pitch);

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

		Debug.Log (SharedValues.sample);
	}

	void OnMouseDown(){
		if (SharedValues.isGuiOn) {
			//audioSampleIndex = SharedValues.audioSampleIndex;
			//audio.clip=sharedValues.audioSampleLibrary[audioSampleIndex];
			//Trying the former line in a different way because I'm getting this error:
			//NullReferenceException: Object reference not set to an instance of an object
			//ChangePitch.OnMouseDown () (at Assets/Scripts/ChangePitch.cs:42)
				//UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32, Int32)
			//audio.clip=sharedValues.audioSampleLibrary[audioSampleIndex];
			audio.clip=SharedValues.sample;
			audio.pitch=FractionPitch(audio.pitch, SharedValues.numerator/SharedValues.denominator);
			newRatio=audio.pitch/pitchMultiplier;
			transform.localScale=new Vector3(1/newRatio, 1/newRatio, 1/newRatio);
		}
	}

	public static float FractionPitch(float pitch, float factor){
		//audio.pitch = audio.pitch - (audio.pitch / factor);
		Debug.Log (SharedValues.numerator/SharedValues.denominator);
		return pitch*factor;
	}

	
}
 

 

Here is the script for the condition of colliding.

using UnityEngine;
using System.Collections;

public class CollisionConditional : MonoBehaviour {

	//So I need to have variables that determine which method will be run during a collision. 
	public static bool collisionPitchChange=true;

	//This is the initial multiplier for each of these objects.
	ChangePitch changePitch;
	float pitchMultiplier;

	//These are the min and max values for scale
	public float minScale=0.1f;
	public float maxScale=30;

	string increaseColor;
	string decreaseColor;

	//I also want the pitch factor to be changable
	float pitchFactor=1;


	bool pitchFactorLerperCount;
	bool pitchFactorUserFloat=true;

	float timer;
	public float timerAmount=1;
	bool justGotKnocked;

	//I'm going to put the gui script that changes the values in the script that is the conditional of the change.
	//So for instance, the collision script gets the GUi that says "what do you want to happen with things collide."
	void OnGUI(){

		}

	// Use this for initialization
	void Start () {
		//grab it from the ChangePitch script
		changePitch = this.GetComponent<ChangePitch> ();
		pitchMultiplier=changePitch.pitchMultiplier;
	
	}
	
	// Update is called once per frame
	void Update () {

		//timer for OnTriggerEnter()
		timer =timer+Time.deltaTime;
		if (timer > timerAmount) {
			justGotKnocked=false;
			timer=Time.deltaTime;
				}

		if (pitchFactorLerperCount) {
			pitchFactor=Lerping.lerpersCount;
				}
		if (pitchFactorUserFloat) {
			pitchFactor=SharedValues.userFloat;
				}
	
	}

	void OnTriggerEnter(Collider other){
				audio.Play ();
				//Later, it occurs to me that I should be changing the pitchMultiplier instead of the audio.pitch all the time. I bet that would help optimize it.
				//The reason I have the old pitch is because I think it may be handy for putting steps in later. Currently it's not being used.
				if (collisionPitchChange) {
						float oldPitch = audio.pitch;
						float newPitch;
						if (other.gameObject.tag == "lerpers") {
								if (justGotKnocked == false) {
										justGotKnocked = true;
										newPitch = ChangePitch.FractionPitch (audio.pitch, SharedValues.numerator / SharedValues.denominator);
										audio.pitch = newPitch;
										//This will reduce maintain the proper scale for scaling.
										newPitch = newPitch / pitchMultiplier;
										Debug.Log ("NewPitch:" + newPitch + "  OldPitch" + oldPitch);
										//change the scale to the reflect the new pitch
										transform.localScale = new Vector3(newPitch,newPitch,newPitch);
								}
								//transform.localScale = new Vector3 (Mathf.Clamp (1 / audio.pitch, minScale, maxScale), Mathf.Clamp (1 / audio.pitch, minScale, maxScale), Mathf.Clamp (1 / audio.pitch, minScale, maxScale));
								//Debug.Log (Mathf.Clamp (1 / audio.pitch, minScale, maxScale) + "   pitch = " + audio.pitch);
						}
				}
		}
}
 

 

This is how balls are instantiated.

using UnityEngine;
using System.Collections;

public class MakeLerpers : MonoBehaviour {

	public Transform lerper;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		if ((Input.GetButtonDown ("Fire1") == true)&&(SharedValues.isGuiOn==false)){
			Vector3 spotNormalized = Input.mousePosition;
			//Debug.Log ("SpotNormalized "+spotNormalized);
			Vector3 spot = camera.ScreenToWorldPoint(spotNormalized);
			spot.z=0f;
			//This is to make sure they aren't trying to turn the GUI on
			//Debug.Log ("x "+spot.x+"     y "+spot.y);
			if ((spot.x>-31)||(spot.y<14)){
			Instantiate (lerper, spot, Quaternion.identity);
			}


		}
	}
}
 

 

This is actually the first script I wrote for the project. It's kinda ridiculous that it is not currently doing anything. I actually really enjoyed turning lerping on and off with the space-bar and collisions, but as I was testing things it became something I had to work around so I turned it off and haven't turned it back on. 

using UnityEngine;
using System.Collections;

public class Lerping : MonoBehaviour {
	//This will be the array of all known lerpers
	public GameObject [] lerpers;
	//an index number for the laerpers array
	int index;
	//This will be the gameobject that you move toward
	GameObject target;
	//This is whether or not you are supposed to be moving toward your target
	bool lerping;

	//This is a global count of how many things have been instantiated with this script
	public static float lerpersCount;

	// Use this for initialization
	void Start () {
		//show that one more lerper exists globally
		lerpersCount = lerpersCount + 1;

		//This stuff is not being used currently. I was using it for debugging and think I might need it later
		//this is your reference number
		int yourNumber = Random.Range (0, 1000);
		//your reference number is your name
		this.name = yourNumber.ToString ();
	}
	
	// Update is called once per frame
	void Update () {
		//If you are lerping, move toward your target (if it still exists)
		if (lerping&&target.gameObject!=null) {
			transform.position = Vector3.Lerp (transform.position, target.transform.position, Time.deltaTime);
		} 
		//Debug.Log (lerpersCount);
	}

	void FindTarget(){
		//fill the lerpers array with all things that are tagged "lerpers"
		lerpers = GameObject.FindGameObjectsWithTag ("lerpers");
		//pick one at random
		index = Random.Range (0,lerpers.Length-1);
		//make it your target
		target = lerpers [index];

	}
	
	void LerpOn(){
		FindTarget ();
		lerping = !lerping;
	}
	


}
 

 

 

Edit: HOW DID THE SCALE PITCH RELATIONSHIP INVERT??? I thought I just tested that a few hours ago. Oh well, it adds some absurdity to the build.

Share this post


Link to post
Share on other sites

I'm having a really hard time switching to a refinement phase from one in which I create mechanics. I walked around town all day because the weather was nice and I have been spending a lot of time staring at the computer. I thought about how I could make the ball game look awesome. Here are the sketchbook pages I explored my ideas on. 

tumblr_n3ho3pNgNb1s7gx5to3_1280.jpg

 

tumblr_n3ho3pNgNb1s7gx5to2_1280.jpg

 

tumblr_n3ho3pNgNb1s7gx5to1_1280.jpg

 

Tonight I spent a few hours playing with using the lerping script (that is currently unused) for point lights to give the game some pizzazz. I didn't end up with anything workable. I just ended up in the same mentality I have been in, which is getting an idea of some cool behavior I'd like to play with and trying to write it into the script. BUT THIS IS PHASE 2! I'm supposed to stop doing that and embellish or highlight what I currently have. If you've played the current build, you know that the menu is ridiculously obtuse and the game lacks a sense of objective. These are the problems I need to be tackling with design, not additional mechanics.

First thing I'm going to do tomorrow is clean up my scripts. I'll erase all the shit that isn't doing anything. I think that will get me into the idea that the game is feature complete and simultaneously re-familiarize myself with everything in there. Then I'll spend the rest of the day just making things intuitive.  Players really shouldn't be going into a menu at all. I have an unreasonable belief that when I come up with a theme, all these user-interface problems will solve themselves. That would be dangerous if it happens, that sounds like a bad habit. I don't know, we will see, I shouldn't be too judgmental. If someone else did it that way, I would think it was cool. Tomorrow is another day!

Share this post


Link to post
Share on other sites

I'm having one of those days where I feel like it would have been more productive to do nothing. I made a bunch of changes, couldn't save it as an alternative version, pushed forward and ended up with something I like less. It's incredibly demotivating. Good thing I'm a sunshine and rainbows kind of guy. Oh gawd, what have I done to my game?!

 

I'm learning some hard lessons today. For one thing, my plan to just erase non-essentials did not focus my efforts. It means that I'm rebuilding many parts of the script, with a slight improvement to simplicity. I'm still having to solve all sorts of problems with convoluted solutions. There is no doubt that my skill is improving, so if that's my validation of effort then "Bravo". I'm getting a much better understanding of how things should be divided between multiple scripts( I think?), but it's a slog. 

 

What should I have done instead?

Well, if I could figure out a reliable way to save copies of whole projects in Unity, then that would be an improvement. Copying and pasting may work, what I did was I copied the entire project folder and pasted it with another name, then when I opened it I discovered that I had actually copied that 2D conversion I made the other day. Oops. So now I am committed (involuntarily) to the changes I made this morning. I could just re-import all the scripts from their state last night, but... no, I just need to keep going. 

What should you have done instead Clyde?

I don't know. It might be unrealistic, but Ideally, I would have implemented mechanics, one at a time, in a more holistic manner. For instance, I've decided that each ball's pitch can be changed by clicking on it. the original plan was that you would press space-bar and kinda change them all. If I had been playing with it and said "I'm going to avoid having a menu pop up at any point of development" then I wouldn't have to go back and redesign so much stuff. I don't know. Don't feel bad for me. I really am getting better at this, I just happen to want to bang by head into the keyboard until something breaks. I'll make some lunch and come back to it.

 

Edit (four hours later):

I'm going to double down. I'm pretty sure that the root of my difficulties today is that the I'm conflicted between needing to solve significant design problems and sticking to this idea that the refinement stage means I should be done with scripting mechanics. I don't know if I've described the problem clearly earlier. The problem is that I don't want the player to go into a menu, but I do want the the player to be able to chose a fraction and apply it to a ball. Complicating the matter, I'm ambivalent about whether or not the collisions should perform those changes to pitch and scale also. So I need to figure out (for sure) what the player will and will not be able to do, and then figure out a way for them to be able to do it with minimal controls and intuitive contexts. Today. Sunday I'll be busy and my deadline is Monday. 

 

Here is the plan: I'm going to keep erasing/organizing the scripts with the perspective that I am trying to make them more generally applicable to not just balls bouncing, but also dominoes or whatever. I know that sounds like I'm adding further complexity, but at the moment I think that making the scripts more generally applicable will make the way they should be organized seem more clear to me. Let's do this!

Share this post


Link to post
Share on other sites

Well I just finished the first project in the Unity beginners guide thing. It took me a little over a week due to work and alcohol, but I really, really enjoyed it. It's definitely made me want to make more things and piss about with the space shooter thing, like implement boss fights, power ups etc, just to see what I can do and understand things a lot better. I really enjoyed the scripting side of it, much like Clyde has said elsewhere, it often just feels like a puzzle and I had many occasions when I'd say "this is EXACTLY like the guy is typing... fuck this", then I'd walk away, make some lunch, and, hey presto, I found the offending non-capitalised letter. It was waaaayyyyy above my head when it came to a lot of stuff, but I do feel like some of the jargon started to sink in and I would even be able to predict what I needed to do in some of the scripts, albeit I wouldn't actually know the correct way of doing it, just what the general idea would be. 

 

I do think my major problem will be artwork. I really do not have a creative bone in my body when it comes to that, and saying as I have no idea how to draw in real life I'm guessing it will be even more difficult when I come to add things like animation, effects, layers etc on top of that. So I think if I ever do make some sort of project I'll just use the assets store and do my own "programmers art" for other stuff. I'm also feeling pretty bummed out that I will have at maximum 4-5 months to work on any project I want as I'm supposed to be moving abroad to teach which means my PC and I will have to part ways for a while (expect me to pop up in some sort of 3DS thread expecting a top 10 list of recommended games). The whole idea is incredibly daunting. 

 

I'm going to carry on with the Unity projects and follow other peoples guides, like one I found somewhere on the Thumbs forums about creating an RTS game/a Mario 64 clone. Both of which are related to seperate ideas I have for projects, or just ways to cut my teeth. 

 

Just somethings to ask: does anyone know any videos/guides which could help me with C# specifically related to Unity/building a game? And does anyone have any sort of mini-projects/guides they recommend as a must do for n3wbz? 

 

Oh and lastly, not to get incredibly soppy/over dramatic but you have no idea how helpful this thread/this sub-forum has been in motivating me to complete that project-by-numbers (see how pathetic I am?). Any time I was preparing to play Titanfall instead of loading up Unity I would think "what would Clyde do?" and then I'd want to work on it. So cheers. 

 

I use way too many "/'s" in my posts. I'm very ambiguous/mysterious. 

Share this post


Link to post
Share on other sites

The way I'm learning C# is just watching these videos so that I know concepts exist and then going back to them over and over again when I am trying to do something that is related. I can only absorb the information once I'm ready for it, and I'm sure there is a more efficient way to learn C#. I'll get an idea of something I want to happen and I'll just try writing the script, fixing the errors as they come up and using Debug.Log("this happened") a lot. I also take the time to look through the predictive text options that MonoDevelop provides as I'm typing stuff up; even if it's not something I'm using right now, it helps to know it exists. As you can tell, my struggles mostly involve just knowing that something exists in order to use it. For example, how about OnMouseDown()   That is a method I'm using constantly now that I know it exists. I probably watched videos that talked about it before I was ready to use it, but when I needed to be able to just click on an object for something to happen I Googled "select with mouse Unity" and found out about OnMouseDown()
I'm also using the script reference constantly as I write stuff. The easiest way to do this is highlight the variable or whatever that you are pretty sure you need to use in while typing in MonoDevelop, then press Ctrl and ' at the same time and it will open up the page that explains what it does and gives you a few samples of code that they say are fine to copy. I type those out (instead of copy&pasting) to get more familiar with how things are organized. I'm sure there is a better way to do this but honestly, I just can't absorb the information unless I try to do something, fail, and then look it up and apply it a few times. The problem with this learning-method is that I know I'm missing fundamental information and that does cause a lot of frustration. 
I'm psyched that you are making games Dosed! If you have any questions, I'm more than willing to give you possibly incorrect answers. Also, when I am just staring at the screen and not actually thinking anymore, I go and play a few rounds of Titanfall. For me, the key is to work on making games when I don't feel like doing anything specific. Before I was just loading up Spelunky if I didn't have anything specific I wanted to do; I got really good at Spelunky. Now I'm going to be a technomancer.

 

Where are you going to teach?

Share this post


Link to post
Share on other sites

Something about that octopus seems cool. Whats the basic mechanic for this?

 

Thanks for asking! You're basically drifting around an underwater environment and trying to make friends. I'm hitting the deadline on this game-a-week game tonight, so am just putting some finishing touches on it now. Also hope to make it a bit less confusing...

 

Your game looks very cool by the way! I like the line style, especially things like the trees and the detail on those stumps.

Share this post


Link to post
Share on other sites

I want to make octopus friends. Will there be a place to play these games? 

And thanks! I'm looking forward to getting it to the point where I'm ready for people to actually play it. 

Share this post


Link to post
Share on other sites

Oh that's cool. I had no idea those videos existed. I'll definitely have to check them out. I might have some more spare time recently as I'm getting screwed out of some hours at work. I guess there's always a silver lining. Except the cloud part of this analogy is that I'll be poor.

 

I read that people don't seem to like video tutorials on these forums, but I find it almost essential to my understanding of a topic. I pretty much have to have a real life person, preferably someone I can actually see, explain things to me. My understanding of Spanish (which is still incredibly rudimentary) skyrocketed when I found a lesson series on spanishdict.com, and I really struggle learning guitar from tabs, I'd rather get my house mate to show me how to play something. 

 

Clyde, you're a gosh darned hero. I had no idea you had to highlight the variable or whatever and then press Ctrl + '. Man, that scary robot man in the videos got some flack from me when I was trying to get the documentation to show up. I totally agree with you when it comes to typing the script out. I feel way more comfortable doing that, and if I make any mistakes then I know what I have to look out for in the future. 

 

I wouldn't quite go as far to say I'm making games just yet, but I'm definitely going to go through all the Unity tutorial projects to see what I can learn and then try and knock some shambolic mess together and see what happens. I've got to say I definitely find the scripting the most enjoyable part of the experience, even though I find it incredibly difficult and frustrating. Have you got any projects you've got in mind for any far flung point when you're a bit more experienced? I've got a couple, but I've heard the worst thing to do is over shoot so I'm gonna start with just editing and messing about with the tutorial projects and then try and make my very own first game all on my own! 

 

I'm hoping to go and teach English in Spain as I've heard, and seen firsthand, there's a pretty good market for that there right now. It's not exactly my ideal number 1 thing I want to do with the rest of my life, but I definitely can't take working retail jobs while I figure out what I want to do with my life. 

Share this post


Link to post
Share on other sites

I have a lot if ideas for games and I get more as I try to make them. While working on this musical ball-game for instance, I've already seen three different directions it could go with more development, all good. Then as Capt. Hastings and I were trying to figure out how to make it sound more like music, we had another great idea. Besides that, I have lists of ideas I'm excited about. My point is that ideas for games are springing up faster than I could possibly make them, and by the time I get to the point where I can make one, I have a bunch of others I'd rather make. So, I'm starting to think of my long-term goal more as just gaining the ability to make games. It would be cool if I could make a game for someone's birthday within a day or two ya know?

As far as over shooting goes, what has really helped me is playing lots of amateur-games on freeindiegam.es When I dream of making a simulation of genetic algorithm populations that form their own economies and technologies, I get frustrated with my inability to make something simple happen. My new version of over shooting is just being able to complete a simple idea to its potential.

Share this post


Link to post
Share on other sites

So it's been a week since my JavaScript/Java mix-up/frustration, but I got back into it and had a few successes and frustration.

 

The first thing I did was pick my first project (making the basic mechanics for a StarTropics II-like game), then broke down the pieces of what that means. The latter helped a lot, as it made the goal from 'make a video game' to 'make a room, make a character, code movement, etc.' I ended up going with Game Maker b/c Unity feels too big. I also figure if two of my favorite recent games were built on GM (Hotline Miami and Gunpoint), it's good enough for me. I even managed to get 8 way movement down, but I'm running into hiccups with GM.

 

Part of it is thinking about things in terms of methods and classes doesn't seem to translate to Game Maker, with each object needing to have code placed inside it instead of inheriting it from somewhere else (which is the way I would want to lay it out). The other part of the hold up comes from my decision of game type.

 

StarTropics is technically a 3D game in that it uses the z plane for jumping. This literally added a new dimension of problems for me. Searching for solution ended up being a hassle as well. I Googled different variations of 'game maker 8 way movement +jump' and didn't find anything at all last light. It hit me this morning though, and I looked up 'Game Maker streets of rage' and I found something pretty quick. :P Someone provided a great example of how to create such a system, but now I'm having trouble implementing it myself. I'm also already envisioning problems down the road (how to make it so that enemy projectiles can be jumped over; making projectiles exist in specific z spaces).

 

All said, a productive week. I'm excited to move forward.

 

Edit: I'll also add that a good stress reliever for me has been making music. I think it's specifically b/c I'm running into the frustration of my abilities to make a game aren't up to my ambitions. I don't have that problem with music though, so it ends up feeling like a pat on the back that reminds me I can get to that point if I keep on trying. Maybe a similar solution will help one of ya'll out if you're feeling overwhelmed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now