green-game-farm
green-game-farm
Farm
20 posts
This was for a game I was making. For now, it's for little techie tips and tricks.
Don't wanna be here? Send us removal request.
green-game-farm · 10 years ago
Text
Fast VS Gaussian
You throw a Gaussian Blur on footage the exact size of your composition. All’s good... until you see that the edges are now feathered and your background’s naked pink butt’s showing. Mother, what’s going on? Simple, G’ Blur doesn’t have what Fast Blur does;
Tumblr media
Check that box, end the crisis.
0 notes
green-game-farm · 11 years ago
Text
Having trouble rigging in AE?
http://www.youtube.com/watch?v=qpgQasDmhI4 This is almost too good to be true. Uses Duik.
Collapse Transformations AFTER rigging (doing otherwise messes up your Bones positions).
The Puppet Tool apparently creates meshes for each part of a single graphic separated by gaps.
0 notes
green-game-farm · 11 years ago
Text
For whoever's reading this, no, I'm not dead. Been busy with work so there hasn't been too much time left for game dev' for a while. I'm trying my best to work on mess around in Unity whenever I get the chance to and here are a little somethings that I thought were neat in Monodevelop.
Command + Shift + | shows you where your (typing) cursor is with a little pulsing box.
#region regionName // #endregion C# regions don't seem to fold within Monodevelop but take a look at the top-right corner of the window and you should see a drop-down of all your regions.
Control + I (eye) auto-formats your code.
0 notes
green-game-farm · 12 years ago
Photo
Tumblr media
Haven't had the time to update recently due to work but I got some time yesterday so I thought I'd churn out a 2p shooter! Animations in Unity were a bit of a pain to work with (more than the animations were to make) and Unity has this weird thing it does where it just doesn't wanna update the scripts no matter how many times you restart the thing. Anyway, the thing works pretty good as is aside from the weird camera and some collider issues. Can't wait to implement health and all that good stuff! Note to self:
When dealing with Unity's Animator, always add one animation at time. Don't abuse the "Any State" (state?). Add the animation, link up the states, test. If broken, fix. Or else, proceed.
When trying to Instantiate a function in the opposite direction, try the Quaternion argument in the Instantiate function. In the case of the shooter I made, to make the bullets fly to the left instead of the right, I used Instantiate (yourFunctionName, vectorPlacement, Quaternion.Euler (0, 0, 180)); , rotating the function around the Z axis. This messed up my setup to destroy the bullet after some distance travelled so I swapped it for another that uses Time.time instead.
When building for 32-bit Windows XP, go for x86. Not x86_64. And always remember to share the build with the Data folder that came with it.
0 notes
green-game-farm · 12 years ago
Photo
Tumblr media Tumblr media
It's that time of the new Chinese year again and I've been spending the past few days cleaning. Gotta let visitors know people actually live here. Anyway, in creating a floating platform that rises (transform.Translate) when stepped on, I discovered that Time.deltaTime breaks the OnCollisionExit2D function. Also, in order to have transform.Translate work, the object requires an 'enabled' collider. I also had this weird problem where the Player's collider would get stuck on the edge of colliders due to the Player's velocity. A simple enough solution was to create a Trigger collider for every platform, and arrange them just above the platforms. Through script, each Trigger would enable is own specific platform collider when the player jumps close and high enough to it, and disable it when the Player jumps off. Not only does this solve said problem, it also lets the character walk in front of certain platform areas which would have been held by colliders which didn't need to be there at the time! Note to self:
Setting temporary variables for things like Camera.main.transform in the Start function only holds values assigned at that one time.
1 note · View note
green-game-farm · 12 years ago
Text
So I've been messing around with Unity's Interactive Cloth module trying to make long streaky flags flapping in the wind with less than satisfactory results. The flags came out looking like strips of post-chewed gum dangling in the X axis with no changes in the settings making any noticeable difference. No one on Unity Answers seems to know much about this but here's what I've found out so far:
When exporting custom FBX meshes for the cloth, try to go as low on the polycount as you can, and leave the "triangulations" to Unity. This helps to give the result a less gooey look.
Stay away from using Gravity on it unless you plan on eventually turning the 'wind' off. It seems to be more trouble than it's worth as it can really screw up the flag in Y.
Upping the Thickness seems to freeze the mesh starting from polygons closest to the Attached Collider, working its way up to the last as it increases.
This is what I have so far.
Tumblr media
0 notes
green-game-farm · 12 years ago
Photo
Tumblr media
Well, fuck.
0 notes
green-game-farm · 12 years ago
Photo
Tumblr media
Apparently, Unity2D doesn't care if you place sprites at different Z positions, colliders that find each other on X and Y will still work. Good thing... maybe?
0 notes
green-game-farm · 12 years ago
Text
To access one script from another on the same object:
NameOfScriptToAccess anyNameYouWant; anyNameYouWant = GetComponent <NameofScriptToAccess> ();
If statements don't always need curly braces:
if (Condition)           Do.Something ();
I used this to make panning controls for the Main Camera that jumped back to the player! Level up!
0 notes
green-game-farm · 12 years ago
Photo
Tumblr media
Prototype #1.0000000000000001!
0 notes
green-game-farm · 12 years ago
Photo
Tumblr media
This seems rather interesting.
1 note · View note
green-game-farm · 12 years ago
Photo
Tumblr media
I'm so sorry Mr. Blow.
0 notes
green-game-farm · 12 years ago
Text
What's the point of all that code if you can put pictures on it? Make 'em pretty!
Note to self:
if (bool == true) {} = if (bool) {}
0 notes
green-game-farm · 12 years ago
Photo
Tumblr media
I won't believe myself when I look back at this trying to convince myself how hard the controls were to make. Yes, it's a replicate of a tutorial, but having just started learning C#, making sense of the code had me drained (and I still don't have it down). Learning about customised controls was a big win though! Maybe one day I'll graduate from standard control functions and get to apply all this. Notes to self:
Mathf.Sign Any positive number (and zero) will be returned as +1, while any negative number will be returned as -1.
return (n)? a : b; If condition n is met, return a, else return b.
0 notes
green-game-farm · 12 years ago
Photo
Tumblr media
Well, would you look at that? *ahem* PEW PEW PEW PEW!!!!!!
0 notes
green-game-farm · 12 years ago
Text
A C# tutorial done right. It's sharpening time!
http://www.youtube.com/watch?v=48anhmWxT54
Just in case: To replace the default transform (apparently the name of the object the script is applied to) with a name of your own:
Create a private Transform (private Transform aNewName) variable outside void start() and void Update().
Assign transform as the value of the variable (aNewName = transform).
Proceed the use your newly assigned name in place of transform, for example: aNewName.position.x, aNewName.Translate ();
0 notes
green-game-farm · 12 years ago
Text
Diving into Unity? Wanna go the C# route but all the good tutorials are done in Unity Script? Here's a gem showing the difference between the two. http://answers.unity3d.com/questions/12911/what-are-the-syntax-differences-in-c-and-javascrip.html
2 notes · View notes