clyde

Amateur Game Making Night

Recommended Posts

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.

I think we should start a play-testing thread. Once I put up my game, it would be useful and interesting to see how easy it is for others to play the game. It seems that we have a reasonable quantity of forum-users who are prepared to record their play-throughs of Spelunky and Titanfall. We also have a lot of people who want to participate in game-development without the ability to make the time-commitment required to learn how to use a game-engine. A play-test thread where we put our builds up, ask for reactions, and encourage video-recordings of first times playing could be really illuminating.

Also, when I was looking through Blender tutorials, there was one where all the key-presses and mouse-clicks were logged at the bottom of the screen during the video-capture. That would be really nice to have when ither people try to play our games. Does anyone know what software does that? I'm having a hard time finding it.

Share this post


Link to post
Share on other sites

Progress report for Week #9

What were my goals for the week?

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.

Which of my goals did I accomplish?

-I made a musical toy.

Accomplished!

-I wrote a mid-progress report on Wednesday and a memoir of desperation of Friday.

Accomplished!

-The goal (as discussed in Week#7 and #8's reports) was kind of to make a complete game and I don't feel that I did that, but I have a lot to say about that aspect of the goal.

somewhat Accomplished!

What happened?

-There were highs; there were lows. It was a really great objective and I learned a ton of stuff very quickly. Much of what I learned was how much I did not know.

So everything I did up into Wednesday, I had done before, just not necessarily to the same technical level. But when the refinement phase came, I really had no experience to fall back upon. I didn't think that it would be all that different from phase 1, but it was. I'm used to just adding cool stuff and adding more cool stuff, I never have really deflated the extrapolation to try and make it more cohesive. I had a hard time accepting that the game would be limited, and once I did accept that, I had a hard time determining what was polish and what was adding features. Once Capt. Hastings played the build and spoke her mind, everything started to get prioritized effectively. I had spent a lot of time considering unifying themes that I could apply, content that would allow discovery, and objectives that would engage the player; but I only had a week. The refinement phase became a matter of making it so the controls were intuitive, the game was not frustrating, and the most basic things that I was trying to express were potentially in there. This meant that all the annoyances (such as not being able to scale a ball immediately upon instantiating it) had to be fixed. It also meant that the stuff I was putting off because I thought implementation would be simple, should be done immediately. Capt. Hastings pointed out how absurd it was that I had only put in three dud-like sounds when interesting sounds was such an essential part of the game toy. Once she mentioned that it would be more enjoyable to tune the game with better sounds, I realized that low-hanging fruit should be picked first, not last. It didn't even make sense that I did that. Why would I do that? This was the theme of the last half of the week, realizing that I had all these strange defaults that were not very useful toward the purpose of finishing a game. I didn't actually finish it, but the musical ball toy is far more likely to get finished because I had to reel the potential back in before I extrapolated the potential so far that I couldn't tie it back together. It was hard enough to do that in the latter half of the week; thinking of doing it after a few weeks gives me a "whew, that was close" kind of relief.

Check this screenshot of the toy out:

8tCA9WW.png

If you happened to see the screenshot from Wednesday, you may notice that the performance in this one has more than doubled. Let me tell you how this happened. On Friday, I started erasing code because I love erasing code. When I'm scripting, I'm just trying to figure out how to make something happen and I end up doing it in very inefficient ways. When I come back to it and start erasing (actually, a better practice would be to comment the code at this stage, because it would have a similar effect) I see all this stuff that doesn't do anything and a bunch of processes that take the long-route. I'll just be saying to myself "Why would I do this the hard way?" The answer is that I was just trying to do it any way. Coming back and cleaning it up is essential. One big thing I noticed (maybe I'm wrong, but this is what I remember (btw, the code is in a previous update if you want to compare it to the finished code I'm about to post)) was that I was running things in the Update() without conditionals. When I went back in, I started trying to make nearly everything in the Update() start with an if. This led me to create many bools. Another thing I changed a lot of was that I had the scripts talking to each other a ton. But when I went back in, I could see what was accessing what and I was able to move those into the same scripts or make new bools that were independent of other scripts. I really learned a lot about scripting this week. The way I would phrase the jist of what I grokked was that I started asking myself "What does this object need to do?", separating the tasks, and then writing a separate script for each task (when they didn't share variables). I was startled with the boost in performance.

Here is the "finished" toy.

PitchIsScale

Here are the scripts, I commented a few of them really clearly so if you are learning C# or Unity, this may be really useful to you. I tried to explain even the most simple things. I got tired though and I didn't do them all. If you want me to do another or offer additional explanation, just ask. You can use this script for fulfilling the ambitions of yourselves and your loved ones.

using UnityEngine;
using System.Collections;

public class ChangesColor : MonoBehaviour {

	//This script changes an objects color to a random color.

	//We will be storing the color in this variable.
	Color currentColor;

	// Use this for initialization
	void Start () {
		//When this object comes into existence, it runs the method ChangeColor()
		ChangeColor ();
	
	}

	//This method only happens when Start() calls it.
	void ChangeColor(){
		//Colors are a mixture of Red, Green, Blue, and Alpha values represented as decimal numbers between 0 and 1.
		//Random.Range chooses a number for you between the range you specify in the parenthese.
		currentColor=new Color ( Random.Range (0f, 1f),Random.Range (0f, 1f),Random.Range (0f, 1f),Random.Range (0f, 1f));
		//This is the path of where the color is stored for the object. In the renderer, in the material, lies the color. 
		//We are telling that color to be the color created by the random numbers.
		renderer.material.color = currentColor;
	}
}

using UnityEngine;
using System.Collections;

public class CollisionPlaysAndChangesPitch : MonoBehaviour {
	
	//A Timer to make sure many collisions don't happen at once. 
	//Without it, one collision reads as many; so we set a timer that says "There can only be one collision every 0.2 seconds.
	float timer;
	//Putting public at the beginning makes it so I can adjust the number in Unity's inspector tab rather than having to go into the script to do it.
	public float timerAmount=0.2f;
	//This will be where we store the information of whether or not the ball just hit something a 0.2 seconds ago. Unless you tell a bool to be true, it's false. 
	bool justGotKnocked;
	

	// Update is called once per frame
	void Update () {
		//timer for OnTriggerEnter()
		//timer is a value that increases by accumulating little values from the game's clock. It just constantly increases in value over time because it's in the Update ()
		timer =timer+Time.deltaTime;
		//When that value is more than the amount of time we specified in timerAmount (0.2 seconds) we want the following to happen.
		if (timer > timerAmount) {
			//It didn't just get knocked. That was like 0.2 seconds ago; it's old news, let it go.
			justGotKnocked=false;
			//Reset the timer to zero. We are going to start the timer over.
			timer=0f;
		}
	}
	//This happens whenever the object that this script is attached to collides with anothre object that has a collider on it.
	void OnTriggerEnter(Collider other){
		//Play it's sound on collision.
		audio.Play ();
		//If you haven't had a collision in the past 0.2 seconds...
		if (justGotKnocked == false) {
			//Then this will be your the collision you are allowed every 0.2 seconds.
			justGotKnocked = true;
			//If you hit something that has been tagged with the word "balls" in Unity's inspector...
			if (other.gameObject.tag == "balls") {
				//We are going to make a note of what your pitch is and call it "pitch"
				float pitch = audio.pitch;
				//And then we are going to use that number to decide how large you are on all three of your three-dimensional axes.
				//An inversion of the number is necessary in order to make it so that higher pitches equal smaller balls and lower pitches equal bigger balls. 
				transform.localScale = new Vector3 (1 / pitch, 1 / pitch, 1 / pitch);
			}
			//If you hit something tagged with "1 half" instead...
			if (other.gameObject.tag == "1 half") {
				//Your audio pitch is going to be halved...
				audio.pitch = audio.pitch*1/2;
				float pitch = audio.pitch;
				//And then we are going to use THAT number to determine your size.
				transform.localScale = new Vector3 (1 / pitch, 1 / pitch, 1 / pitch);
			}
			if (other.gameObject.tag == "3 halves") {
				audio.pitch = audio.pitch*3/2;
				float pitch = audio.pitch;
				transform.localScale = new Vector3 (1 / pitch, 1 / pitch, 1 / pitch);
			}
			if (other.gameObject.tag == "4 halves") {
				audio.pitch = audio.pitch*2;
				float pitch = audio.pitch;
				transform.localScale = new Vector3 (1 / pitch, 1 / pitch, 1 / pitch);
			}
		}
	}
}
using UnityEngine;
using System.Collections;

public class MouseClickStopsAndDragChangesValue : MonoBehaviour {

	//These will store the position when a mouse-drag is initiated and the new place where the drag stops, so that the change in position can be used to adjust values.
	Vector3 startSpot;
	Vector3 endSpot;
	//This is the variable we will use to store the amount of change that has occurred between the initial mouse-position and the end of it.
	float change;
	//The reason we declare these variables here is that we want multiple methods to be able to access and change them within this page of script. 
	//Start() needs to be able to change startSpot and so does Update(), so we have to put it out here so both of them can see it.
	//Actually, we only need startSpot out here, but I don't think it will hurt to let startSpot's buddies keep them company while they wait for their cue. 

	//I had to do a conversion of the ScreenPoint to the WorldPoint, this Vector3 stores that conversion. ScreenPoints are in pixels and WorldPoints are in simulated meters.
	Vector3 convertedMousePosition;
	//This is how much a change in the mouse's x position will be multiplied when being applied to scale.It's public so I can adjust it in the inspector.
	public float multiplier=5;

	// Use this for initialization
	void Start () {
		//I needed the position of the mouse when the object is instantiated by MouseClickMakesThing.cs
		//It has to be in the Start, because the OnMouseDown() stuff in this script can't occur until the object that this script is attached to exists.
		//When this object comes into existence, the mouse is already down, so OnMouseDown() doesn't run, but Start() does. 
		startSpot = Input.mousePosition;
	
	}
	
	// Update is called once per frame
	void Update () {
		//When the drag is finished, make the ball fall.
		//The drag is finished if the object has its ability to react to physical forces turned off and the left mouse-button (0) is not being pressed.
		if ((this.rigidbody.isKinematic == true) && (Input.GetMouseButtonUp(0))) {
			//Allow the object to react to physics.
			this.rigidbody.isKinematic=false;
			//Allow the object to be affected by gravity.
			this.rigidbody.useGravity = true;
		}

		//If you shrink the ball to below 0.05 meters, destroy it.
		if (this.transform.localScale.x<0.05f) {
			Destroy(this.gameObject);
		}

		//When the ball is clicked and it's not being affected by physics, do this stuff as long as the left mouse-button is being held down (drag)
		if ((this.rigidbody.isKinematic == true)&&(Input.GetMouseButton (0))) {
			//This is where the mouse is currently in two-dimensional space
			endSpot=Input.mousePosition;
			//Since that is in pixels, we need to convert that to meters.
			convertedMousePosition= Camera.main.ScreenToWorldPoint(endSpot);
			//Take the difference between the starting position of the mouse and the end position on the x-axis, add 1 to it and then multiply it by the amount we decide in the inspector.
			//The reason that I added 1 to it was because at the very beginning of the mouse-drag, the change is zero, so I get errors in that moment.
			change=1+(endSpot.x-startSpot.x)/multiplier;
			//The size of this object is how many meters the mouse-pointer has moved on x-axis during this drag.
			this.transform.localScale=new Vector3(change, change, change);
			//The vertical position of the object is determined by the change on the y-axis during this drag.
			this.transform.position= new Vector3( transform.position.x, convertedMousePosition.y, transform.position.z);
			//The pitch of this object's sound will be an inverse value of this object's size.
			this.audio.pitch=1/change;
		}
	
	}

	//Ah, my new favorite method. How'z it OnMouseDown()?
	//This method is called whenever the left mouse-button is clicked while on top of an object that has a collider and has this script attached.
	void OnMouseDown(){
		//FREEZE! YOu don't get affected by physics until we tell you to get affected by physics. Got that punk?
		this.rigidbody.isKinematic = true;
		//Since we don't want the starting position of the mouse-drag to constantly change everytime the game updates, we only change it when the object is instantiated in the Start()
		//and here when the mouse is first clicked. 
		//If we did constantly update the start position, then there would be no change between the start position and the end position, they would both be re-evaluated every frame. 
		startSpot = Input.mousePosition;


	}
}
using UnityEngine;
using System.Collections;

public class MouseDownRotates : MonoBehaviour {

	//This is where we store the value of whether it is true or false that the drag is currently happening.
	bool dragActive;

	//This is a multiplier to how fast we want the object to rotate. Because it's public, we can adjust it in the inspector.
	public float speed=1;

	//This bool will allow us to switch the direction of the rotation
	bool rotateLeft;
	//This will alternate between a 1 and a -1 based on the validity of rotateLeft
	float positive=1;
	

	// Update is called once per frame
	void Update () {
		//It takes two to tango. If our boolean still says that the drag is indeed active, but the left mousebutton is up, we ain't dragging. 
		//Without this, we would never be able to return the dragActive to a false-state. We would rotate everytime the left mouse-button is pressed down (that might actually be kinda cool).
		if ((dragActive) && (Input.GetMouseButtonUp (0))) {
			dragActive=false;
		}

		//when rotateLeft is true, positive is a positive one; otherwise (when false), it's a negative one.
		if (rotateLeft == true) {
				positive = 1;
			} else {
				positive=-1;
		}

		//Now if the OnMouseDown() told this script that we are dragging, and the left mouse-button is down (that's what the zero is for), then rotate. 
		//Vector3.up rotates on the y-axis that is particular to the object, not the y-axis of the world. I've rotated this object so that the top is facing the camera. 
		//We multiply it by our float value called "positive" to go in the default direction, or the opposite direction.
		//The second parameter is the public float called speed that we can adjust in the inspector.
		if ((dragActive)&&(Input.GetMouseButton (0))) {
			transform.Rotate(positive*(Vector3.up), speed);
		}
	
	}

	//Everytime this object is clicked...
	void OnMouseDown(){
		//change the validity of rotateLeft to it's opposite.
		rotateLeft = !rotateLeft;
		//A drag is occurring.
		dragActive = true;
		}
}
using UnityEngine;
using System.Collections;

public class DragToMove : MonoBehaviour {

	bool beingMoved;

	Vector3 convertedMousePosition = new Vector3 (0, 0, 0);

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		if (beingMoved == true) {
			convertedMousePosition=Camera.main.ScreenToWorldPoint(Input.mousePosition);
			transform.position= new Vector3(convertedMousePosition.x, convertedMousePosition.y, 0f);
		}
		if (Input.GetMouseButtonUp(0)) {
			beingMoved=false;
		}
	
	}

	void OnMouseDown(){
		beingMoved = true;

		}
}
using UnityEngine;
using System.Collections;

