Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1075929 Posts in 44152 Topics- by 36120 Members - Latest Member: Royalhandstudios

December 29, 2014, 03:58:59 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)How to learn Unity Scripting the best way
Pages: [1]
Print
Author Topic: How to learn Unity Scripting the best way  (Read 3480 times)
Simbyotic
Level 0
*


View Profile
« on: February 06, 2011, 05:39:34 AM »

Hello guys,

Hope all is well with you and your games are coming up nicely.

I know all of you are busy men (when you are not procrastinating  Beer!) so i'll try to be as brief as possible. As of the release of Unity 3.0 I have been dabbling in trying to create something as close to a game as possible.

Naturally, I've been watching some video tutorials about using Unity and been keeping my eye on it's scripting reference section but I can't seem to find a way to learn how to actually learn how to script. What I'm asking is if you can't point me out to the best resources and/or ways to learn how to script effectively on Unity.

I understand if you're to busy to answer or don't want to go in depth about the topic but any words of wisdom would be greatly appreciated.

Thanks in advance  Smiley
Logged
Evan Balster
Level 10
*****


I live in this head.


View Profile WWW Email
« Reply #1 on: February 06, 2011, 06:15:52 AM »

One.  Resolve early on to use Javascript or C# exclusively.  I recommend the latter but it's a matter of taste and circumstance.  C# runs faster and is a more structured and extensible language, while javascript is a little easier to use and is more customized for some of Unity's features.

Two.  Prior programming experience is good.  If you don't have much, you'll need to fool around a fair bit in Unity or in some other tool.  A good "other tool" is Game Maker, whose language is best taught by the included documentation.

Three.  Go through Unity's tutorial project.  I used the Unity 2 tutorial with "lerpz".  This will cover some basic scripting in addition to a wide variety of editor features.

Four.  Fool around.  A lot.  Code little games.  Make keyboard controls for a sphere with physics and get it so you can pilot it around.  Make it so the camera follows it.  Make the controls match up with camera angles.  Foray into new concepts whenever they seem useful or arouse your curiosity and don't be afraid to make mistakes.  (In case you're not very experienced with programming, making and fixing mistakes is 50-90% of the job.)

Unity's a great tool and an experimental learning process will get you a long way.  Don't feel obligated to only program for your dominant project while learning, if it's a large one.  And avoid large projects generally until you're extremely comfortable with your tools.


Good luck.
Logged

Creativity births expression.  Curiosity births exploration.
Our work is as soil to these seeds; our art is what grows from them...


Wreath, SoundSelf, Infinite Blank, Cave Story+, <plaid/audio>
Fallsburg
Level 10
*****


Fear the CircleCat


View Profile
« Reply #2 on: February 07, 2011, 09:23:00 AM »

C# runs faster and is a more structured and extensible language, while javascript is a little easier to use and is more customized for some of Unity's features.

Is it actually true that C# is faster than javascript, when it comes to Unity?  Everything that I've seen seems to indicate that if you are intelligent about the javascript that you write (i.e. don't use dynamic variables) it will be the same speed as equivalent C# code.  My understanding is that both get compiled to Mono, so as long as you don't abuse the javascript it doesn't really matter which one you use. 
Of course, I should probably just do some profiling of it myself, since I haven't seen a rigorous analysis and this is all based on hearsay.
Logged
Gimym JIMBERT
Level 10
*****


NOTGAMER ludophile


View Profile Email
« Reply #3 on: February 07, 2011, 09:27:18 AM »

All your answer here!

http://www.unifycommunity.com/wiki/index.php?title=Main_Page

Especially there:
http://www.unifycommunity.com/wiki/index.php?title=Tips#Scripting
Logged


ILLOGICAL, random guy on internet, do not trust (lelebĉcülo dum borobürükiss) ! GЮЯЦ TФ ДЯSTӨTZҚД!
sonic the heidegger (Überall Geschwindigkeit)
Chris Pavia
Level 10
*****


teknobabel42 aquamanscg
View Profile WWW Email
« Reply #4 on: February 07, 2011, 09:39:24 AM »

As someone said earlier, start small. Really small. Just get stuff moving around.

I started with Javascript because it was easier to learn for someone without much programming experience. There's a lot less (seemingly) arbitrary stuff to remember. It helped me get up to speed quickly, but I eventually switched over to C# because Unity's Javascript couldn't handle some of the things I wanted very well (2d arrays, etc). I also picked up a couple books on C# and Object Oriented Programming so I could improve my overall programming practices, which helped a lot.

If you know any programmers, bug them with questions (but not too much). I've got a couple coder friends at work who have taught me a ton about proper practices, vector math, and a ton of other stuff.

Good luck!
Logged

Simbyotic
Level 0
*


View Profile
« Reply #5 on: February 07, 2011, 03:22:18 PM »

Thank you very much for the help.

About getting to know some programmers and bug them to help me (not to much of course Tongue), I believe TIG can be a helpfull resource for that  Smiley

My goal for this month is getting a prototype for the game I have stuck in my head. Just a script that makes my character go up and down (as in floor/roof/floor/roof) when I press the spacebar. Something simple.

Be well.
Logged
Hima
Level 4
****


OM NOM NOM


View Profile WWW Email
« Reply #6 on: February 07, 2011, 08:53:08 PM »

I learn from Unity's official example and non-official wiki. The wiki explain almost everything in details and it's very good for knowing overview of how scripting in Unity works and is structured.

I think it's this one. http://www.unifycommunity.com/wiki/index.php?title=Main_Page
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic