Learning UnityScript...

Hey all… OK so I want to Learn UnityScript or Javascript for Unity, and try to get away from using Assets and Modifing Pre-Written Code to get what I want… (Sooo hard to do, as the Asset Store is like Coffee or something equivalent of an addiction lol)

anyhow… I would love to get my hands on a full length training video, or even take a class that walks me through how to code a simple 3D Game from scratch using Purely UnityScript (javascript)… I’m really looking for a “How to Create a Basic Third Person Shooter / Melee Game” from scratch…

I’d like to learn everything from…

  1. Camera Setup
  2. Player Setup
  3. Basic Bot AI
  4. Setup Health System (with Life Bar)
  5. Attack Bot / Kill Bot
  6. Take Damage / Die

I think that about covers some Basics I should Learn and Start with… Anyone know of any Good Tutorials that can Walk me through something like this…?

Note: I know some of you may have some different opinions of what I should start out with… but part of learning is knowing what kind of learner you are… Me I need to just dive in and get a bunch of information thrown at me then I ask questions and figure out why this does this or why that does that or why we need this or that… and i’ve always learned best that way… if i just start with something boring and really basic i’ll fall asleep lol! So If get a walk through of how to do what I want to learn and if there is something I don’t get, it will force me to go back to and search for the answer and i find I never forget things this way…

anyhow hope someone can help! = )

Is there any particular reason you’re going with UnityScript?

Its fine if that’s what you choose, but C# is more universal (not just restricted to Unity). Also, all of the tutorials I have personally used were all for C#.

from what I have seen of Javascript so far I like it… seems easier for me to learn / understand than C# at this moment being that I have almost zero game programming experience other than being familiar with HTML / CSS for Website stuff… also I have read that Javascript is a little easier to learn than C# for noobies…

I don’t think that’s true. Especially in the beginning, the two are almost identical. The only real difference you’re likely to see is in the way variables are declared.

I used UnityScript for a LONG time and I am so glad I have now transfered to C#, just because it is used so much more outside Unity.

But I wish I started with C# because as much as people say the transition is easy, once you get too accustom to a way of doing things, it is alot harder to change.

UnityScript does not just change with the declaration of variables there are many things that have more complex and less flowing syntax in C# than US.

for example: http://docs.unity3d.com/Documentation/ScriptReference/GameObject.GetComponent.html

Hmm I was hoping this would not turn into a debate about which is a better to code in… I’m honestly not really concerned with that argument at the moment. The fact is you can code a game in Unity using UnityScript, and if its easier or harder to learn or better to use or not is really for me to determine honestly…

I appreciate the feedback on what you think is better for me to use, but when I look at both c# and UnityScript I feel UnityScript makes more sense to me… I don’t really have a good example to show you but that’s just my experience thus far from using Assets that were coded in both and me digging around learning what I need to modify to do what I want to do and I found UnityScripy easier to play with and understand…

I don’t believe in better or worse… There are pros and cons to everything and I’m sure there are some die hard UnityScript Coders in here that will say UnityScript is better to start with… But Again i don’t care about that I just want to get started with what I think will be easier for me to learn…

See, I was a diehard UnityScript guy, who believed there was no difference between the speed etc of UnityScript and C#

I then transferred over to C# and really, the transition is hard, so I would suggest using C# as I felt EXACTLY the same way as you, so I’m telling you from previous experience.

Not saying US is bad, it served me well for a long time, but there is a real lack of “professionalism” if someone asks what language you use and you say US rather than C#

That said, while I would suggest C#, do whatever you see fit.

EDIT : Big plus for C#, documentation is more widespread and if your using mono(would recommend using something else) it will actually not bug out(like in US) and C# you can also use Visual Studio <3

Sorry. I was trying to be careful with my wording so as to avoid this kind of debate. As I said, its entirely up to you, and if you’re more comfortable with US, then more power to you. I would just really like to help you find some good tutorials, but I’m afraid I don’t know many for UnityScript.

Good luck!

If you want to go with US, then the Walker Boys tutorials are probably a good place to start.

http://walkerboystudio.com/html/unity_training___free__.html

I started with UnityScript as well, about a year ago with no prior programming experience. But after a few months I decided to learn C# (for reasons mentioned above) and I don’t regret it even though some things are less straight to the point to achieve. Still, it’s up to you to make the decision I don’t like to argue with that and I don’t think anyone should.

Btw, the Walker Boys tutorials are great if you want to learn US.