public class MouseClickMakesThing : MonoBehaviour {

	//This code makes a thing when you click on an empty (non-rigidbody) space.

	public GameObject thing;

	
	void Update () {

		if(Input.GetMouseButtonDown(0)){
			RaycastHit hit;
			Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
			if (Physics.Raycast(ray, out hit))
				Debug.Log ("Physics");
				if(hit.rigidbody==null){
				Debug.Log ("rigidbody==null");
				Vector3 spotNormalized = Input.mousePosition;
				Vector3 spot = camera.ScreenToWorldPoint(spotNormalized);
				spot.z=0f;
				thing.audio.clip=MouseClickChangesSample.activeSample;
				Instantiate (thing, spot, Quaternion.identity);
				thing.rigidbody.isKinematic=true;
				}
		}
	}
}
using UnityEngine;
using System.Collections;

public class MouseClickChangesSample : MonoBehaviour {

	//This creates an array of audio samples
	public AudioClip[] audioSampleLibrary;
	//This will be a changing value that will be used to reference samples in the array.
	public int audioSampleIndex;
	//This will be the name of the current sample for display
	string sampleName;
	//This will be the active sample's file.
	public static AudioClip activeSample;

	//This is for displaying the name of the sample
	//I'm just going to fiddle with the positions
	public float x=26;
	public float y=380;
	public float width=300;
	public float height=30;

	// Use this for initialization
	void Start () {
		//Go ahead and make the sample with a reference number of zero the active sample
		activeSample = audioSampleLibrary [audioSampleIndex];
	}


	void OnGUI(){
		//Take the file name of the current sample, turn it into a string and store it in the sample variable.
		sampleName=audioSampleLibrary[audioSampleIndex].ToString ();
		//the variable eraseThis will store the part of the file name I want to erase.
		string eraseThis = "(UnityEngine.AudioClip)";
		//If the file name includes the part I want to erase...
		if (sampleName.EndsWith(eraseThis)){
			//the sampleName will be the 1st letter up to the length of the sample name, minuse the length of the part I want to erase.
			sampleName=sampleName.Substring (0, sampleName.Length-eraseThis.Length);
		}

		//Put some text in a rectangle at the positions I deteremined in the inspector. Dispay the sample name.
		GUI.Label (new Rect (x, y, width, height), sampleName);
		}

	//If the mouse clicks on this object...
	void OnMouseDown(){
		//If the reference number is greater than the amount of samples in the array minus 2...
		if (audioSampleIndex>audioSampleLibrary.Length - 2) {
			//The reference number for the current sample is zero. THis conditional keeps the reference number from climbing out of range.
			audioSampleIndex = 0;
			//if the refernce number is less than or equal to the number of samples minus 2...
		} else {
			//the reference number of the current sample is the last reference number plus 1.
				audioSampleIndex = audioSampleIndex + 1;
		}
		//the current sample is the one in the audioSampleLibrary array at the current reference number.
		activeSample = audioSampleLibrary [audioSampleIndex];
	}
}
using UnityEngine;
using System.Collections;

public class DestroysObjectsThatExit : MonoBehaviour {


	void OnTriggerExit(Collider other){
		if (other.gameObject.tag == "balls") {
				Destroy (other.gameObject);
		}
	}
}

What are my goals for week #10?

-Rest and enjoy my musical ball toy/game.

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. 

 

Arg, I totally dropped the ball on this. Crashed at 4am that night, then forgot that I ever wrote a post here. I'll make a new thread as per clyde's suggestion!

 

 

 

          1 INT. ED' ROOM - LATE NIGHT 1

           Ed sits in front of his computer. He is a snappily dressed

           gamer, and looks as if he hasn't moved from his post

           in command of the flickering terminal for some time.

           He's typing furiously, and it is clearly evident from

           his posture and unwavering gaze that he is notifying

           members of an online forum that a post has been updated

           with a link to a newly created topic.

                          ED

           Here it is!

Share this post


Link to post
Share on other sites

Did you write a script for the ability to exit the game Jason Bakker? I tried making a PC build for the first time and had just assumed that pressing "esc" would close the window or something. Your game seems to do that.

Share this post


Link to post
Share on other sites

Hey clyde! Yeah, I set it up so that Esc quits the game at any point. I might get rid of that in the next version, since Alt+F4 works fine.

Share this post


Link to post
Share on other sites

Well I just spent a good 2 hours with Unity. Still just making the tutorial project things, but I'm on the roll-a-ball one now and I'm enjoying this one way more. It's way shorter and the videos are far more digestible, the scripting hasn't been anywhere near as complicated as the Space Shooter one so far. I've started watching the scripting videos, and it literally took me about 15 minutes to understand a 5 minute video which was explaining the basics of scripting itself. I still think it's what I find most enjoyable though. I've started annotating my scripts, thanks to Clyde's suggestions and examples (in this thread, or another?) and it really has helped me. Most of that shit is way above my head so far and it's going to be a while before I'm actually posting in here about my own project, but I thought it might give all you guy's strength to know that I'm struggling with the utter basics and you guys are miles ahead of me, so take solace in that. Did any of you guys watch the Unity tutorial things or were you already further along the path of Game Development Skillz? 

 

I'm hoping by watching these videos it will allow me to add in some enemies, projectiles and power ups into the roll-a-ball thing. I know I said that about the Space Shooter, but that thing is way more complicated than I realised. I've got an early finish tomorrow so hopefully I'll be able to spend my day learning some more scripting stuff and playing a load of Diablo III.

 

I watched Clyde's video of your game Jason, as I'm burned out on Unity right now, and thought it looked pretty interesting. It made my head swim (get it? HAH.) thinking about all the scripting, animating and general fannying about you would have to do get this thing off the ground. So here's a vague congratulations on getting that far. I've not played it myself so I won't comment any further and make myself sound like an ignorant ass. 

Share this post


Link to post
Share on other sites

Thanks Dosed! Don't stress about not being knowledgeable about game development, just take it one step at a time and ask questions about whatever you're confused about. Also, I'm an amateur at art, animation and sound, and I do consider myself an amateur in the context of the games that I'm making at the moment, but on the programming and design side I have worked professionally in game dev in the past. So don't think that you need to be making stuff that's as complex to create as SUCKER in order to keep up. You don't actually need to be hitting any kind of bar or "keeping up" - the point of this group is to try to learn, to challenge yourself and to have fun! Whatever you make, it's going to be awesome because you made it.

Share this post


Link to post
Share on other sites

Know what sucks? Making art assets when you're no good at them and don't find a lot of joy in it.

 

