Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Anyone here a completely crap coder like me?

Discussion in 'General Discussion' started by Amon, Oct 28, 2020.

  1. Amon

    Amon

    Joined:
    Oct 18, 2009
    Posts:
    1,366
    I can't code. C# scares me and unity and how it has become has completely overwhelmed me. It's not unity as it was donkey years ago.

    C# is just a nightmare for me to try to get a grasp of. Anyway, currently Bolt seems to be the VS of choice as unity own it now so off to Bolt I go.

    Anyone else here struggle because their coding skills are that of a goat walking backwards?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,580
    @Amon Since you are long member with us on this forum, assuming you have been using Unity for a while since, why didn't decided, move to Unreal with its blueprinting? Wouldn't be something more suitable for you?
     
  3. Amon

    Amon

    Joined:
    Oct 18, 2009
    Posts:
    1,366
    Never thought of that. I've not used unity in a long while. A lot has changed. Unreal is a may be but then if i struggle with one system it's no going to be a cure moving over to another. I've got to dig my heels in like I did when I first discovered unity near 15 years ago I think.
     
    BrandyStarbrite likes this.
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,134
    Is it the code itself that you have trouble? Or is it the principles behind programming? Because the former can be solved by switching to a visual scripting language but the latter won't necessarily be easier.

    Being primarily a programmer I'm very comfortable working with code, and yet I found working with Blueprint to be a fantastic experience. I was able to very quickly build a character controller that was able to switch between first and third person modes within a reasonable time frame after having spent only a few hours learning Blueprint.
     
  5. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,797
    I've been coding in C# since 2001 on .NET Framework 1.0, but with all the 'best practices' architecture books, coding experts, mixed opinions, terminology, principles, patterns, anti-patterns and arguments going on, sometimes I just feel like I've barely touched the waters and don't really know what's going on :rolleyes:

    I just get stuff done and try to make my code easy to read, and add comments where stuff doesn't make sense, and hope for the best, in fear that one day a Martin Fowler or someone will peruse my code and throw up all over his keyboard..
     
  6. Unscriptableeee

    Unscriptableeee

    Joined:
    Apr 14, 2020
    Posts:
    12
    Unity's tools may be more suitable for them and switching to a new engine requires you to learn how the tools work and how their blueprint system works as well. But I haven't looked into Unreal a lot so maybe it will be worth it in the long run.
     
  7. Unscriptableeee

    Unscriptableeee

    Joined:
    Apr 14, 2020
    Posts:
    12
    "One of the most common causes of failure is the habit of quitting when one is overtaken by temporary defeat."
    -Napoleon Hill.

    I would suggest focusing on learning one thing at a time, and while it may be hard to keep it real as we usually want to be able to learn everything overnight I would try to avoid it as it could lead you to lose motivation to keep going.
    When I learn new things especially in programming is that I will not proceed unless I can explain what the feature does
    I also write down everything I've learned and then also create a project or asset that uses all techniques that were taught in the tutorial or course after I've finished it. This is very effective and has never failed me, however, you need to be very passionate to keep this up.
     
    ModLunar, Rewaken, lorenalexm and 5 others like this.
  8. Amon

    Amon

    Joined:
    Oct 18, 2009
    Posts:
    1,366
    I like this post. Thank you.
     
    Masdox33 likes this.
  9. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,877
    @Amon Have you considered trying out Bolt which is now free for unity?

    It might help to try learning Unity and programming in unity visually at first without getting bogged down with the massive information overload that comes with learning programming principles + C# language specifics + Syntax + Unity API.

    Bolt will get you programming quickly, and then you can take what you learn from it and slowly progress into writing scripts. You can mix and match too so you can slowly add more and more code into your existing project that is built on top of bolt.

    Its free in the asset store, please give it a go and see if its your thing! Its basically the current answer to blueprints in unity, and over time it will get more performant now that unity is making it internal.

    If you do that and combine it with the approach to learning that @Unscriptableeee mentioned in their post, I think you might find working with unity quite refreshing again :)

    That said Blueprints in unreal is pretty cool and you might find unreal more to your liking if you try out bolt and that is still not your thing.


    EDIT: Also definately go through https://learn.unity.com/course/create-with-code if you have not yet. It was not available back in the day when we were learning, but its probably the best introduction to unity, C# etc that I have seen - and its fun to follow!
     
    Last edited: Oct 30, 2020
    Amon likes this.
  10. Amon

    Amon

    Joined:
    Oct 18, 2009
    Posts:
    1,366
    That is great advice, thank you. Starting with bolt now. :)
     
    JoNax97 and MadeFromPolygons like this.
  11. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,877
    Thats great @Amon let us know how you get on :)
     
  12. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    @Amon I would suggest either Playmaker or GameCreator which are both easier than coding
     
  13. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,877
    They are paid and 3rd party, Bolt is a officially unity-owned solution and being made internal - its also free. I would always recommend that over a 3rd party asset.

    I have used all 3 and all 3 can be used to make things, but I would say bolt is better moving forward in terms of official support etc.
     
    Ryiah and Amon like this.
  14. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    I agree that it's built-in and it's free, but if he is struggling with coding Bolt is infinitely harder

    Bolt - built into unity now but has some bugs and although visual it's harder than the other two

    Playmaker (on sale frequently) - very easy to understand, can have a few minor limitations (would need code for)

    Gamecreator (on sale 1-2 times a year) - even easier to grasp, limited to premade functionality and/or module addons (seperate purchases)

    My suggestion is for @Amon to try bolt (since it's "free") and if that doesn't seem like a good fit then to watch videos on the other two and pick one
     
    Amon likes this.
  15. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,877
    I feel I should mention playmaker is specifically for FSMs, and game creator has the limitations you have mentioned. Bolt does not have said limitations.

    For sure all are viable and as you said, if OP cant get on with one they should try the others. But I disagree that bolt is harder in any way, that just tells me you did not find the right learning resources. I hear a lot of people arguing that one of these 3 is easier / harder all the time and truth is they are all as easy or as hard, but everyone approaches them differently.

    I think with the right learning resources all 3 are as easy to learn as each other and all 3 are very different in capabilities. So it will mostly come down to what OP is trying to do with it and what resources they use to teach themselves.

    I stand by the idea that the "create with code" free course here is the best set of videos to actually teach you the unity API, and you will need that no matter which of the 3 you choose OP if you ever want to do more than use a visual framework to build things.

    I would go through that course first and then try out bolt and other visual programming tools, as you need that knowledge to get started really regardless of the tool you use :) And as I said its super fun and not that scary at all!
     
    Ryiah and digiross like this.
  16. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,134
    Once you've learned the user interface which is not at all intuitive. With Bolt you simply attach a component to the object you want to script, open it up and start laying out your script. With Playmaker there is a fair bit of setup with each script that needs to be performed in-between attaching and laying out the script.
     
    Amon and MadeFromPolygons like this.
  17. Amon

    Amon

    Joined:
    Oct 18, 2009
    Posts:
    1,366
    I've just spent some time with Bolt. This is definitely a game changer for me.
     
    digiross and MadeFromPolygons like this.
  18. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,921
    If you could use the old UnityScript, C# isn't that much different. The problem is all of the junk around it. C# blogs go nuts for new features, but they're mostly useless. And most blogs and even the microsoft site are terrible at explaining things. They seem really deep and make you feel like you know nothing, but they're really just flailing to explain something they don't understand themselves. Visual Studio makes suggestions to use stuff you've never heard of. But it's just programmed to suggest the newest features. Stick with loops, ifs, functions, arrays ... List's are nice ... and you'll be fine. You're not missing out.

    Well, function-variables are nice. Things like: Action<int,int> f = n=>{ return n*2 }. Those seem complicated, but only because it took C# so long to make them work. The old partly broken versions which are still in C# and explanations jumble them together. They're bad at explaining. Functions-as-variables isn't a hard concept.

    It's almost like C# tries to make itself seem complicated. But it's not. If you want to program C# the same way you'd write UnityScript, it will be fine.
     
    MadeFromPolygons and Amon like this.
  19. Amon

    Amon

    Joined:
    Oct 18, 2009
    Posts:
    1,366
    I have to say something about your post. It's actually so correct in how I feel and perceive C# that it's spurred me on to try again with C# coding.

    I like this part, also as it's 100% true.
     
    MadeFromPolygons likes this.
  20. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    406
    I have worked professionally as a programmer since 2016 but I still know very well how terrible I am, however I manage to get working results and time is short so it works out.
     
    angrypenguin, Amon and adamgolden like this.
  21. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    The obly none useful addition in recent years is the default interface implementation feature in c# 8. Other than that I use them all.

    Your example should be Func<int,int> f = n=> n*2;
     
  22. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,921
    Ha! Thanks. That's a good example of what I meant by "bad at explaining"!. Any normal person trying to explain in-line "no-name" functions would use the basic version: (n) => { return n*2; } and say "put the function inputs in parens, but without types; followed by a "=>" that has to be there; then write the function as normal". But C# explainers can't help making it confusing. They just have to explain it _with_ the limited-use shortcut, and not even tell you the normal rule.

    "Default interface implementation" is another good example. Blogs and microsoft say it's "a feature that allows you to safely extend an interface". No. That's 1 thing you can do with it. It's not what it is and it's a terrible way to explain it. The old rule was "interfaces have just functions with no bodies". The new rule is "interfaces have just functions which are allowed to leave out the bodies".
     
    EternalAmbiguity likes this.
  23. MDADigital

    MDADigital

    Joined:
    Apr 18, 2020
    Posts:
    2,198
    No a normal person would use the default version without redundant stuff. It's easer to read, less noise. Same reason why var is better, less noise.
     
  24. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    855
    I love using lamdas (which create anonymous functions at compile time), but I agree, they can very difficult for junior programmers and those learning to comprehend the logic which can scare them away.

    Anyways, there is also Cat Game Builder which is very easy and Logic Forge (which is now free: https://assetstore.unity.com/packages/tools/visual-scripting/logic-forge-55975) It is more flexible then Bolt and can generate C#. This can be a great learning tool, as well. I would recommend this over Bolt, IMO.
     
  25. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,877
    In what way is it more flexible than bolt? I have used Logic Forge and found it absolutely crap with terrible performance. Its also way more likely to become unsupported when you think its been around since 2016 and only has 7 reviews, so how long will it remain financially viable for the developer to continue to support it, to the level that bolt will be supported and integrated?

    I also have yet to see a single commercially successful project using Logic Forge, whilst there are plenty that use bolt. Not that that means anything, but seeing as Logic Forge has been around for years now, you would think that commercial games using VS plugins from asset store would have used it in lieu of others if it was as a good...
     
  26. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,009
    Default interface members are cool. Many times I wanted to use such a functionality instead of additional Utility/Helper class.

    All below should give the same result.
    Code (csharp):
    1.  
    2. Func<int,int> f = n=> n*2;
    3.    
    4. Func<int,int> f1 = n=> { return n*2;};
    5.    
    6. Func<int,int> f2 = delegate (int n){ return n*2;};
    7.    
    8. Func<int,int> f3 = MyFunc;
    9. static int MyFunc(int n){return n*2;} //static because of field initializer
    10.  
     
    StevenPicard likes this.
  27. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    855
    I personally don't think Bolt has very good for performance, but, I think it's slick looking and is a very polished asset. Logic Forge can at least generate C# natively (I think there is an unsupported Open Source one for Bolt, too) and the developer is very open to feed back.

    Compared to Bolt, Logic Forge has been greatly over-looked so it definitely doesn't have the user base which is probably why there hasn't been commercial releases with it yet. But your argument can be used for most assets on the store. That doesn't make them bad.

    I personally find visual designers can be helpful but, personally, I find straight programming easier. For those learning to program I do feel it can be beneficial to see what their flows look like in the generated code. Logic Forge supports this out of the box which is a plus.

    I'm happy for whatever tool works for the game creators. I just want them to see the options and choose what works best for them. I want everyone here to be successful and have a great time getting there. :)
     
    MadeFromPolygons likes this.
  28. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,877
    No I actually agree Bolt currently has terrible performance. But the difference is it is now being incorporated into unity with performance as a key factor. They are also looking at unifying visual scripting workflow for DOTS to align with Bolt, so it makes sense for future proofing to learn it alongside any other VS tool, as eventually it will be the standard

    Aside from that I completely agree with you on the rest of your points :) Ultimately everything is just a tool to get a job done and anyone can use what they feel comfortable with, and different options are always good

    EDIT: I actually believe code generation for Bolt is being looked into, but I cant find the source
     
    Last edited: Nov 25, 2020
    StevenPicard likes this.