If you are fixed on using UnityScript, then you could use the TornadoTwins tutorials on youtube ( http://www.youtube.com/user/TornadoTwins ).

However, I, like everyone else, suggest that you learn C# if the only reason you prefer UnityScript is because it looks easier. I tried learning UnityScript on my own without any prior programming experience, and it didn’t go so well. After a few semesters in school I learned C# and honestly it is a world of difference. Not only is there C# documentation and tutorials EVERYWHERE, but you can use C# outside of Unity for your own purposes.

I haven’t delved into UnityScript again, however, knowing most of C# at least up to OOP features is much easier and powerful. Once you learn how classes and objects work in C#, then all you need is a handy C# pocket guide and the Unity Scripting Reference.

Just my two cents, I think you should choose what you want, but it would suck if you learn C# a year from now and you end up liking it a lot more than US.

Thanks All! I am curious then… If UnityScript is as bad you all make it seem why then did Unity create there own language? You would think it would make more sense to use the native language of a Game Engine but you all say no its not.

I’m curious then what exactly is the advantage of using UnityScript over C# then, and if it will continue to be supported by Unity in the coming years with so many of you switching over to C#.

Although even with these valid points made I’m still curious to learn UnityScripy first anyway… I think I’m pretty set on that… but it’s obvious that there is something to be said about so many going from US to C#…

I do feel everything still has its pros and cons and you all stated alot of pros for using C#, but there has to be some pros to using UnityScripy aswell…
for starters I keep reading that C# is very strict, while US is much more forgiving… I get the impression that I can write something that kinda makes no sense in US and it would still work lol! buy aside from that there has to be some other advantages… and since I’ve already heard from all the C# fans I’m curious what a US user would say… and I mean someone who actually has experience using both and can make a sound judgement of why thy use US over C#.

I think it’s already to late to avoid the debate lol!! So UnityScript users where are you??? Lol! (if any exist that is lol)

Unityscript isn’t -bad- and I’ll still use it for rapid prototyping purposes, but C# will help teach you a lot of better coding practices and it’s FAR easier to access functions from other scripts. A great example of this is with stuff like UniTile. If I want to be able to access anything from the assetstore version, I’m basically stuck with having to shift files to the Standard Assets folder if I want to be able to manually access map data.

C# seems daunting at first, but it’s 100% worth learning. Get ready to deal with the Garbage Collector though.

LOL! what is the Garbage Collector, maybe I might not want to learn C# becacuse of this scary sounding Garbage Collector

I say learn ultimately C# sooner or later. If you need to call any UnityScript stuff in C# and vice-versa, put either scripts in Asset/Plugins folder.

This kind of discussion again -.-

Show me one game that is any better just because it is made with C#. You can´t. Better graphics? Not C# dependant. A feature that can just be done with C#? There is none. A performance boost because of C#? Nope. Same performance for all three languages. All three languages are valid choices. You can do the same game with all three languages in Unity.

The OT has asked for help in Js. He has NOT asked to be convinced to C#. So please leave him alone. It`s his decision.

When you folks feel that you need to continue the eternal discussion of C# vs JS , then grab one of the threads where this was discussed to death a thousand times without any conclusion already. That`s the place for it. Not a thread where somebody asks for explicit help with Unity´s JS.

Kuroato, i would suggest to buy one of the available Unity books. Most of them are made and written in Javascript. Search at Amazon for example.

Thanks Tiles… I will say I don’t personally feel like i’m being attacked or anything for wanting to use or learn US by these recent replys… I think everyone is lightly sharing their experience but are yes still pointing me in the direction of C# instead of US because of their experience.

I did share above I do think there is something to say for so many people moving over to C#, such as “C# being more universal” so if for some crazy reason Unity was no longer developed which I highly doubt will ever happen, but if it ever did… I could take my C# experience here and move it over to another Engine. That’s probably the only valid point I see for choosing C# over US… which makes total sense me and does have me thinking a little already (i have to be honest), so I do appreciate everyone feedback.

I will just have to dabble with both a bit more to see which I feel is truly for me…

You still can, even when you learned JS first. Unitys JS and C# are not this massive different. One of the Admins has put it this way once: think about Unitys JS as a C# with Javascript syntax. Once you learned the concept you should be able to do the jump to another lanugage in relative short time. It`s just not necessary inside Unity. Here you can use what feels better for you. You have the choice between three valid languages.

Yes. Test it. There goes nothing over own experience.

Yeah honestly I’m with tiles on this one. The OP has already stated that he wants to use unityscript, which one is “better” is irrelevant. Personally I’ve been programming my game in unityscript for about 10 months now and never have I thought to myself damn I wish I used c# instead. In the context of Unity, c# is mainly “better” because its usable in other places but as far as making games in unity goes, US will serve your purposes well enough.

OP I would highly recommend Sue Blackman’s book. Its all in unityscript for one thing. It shows how to make a point and click adventure game, which might put off some people, but the brilliance of it is that most of the stuff in there can be applied to other games as well. For example, she covers how to save and load data to/from text files (my own data saving system is based on it), how to make inventory systems, gui menus, a procedural maze, handling objects states, etc. Basically there’s a really wide range of stuff that gets covered, that you don’t often see in other tutorials. Its also a 100% complete 3d point and click game and its in first person view, it can be easily be modified into a shooter (so for example you could modify it into a fps with rpg elements)