I decided to step away from the project I'm more excited about and go with a really simple 2D game. Following some tutorials online, I managed to get movement, collisions, and jumping down. Using voxn's advice and an 1878 illustration set, I created a sprite sheet and managed to get to this: https://vine.co/v/M5eEpP70QQ9  I get excited thinking about what the project will be, but the thought of making all the buildings and environments has got me down. :unsure:

 

Guess I can catch up on podcasts and whatever's on Netflix at least.

Share this post


Link to post
Share on other sites

I just looked at page 9 of this thread. I started using Unity about 10 weeks ago. My previous programming knowledge was a little bit of Python from Code Academy and trying to use Ren'Py. Dosed, I was where you are now in early February; it's now two months later and I am already making shitty games. If you work on learning some Unity every week, you will be able to make shitty games too.

Share this post


Link to post
Share on other sites

Know what sucks? Making art assets when you're no good at them and don't find a lot of joy in it.

I decided to step away from the project I'm more excited about and go with a really simple 2D game. Following some tutorials online, I managed to get movement, collisions, and jumping down. Using voxn's advice and an 1878 illustration set, I created a sprite sheet and managed to get to this: https://vine.co/v/M5eEpP70QQ9 I get excited thinking about what the project will be, but the thought of making all the buildings and environments has got me down. :unsure:

Guess I can catch up on podcasts and whatever's on Netflix at least.

It looks great, the vim with which you hit that space-bar shows that you put some effort into it ;)

Pro-tip, if you don't like doing something, don't do as good of a job as you've done here because people will want you to do it for them too.

Would figuring out how to do a procedurally generated background be more fun than what you've got in mind? I draw a lot of inspiration from my desire to be lazy.

Share this post


Link to post
Share on other sites

I hear you SgtWhistle. But if that's your version of "no good" then I'm in more trouble than I ever imagined.

 

I've got a Unity question, or more of a scripting question in general. I was following the videos along and typing out the code and would often come up against a problem where in the console I would get an error along the lines of "The class defined in script file named "example1" does not match the file name". It took me a while to figure out that when I was copying the code from the tutorials I'd often overwrite the file name at the top in the "public class" section and change it to whatever that was called in the code from the site. However, when I'd go back to change it to match the file name I had originally saved the script as I'd get an error like "there is already a class named such and such blah blah". I tried to replicate the error in Unity just then, but couldn't do it so you'll have to take my word on it. Any ideas? It's not a major issue, but it caused a lot of frustration initially. 

Share this post


Link to post
Share on other sites

The only problem I've had with that is not having matched capitalization or spelling between the class name in the actual script and the script's file name in the project-area in Unity's main screen. They have to be exactly the same.

Share this post


Link to post
Share on other sites

Today I decided to make a door that swings open or shut when you click on it. It is working now, but I had many adventures along the way.

 

 

Share this post


Link to post
Share on other sites

SgtWhistlebotom, that horse looks graceful! I am super excited about jumping around in your game.

 

Berzee, that door falling over itself is hilarious. Did you try just making a simple animation for it instead of having it be a rigidbody physics object? So it's just a static collider you animate opening and closing?

Share this post


Link to post
Share on other sites

I've got a Unity question, or more of a scripting question in general. I was following the videos along and typing out the code and would often come up against a problem where in the console I would get an error along the lines of "The class defined in script file named "example1" does not match the file name". It took me a while to figure out that when I was copying the code from the tutorials I'd often overwrite the file name at the top in the "public class" section and change it to whatever that was called in the code from the site. However, when I'd go back to change it to match the file name I had originally saved the script as I'd get an error like "there is already a class named such and such blah blah". I tried to replicate the error in Unity just then, but couldn't do it so you'll have to take my word on it. Any ideas? It's not a major issue, but it caused a lot of frustration initially.

If you fixed the issue (so that there was only one class with that name), it may have just been Unity getting confused.

It basically builds its own versions of your files and keeps them in memory. Because of some ordering issue, it may not have realised to remove its version of the old class that was in that file.

When stuff like this happens, try going into Unity and selecting all of your source files, then right click and select 'Re-import'. If that doesn't work, try 'Re-import All'. And if that doesn't work, you probably do have two classes named the same thing in your project.

Share this post


Link to post
Share on other sites

I'm not new to it, I've been using 4 for a few months and 3 for a few years, before that I was on Source. I dig Unreal, especially 4. Blueprint is pretty amazing for empowering someone like myself who isn't great at programming to implement the things I want to implement in a reasonably timely fashion

Share this post


Link to post
Share on other sites

Right! Sweet. I'm going to have to play around with UE4 a bit at some point now that the licensing is more indie friendly.

Share this post


Link to post
Share on other sites

Berzee, that door falling over itself is hilarious. Did you try just making a simple animation for it instead of having it be a rigidbody physics object? So it's just a static collider you animate opening and closing?

 

Thanks. :D The reason I added physics to the door was to try and make it push back the player instead of clipping through you while in motion (but I think that's all wrapped up with the out-of-the-box FPS Character Controller and thus not worth worrying about until I'm writing my own one of those). After enjoying the comedy for a while, I got it swinging nicely via this codez in the Update loop (which I presently prefer over learning another Unity sub-sub-menu, though I will surely do that eventually =P):

 

Vector3 hinge = collider.bounds.min;
transform.RotateAround(hinge,new Vector3(0,1,0),90*Time.deltaTime); //rotates at 90 degrees per second

My experience with the doors was strange because when the door fell out of the wall and onto the ground, it felt like a deliberately silly "see how ramshackle this house is?" event that should have a nice creaking audio clip to go along with it, but I knew it was just a happy accident. In conclusion, I feel now that more games should explore the expressive potential of malfunctioning hinges.

Share this post


Link to post
Share on other sites

Appreciate the compliments, but credit definitely goes to the guy who drew the horse. I just mucked around in GIMP a bit.

 

 

Would figuring out how to do a procedurally generated background be more fun than what you've got in mind? I draw a lot of inspiration from my desire to be lazy.

 

Well, the project I have in mind will have some buildings in the background, not just nature. I imagine I'll end up using some random placement code, but I still need to create those buildings, which is the real hassle. Thankfully I have 2 seasons of Mad Men to catch up on while I'm making these things. :)

 

Player movement is also something I've been mulling over. Looking over the project files for atte's 'Big Dog! Run,' they loaded in one huge room at once (7000x480), which I messed around with, but ended up with blurry textures. The other option here is to move the level and environment around the player-  like an infinite runner- and have the level destroy itself as it moves off-screen. That said, I feel like this ends being my problem with my projects: I always envision an element that puts it beyond the reach of making it within a few days (which was the whole point of starting this particular game).

 

Game dev blues.

 

Today I decided to make a door that swings open or shut when you click on it. It is working now, but I had many adventures along the way.

 

Ah ha. I know that feeling of being so close to having a thing done, but then some other part of it is broken in some way.

 

 

today I made a conversation system in blueprint in ue4

 

yaaaay

 

Watch the throne, Bioware.

Share this post


Link to post
Share on other sites

Looking over the project files for atte's 'Big Dog! Run,' they loaded in one huge room at once (7000x480), which I messed around with, but ended up with blurry textures.

 

Game Maker studio (standard) has a limit for how big single image files can be, if it's bigger than that it compresses/blurs the file pretty harshly. I was about to convert the project from 8 to studio but got annoyed. The reason I made just huge images (instead of tilesets for example) was because it was the most comfortable and fastest way to make the graphics. I feel I should try and start to learn and develop more sustainable game making practices but that's why I also like Game Maker cause it let's you mess around and get results quickly.

Share this post


Link to post
Share on other sites

My obsession with creating General Solutions is never so inconvenient as when thinking about branching dialogue trees. It's fun, but boy do you eventually have to lay down some limitations.

(General Solutions is also who I would put in charge of my army, had I an army).

Share this post


Link to post
Share on other sites

Hey guys! I thought I'd get in on some of this action!

 

This is an ugly little prototype of a game I've been working on. It will probably require some explanation...

 

controls: Use WASD to move your triangle

              Use space to shoot your space gun

              Move the mouse around the little circle thing to change your stats on the fly! red is the rate at which you can shoot, green is your speed, and blue is

              your defense

 

This is still in the stage where I'm figuring out mechanics, so it's barely functional as an actual game. For instance, you can't actually die yet.

 

The big idea behind this is that I wanted to create a game where the mechanics can be changed on the fly super-intuitively. Right now I essentially have the mouse's position mapped to 3 variables. I'm just using the variables to change basic game play values, but eventually I'll use them to draw visuals that change on the fly.

 

Things I want to do:

 

Make it so you can die.

Make the visuals of your ship change according to your various stat-values

Make the visuals look nice in general.

Design an actual level.

 

Oh yeah, and I wrote the game in Processing. You can see the code here if you're curious.

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