Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Are there any scripting examples that are not targeted for beginners?

Discussion in 'Scripting' started by 511, Apr 27, 2015.

  1. 511

    511

    Joined:
    Nov 18, 2012
    Posts:
    55
    I downloaded all the example content and I went though some of the stuff in the "Learning section" but it seems most if it is targeted for a complete beginner.

    I am wondering if there are any blogs or examples that teach you best practices? I saw that there once was unitygems but it seems to be down.

    Maybe there is something in the asset store that ships with high quality source code?
     
  2. hamsterbytedev

    hamsterbytedev

    Joined:
    Dec 9, 2014
    Posts:
    353
    Youtube has a ton of videos that you can watch on various topics. If you want some more advanced topics you can look into singletons, coroutines, finite state machines, polymorphism, events & delegates, etc.
     
  3. 511

    511

    Joined:
    Nov 18, 2012
    Posts:
    55
    That is not what I meant by "advanced", I am not talking about language features or API features. I am more interested in a medium sized project that is very well designed. Something like the ShooterGame example from Ue4(even though the code quality could also be better).

    There seems to be a project called UFPS that seems to be popular in the asset store. Does anyone know how well it is written?
     
  4. hamsterbytedev

    hamsterbytedev

    Joined:
    Dec 9, 2014
    Posts:
    353
    Dismantling source code is like looking up the answers in the back of a textbook; you don't actually learn anything. Instead you stand on the shoulders of others who have already done the work for you. If you want to learn more advanced topics and how they can be applied to your own projects then any one of the things I mentioned is worth looking into. That being said, if you have $95 to spend on UFPS, it is well worth it for all the time it will save you in creating your own first person shooter game. It is very well written and uses many advanced techniques. Again, you won't learn anything, but if you are already confident in your scripting abilities it's a huge head start. Good luck :)
     
  5. 511

    511

    Joined:
    Nov 18, 2012
    Posts:
    55
    Haha I think we might have some very different opinions. I learned a lot in the last past 3months going though the unreal source code.

    But then again everyone learns differently.
     
  6. hamsterbytedev

    hamsterbytedev

    Joined:
    Dec 9, 2014
    Posts:
    353
    I suppose that is true, but in my personal experience doing things the easy way has never taught me or anyone I know anything that they actually retain. It's the same principal as remembering phone numbers; nobody remembers phone numbers anymore because they know they can access that information at any time with a few taps or clicks. The same principal applies to everything. Convenient access eliminates the need to learn the information for yourself and inevitably you are reliant on google searches and regurgitating the work of others. I've met a lot of copy/paste coders and they all got that way by skipping the rudimentary stuff because it was "too easy" or "too boring". Be cautious in getting too far ahead of yourself.

    I mean no offence by this, but whatever you have gleaned from Unreal in the last 3 months isn't even a small fraction of what is available or even what you will need to script a complete game from scratch. My advice: start small and work your way up to something on a larger scale(like a first person shooter) as you learn more about what is possible and how to accomplish that on your own. This is especially important if you intend to cultivate any sort of career in software development. It takes years to become a good developer and a great developer never stops learning; languages are always evolving and you have to know the basics to stay on top of the new features that are being implemented.

    Again, best of luck to you and I hope you do well! :)
     
  7. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    From what I've seen of it, UFPS is meant as the basis of an FPS, not a stand-alone thing. Their demo scenes are probably not very well fleshed out.

    Sadly, from what I've seen, there's no large open source Unity games out there. Your best bet is probably to download one of the official projects (like the 2D rougelike), and skip the tutorials.
     
    hamsterbytedev likes this.
  8. 511

    511

    Joined:
    Nov 18, 2012
    Posts:
    55
    Yeah I have already done that but they are only useful for getting the general feel of the engine. I think I will create a simple game as best as I can and make it open source to get feedback.
     
    hamsterbytedev likes this.
  9. hamsterbytedev

    hamsterbytedev

    Joined:
    Dec 9, 2014
    Posts:
    353
    That's a good idea to get started. :)
     
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    Opsive's Third Person Controller has good code design and covers a lot of advanced Unity features.

    You can also glean a lot of insight from published API documentation. Feel free to browse through the API reference for Love/Hate and the Dialogue System, which are heavily documented. A lot of other code projects on the Asset Store also have their API references on the web.