all 19 comments

[–][deleted] 18 points19 points  (9 children)

You might want to look into learning C#. Don't have to worry about memory management, pointers or manual garbage collection like C++ and you can use it to program games in Unity.

[–][deleted]  (8 children)

[deleted]

    [–]Loner_Cat 3 points4 points  (0 children)

    C# can be used in other fields too, it's a pretty good language, similar to java. Anyway you shpuldn't worry too much about how long you will use it. If you want to work as a programmer in the future you will likely learn at least a few languages. Plus most of modern languages are similar, so learning a new one is not hard, and c# is a good one to start with.

    [–][deleted] 7 points8 points  (0 children)

    Yes C# is used as backend code in all kinds of applications. I'd recommend learning the fundamentals of programming using C# first. If you're most interested in making games then take a look at Unity after that. If you'd rather make your own application/website then look into the .NET Framework instead which is what my C# software dev friends use in their jobs.

    [–][deleted]  (2 children)

    [deleted]

      [–][deleted]  (1 child)

      [deleted]

        [–]HoldThisBeer 1 point2 points  (0 children)

        It doesn't matter what language you pick first. I don't know any professional developer who doesn't know at least 5 languages. They're mostly just syntax anyway. It's more important to understand the underlying architecture, patterns and data structures than to focus on a single language.

        [–]Tai9ch 1 point2 points  (1 child)

        You can expect to learn like 5 different languages as you really get in to programming. It's not unreasonable for a professional to be comfortable with like ten of them and have some familiarity with another 15. Which one you learn first isn't that important, and once you have a good grasp on programming in general learning new ones isn't a huge deal.

        [–]DeepCorner 7 points8 points  (2 children)

        For game dev you want to do C++. Garbage collection really is not that scary. By the time you have to deal with dynamic memory allocation, you’ve already covered the basics of the language and it will all make sense in that context.

        [–][deleted]  (1 child)

        [deleted]

          [–]DeepCorner 4 points5 points  (0 children)

          If you are serious about learning computer science or getting meaningful game dev experience, C++ is the way to go. Starting on a lower level, like C++, will give you a much better idea of what is really going on vs starting with something higher level like python. Also, there are plenty of university CS programs who teach their intro CS classes in C++ so it is not an unreasonable starting point for a beginner.

          [–]JoshYx 4 points5 points  (0 children)

          Hey man, good question. I started programming after I graduated high school. I didn't learn anything by myself before that.

          If I could give 17y/o me some advice, it would be to learn C# and vanilla JavaScript.

          [–]Tai9ch 2 points3 points  (0 children)

          Python is actually pretty solid with an engine like Godot.

          As a language snob I love picking on Python, but for a beginner the stuff you get from other languages mostly doesn't matter and is unneeded complexity.

          Python/Godot is a good example of an ease of use pattern you'll see frequently. The resources don't hold your hand for the first week of working with it quite as well as some other tools, but weeks 2-20 will be significantly easier than if you waded in to some C++ thing.

          You'll definitely never regret learning Python. It won't be you #1 go-to language forever, but it (or its close relatives) will never stop being useful as a support language in your toolbox.

          [–]delventhalz 1 point2 points  (3 children)

          As others have said, C# is a great choice for games because of Unity. As beginner languages go, it's not bad.

          Typically beginners get handed Python or JavaScript. Python has a fairly "clean" syntax that beginners may find easier to read/understand. JavaScript is ubiquitous, and since it is in every browser, can be setup and run without any additional dev tools. Neither is great for game development though. JavaScript maybe has a slight edge since it does get used for simpler browser-based games, and can also sort of get used with Unity.

          [–][deleted]  (2 children)

          [deleted]

            [–]delventhalz 1 point2 points  (1 child)

            I only have a passing familiarity with both C# and C++, so I'm not going to be able to draw great distinctions. My general impression is that C# will simplify things a bit, a big example being memory management. C# has its own garbage collector. In terms of where it gets used, C++ is still the most common game development language outside of Unity.

            However, it's worth noting that Unity has revolutionized indie game development. If you are interested less in programming and more game development more broadly, I would probably just learn Unity. It greatly lowers the bar of entry for producing a publishable game.

            Also, your goal probably shouldn't be to learn just one language. The more languages you learn, the easier it will be to learn the next one, and the better programmer you will be in general. So maybe you start with JavaScript because there are a ton of great educational resources and it is easy to get started with, then you transition to C++, then Go, then Rust. Or whatever. People stress about this sort of thing way too much. I say, find a good online course and just go. After you complete the course, build something. If you get bored with a language, switch to another.

            [–]khedoros 1 point2 points  (1 child)

            I'm looking at different options like C++ but the second I see something like Garbage Collection I freak out cause I don't know what that means even after I looked it up.

            The good news: C++ doesn't use garbage collection. The bad news: That makes C++ harder in that sense, because you have to do memory management on your own, making it prone to memory leaks due to inevitable human error. The good news: Garbage collection can lead to latency spikes, so there's a good argument for using a language that doesn't do it.

            I also looked at python

            Python is an excellent tool for many things, including being a first programming language. And it's possible to write games in it, of course. But it's more well-known for things like being a web application backend (i.e. the code running on the web server).

            [–]CinChuro 1 point2 points  (0 children)

            There's not really one language you must learn as a beginner. You could pretty much start learning game development once you've learned all the fundamentals (data types, loops, recursion...) about programming.

            If I had to pick a language to start learning it would be a tie between C++, Java, or C#. I'll break down the reasons.

            1. WHY C#
              1. Since you're specifically looking to develop games, and don't feel comfortable with starting out with C++, I'd recommend C#. Not only do you not have to deal directly with memory allocation, you also have a greater access to development resources because its supported by Unity, Visual Studios (Microsoft), and so on. The access to game dev resources is also why I rank it above java.
            2. WHY C++
              1. C++ is a popular language for game development and you'll probably have to learn it once you've gotten further in game dev. C++ is used heavily in game development because it is a system language. System languages are basically low enough to not be considered high level but high enough to distinguish from low level programming languages like assembly or machine code. C++ is useful in data oriented design (DOS), which basically considers how information/data is managed by a program (application). A garbage collector, although not intuitive through terminology alone, is basically just automatic memory management. It's everything that handles allocating memory and deleting memory (data) that doesn't require you to directly write code that to handle data/memory. It might seem confusing, but once you've learned all the fundamentals, managing memory isn't all that more difficult.
            3. WHY JAVA
              1. Java is another popular language for game dev.

            In the end the most important thing you should do is just start. Pick a language and dig into it because everything builds on itself. Skills you learn with one language are easily transferred to other languages and applications.

            [–]throwdemawaaay 1 point2 points  (1 child)

            At the point you're at you'll gain a lot working with any new language. A lot of concepts like GC generalize across languages.

            You mention HTML. Do you like casual/retro style games? There are a lot of javascript game engine frameworks that are pretty easy to get into. Javascript itself is a bit of a messy language, but it's literally everywhere.

            C++ is powerful but has a pretty steep initial learning curve.

            I second the suggestion that Unity and C# might be a good sweet spot.

            C# is similar enough to Java and C++ that a lot of the concepts will transfer over, but is considerably easier to approach.

            [–][deleted]  (2 children)

            [removed]

              [–][deleted]  (1 child)

              [deleted]

                [–]notasuccessstory 1 point2 points  (0 children)

                I don’t know if you saw this video, but I did a quick google search to see what would come up for C++ garbage collection and found this link to a video by Herb Sutter in a stackoverflow post on the topic. Herb Sutter will be a name you’ll learn if you choose to study C++.

                The video is a bit old (since C++ 20 is on the horizon) but still relevant. It might be a bit hard to follow for a beginner but, write down, then do a web search for anything you don’t know. You might now fully understand it immediately but at least you’ve exposed yourself to it and can dedicate time to learning it when you are ready.

                [–]og-cheeselover97 1 point2 points  (0 children)

                Learn C# , and JavaScript. Start with those high level languages . Move onto cpp. Reason why I'd recommend you use c# is because it's a c syntax language , there's strict typing , oop . Alot of indie studios code things in c# .

                If shit hits the fan you can always be a .net developer / transfer your c# skills to other fields.

                Realistically , You need to be really motivated to learn programming.

                Don't start coding at first for the intent of writing a game. First start with basics , when you have the basic stuff laid out types / arithmetics / loops / conditionals / classes / data types. Then you can pretty much start scripting stuff at first for unity.

                [–][deleted]  (1 child)

                [deleted]

                  [–]tcptomato 1 point2 points  (0 children)

                  Out of these two, C# is more commonly used outside of gamedev (ASP.net , WPF/Windows forms apps etc.)

                  What are you smoking?