Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by DayyanSisson · Nov 02, 2011 at 10:06 PM · javascriptlearningadvancedlearn

Learning Scripting (Next Step)

I've been learning scripting, and I feel that I have a pretty good knowledge of scripting. I know things like :

  1. Variable Types

  2. Different Functions and Purposes

  3. GUI Functions, including Working Buttons

  4. HUD - Health Bar, Energy Bar, Ammo, Speed

  5. Instantiating

  6. Accessing Rigidbodies (Just a little)

  7. Accessing Variables from other scripts

  8. Basic Script Optimization

  9. If, Else If, Else...

  10. And more around this level......

Somethings I know I don't know about are :

  1. Raycasting

  2. Arrays (I have basic understanding)

  3. Loops

  4. Enums

With that, I can write scripts such as :

  1. Shooting

  2. Ammo

  3. Movement

  4. Bullet Scripts (Audio, Damage, Colliders)

  5. Damage Recievers

  6. HUD

  7. Quitting, Pausing, & Loading Levels

  8. More...

So I have all this knowledge... what's next? Are there any tutorials for learning advanced or even intermediate scripting? I've looked at plenty of beginner tutorials, I've read books, I've gone around the internet, and I haven't found a tutorials that can cover many subjects and help me learn. At this point, what I'm doing is using Unity Answers to help me solve my problems, and I start to learn how to do things that way. I've gone through the Unity Manuals. What should I learn next, and how should I approach learning it? This question has bothered me for a long time, and I need to make my scripts more efficient, have improved capabilities, and even have functions that I couldn't put in my scripts before. If you would like me to post up one of my scripts so you can gain a better understanding of my understanding of UnityScript, then ask. Thanks.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image syclamoth · Nov 04, 2011 at 04:46 AM 0
Share

I'd say now you should try actually making a game! Try co$$anonymous$$g up with a game that you want to make, and apply the skills you've learned!

I must say, you're doing things in the right order- as opposed to most of the people who post here, who try to make a game without first knowing the basics...

avatar image gfr · Nov 04, 2011 at 06:27 AM 0
Share

Loops and arrays should definitely be next on your "to learn" list - without knowing those two properly you will write horrible and time-consu$$anonymous$$g constructs that are completely unnecessary ;)

avatar image DayyanSisson · Nov 04, 2011 at 04:36 PM 0
Share

I'm in the process of making a game, but there are some features I don't know how to do, such as counting the number of enemies the player has killed, or locking on to a certain target. For example, I'm flying and I want to lock on to a target and fire a ho$$anonymous$$g missile. Well I have a basic ho$$anonymous$$g missile script, but it will only lock on to a target with a tag, not a specific target. I'm trying to get a better of understanding so maybe I can figure out that question myself before using Unity Answers.

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Tseng · Nov 03, 2011 at 06:56 PM

Yea... one thing you haven't listed is OOP programming. It's not only important to know how to use the API, but also to know the basics of OOP.

  • Interfaces

  • Polymorphism (deriving classes)

  • Singleton pattern (quite important in many game projects, to have a global instance which can be accessed without having to using GameObject.Find

Since you haven't specifically named which of the 3 languages you're using to learn Unity development, it's hard to give exact hints.

This below is more or less C# specific (which is much more powerful language to do Unity3D development than UnityScript or Boo)

  • Generics (i.e. using ArrayList or learning how to write your own generic methods & classes)

  • Events & delegates (delegates C# only)

  • Lambda methods (i.e. myClassArray.Sort((o1, o2) => o1.myVariable.CompareTo(o2.myVariable));)

  • LINQ

Then there are of course other, non language specific stuff, but still usefull:

  • Serialization (putting values from classes into a string, xml or binary file and reading it back, useful for loading/saving games)

And last but not least (something you can't learn from a tutorial): Experience. You will only learn to do something right by trying it out and then (days or months later) you'll notice the flaws of your design and improve it next time. That's something you can't learn by reading books etc., that's something you have to experience yourself.

Comment
Add comment · Show 10 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DayyanSisson · Nov 04, 2011 at 03:43 AM 0
Share

I'm using Java specifically, as I've only started learning scripting about 3 months ago, and I heard that Java is the easiest to learn. Should I learn C# ins$$anonymous$$d? Do yo know of any tutorials that covers any of that.

avatar image syclamoth · Nov 04, 2011 at 04:45 AM 0
Share

C# is closer to Java than Javascript is. Learn C#, its more powerful.

avatar image gfr · Nov 04, 2011 at 06:39 AM 1
Share

Apparently JavaScript was meant - it's amazing how many people mix up Java and JavaScript.

@Tseng: A complete side-note, but it's very rare that you actually need singletons. Usually you just want to access one global instance, while singletons are for the rare case that you can't have more than one instance of it around. Some more details here.

avatar image Tseng · Nov 04, 2011 at 01:03 PM 0
Share

Sigh... had posted a big comment why singletons are useful if you know how to handle them... but it got lost.

Whatever, Singletons are very useful, for example for the general game controller (which handles everything from current level, pause, etc), for scores (where you can access your score class from everywhere w/o having to search, check and instantiate it if it doesn't exist (specifically if you start a given level in the Editor, without going the typical process of mainmenu > select/load level) or if you make a Pool class which recycles your objects.

All of them can easily be accessed like

Score.Instance.CurrentScore += 100;

The Instance Property will check if it was already instantiated and instantiate it if necessary. No Variable for "Score" to hold, no checks, no lookups. Easy and clean.

avatar image gfr · Nov 04, 2011 at 02:22 PM 0
Share

With that you basically have one lazily created global variable (doesn't really matter wether you access it as Foo.Instance or Globals.Foo), not a need to enforce that you can only ever have one instance (i.e. private constructor etc.). :)

Show more comments
avatar image
1

Answer by wccrawford · Nov 03, 2011 at 01:59 PM

You've gone beyond all the Unity-specific tutorials now. You should start studying more generic programming arts such as Design Patterns, and apply them to UnityScript.

Other than that, just practice, practice, practice. That's how every programmer gets better at what they do... That, or find a mentor.

If there are any local Unity groups, joining them can help improve your skills as well.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UNITY3D: TEXTFILE I/O : Don't write same things 0 Answers

[Javascript] BCE0011 'Boo.Lang.Compiler.Steps.SaveAssembly' 1 Answer

How to make a List Constructor? 1 Answer

Can I convert unityscript to boo? 0 Answers

get all text between two chars (js) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges