I have very limited background in programming. I quite want to develop the game myself, or with only minimal help. Is there one language that is better than others for game development, or is more versatile?

  • RecursiveDescent@discuss.tchncs.de
    link
    fedilink
    arrow-up
    9
    ·
    1 year ago

    If you are new you probably want to decide which game engine you want to use first, then learn one of the languages that engine supports.

    Most popular choices would be: Unreal engine, Unity and Godot. Hovewer if your goal is to get into game dev industry by far the most popular language would be C++ followed by C#.

    Depending on the scope of your game(if it is a very simple 2d game like 2048) you might want to consider Python too. it is known for being one of the easiest languages to learn and you will have easy time researching the points you get stuck on.

  • donuts@kbin.social
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    One of the most important things to learn about programming is not to make things from scratch unless you have a very good reason to, imo. Programmers build off of the things that other programmers make, for example using some code library to achieve a specific task or building a game on top of one of the many solid engines that are out there. (Godot, Unity, Unreal, etc.)

    Writing software is hard, and making a fun and functioning game is even harder, so unless you have some very specific reason to write a game “from scratch”, I would just get something like Godot or Unreal and start learning the ins and outs of game development and design.

    Why Godot and Unreal over Unity? Because having source code access means that, if you at some point want to learn more about game engine development specifically, you can start by browsing and hacking away at the source code of an existing engine. So, do yourself a big favor and just start learning how to make games using an existing engine.

  • EnglishMobster@kbin.social
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    1 year ago

    So! If you don’t have much experience in programming, you DO NOT want to write your own engine. Period.

    “I wrote my own game engine” is the kind of thing you’ll see masters/doctorate computer science students (or crazy industry veterans) do. While it may be possible to write a simple text-based game that only uses the command line, it gets complicated fast.

    There are some libraries out there like PyGame which let you set up “toy” games quickly (in Python), but no shipping game is going to be built entirely in PyGame.

    When you’re out applying for jobs in the industry, having a studio you’re applying for say “We built our own engine” in 2023 is a red flag. There are multiple battle-ready game engines that have made thousands of games. Most places want to build games in either the Unreal Engine (C++) or the Unity Engine (C#). There is a third one I should mention - Godot - which is a flexible FOSS game engine. But most places use Unity or Unreal.

    There is so much that goes into making a game engine. Not only are you making a game, you’re making a tool that lets you make a game. You’re making stuff that can read model and animation data. You’re making something that can handle a bunch of different input methods. You’re making something which needs to calculate lighting and collision, parse images, run scripts, save and load data, multiplayer games need a full networking model with local prediction, correction, and latency mitigation, etc.

    By definition, making your own engine is untested. You are going to run into issues, whether you have 1 person or 1000. What starts off simple quickly balloons as you want to do more than just show white text on a black screen. Something like Unity has had a bunch of production games (like Hearthstone) use it and find all the issues already so you don’t have to. There is literally zero reason to make your own engine today.


    I myself work at a AAA game studio, as a programmer. I’ve worked on the Battlefield series in the past, although it’s not what I work on now.

    Let me give you the advice I wish I had 15 years ago, when I was starting out: think small. It is far better to have made 10 projects in 1 year than 1 project in 10 years. The only way to “make it” as an indie dev is to be incredibly talented, incredibly lucky, and have an incredible amount of funding. Even supposed “one-man teams” like Toby Fox had help making their games; it is very difficult to make a game with 100 people working on it, let alone 1.

    Make small toy projects that you can do in a weekend. Drop it if you spend more than 2 weeks on it. Don’t be like me where I spent years working on a dream project that I never got in a good spot to show to anyone. When I talk to people now, when I talk to interviewers or coworkers, I don’t really mention my white whale of a dream project I never finished. I mention the little games I made for gamejams, the ideas I had and how I played around with them.

    It is so much more impressive to show an interviewer an active GitHub and a bunch of free games you’ve put on itch.io. I’ve literally gotten jobs because of it, but it took me years to realize I was doing the wrong thing and needed to pivot.


    With that rant out of the way. C++ is industry standard. Any programmer will need to know C++ inside and out. Even if you don’t work in it directly, you’re almost guaranteed to be working with something that works in C++. But C++ is a hard language to learn.

    If you have taken a programming class already, I’d recommend Unity. Unity isn’t as common as Unreal, but C# is easy to learn and somewhat similar to C++ (not that similar, but a lot can carry over). It is code, though, so you need to know syntax.

    If you’ve never taken a programming class before and you’re self-taught, then I’d actually recommend Unreal. Unreal has “blueprints”, which is a visual scripting language. This means you don’t need to know the syntax of what you want to do; you just grab nodes and connect them together. It’s very easy to understand and intuitive, and it helps you build the foundation you’d use if you ever delve into the code side. You can make a whole game in blueprint, without touching code - the game won’t be huge and mega-performant, but it’ll be relatively easy to make and doable by a single person working on a very small project.

    Bear in mind that there are other disciplines in game development other than programming as well. That’s sort of the best part about making your own stuff - you have to learn to do everything, from art to design to programming. Designers typically aren’t expected to know much about code, but they are expected to be creative, collaborative, and intuitively know what makes something a fun game to play. If you find out that programming isn’t for you but you still really want to get into game development, making all these tiny projects is a great way to exercise your design muscles as well.

  • sovok@kbin.social
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 year ago

    Back in the olden days I learned programming and made games with BlitzBasic and PureBasic. A simple programming language, but with included functions to easily display sprites on a screen or play a sound. Everything else you had to do yourself, so it wasn’t a game engine, but you still could have results quickly without too much boilerplate code. It was great for learning, together with the community around it.

    • PyGame seems similar. And you’re learning a useful language to boot.
    • PICO-8 is a little virtual console with everything built-in to write tiny pixel games in Lua.
    • Plain JavaScript with the Canvas element. You can do everything yourself, only the HTML/CSS stuff around the Canvas makes it a bit more cumbersome. But you can always write your own functions to easily draw a sprite etc.
    • JavaScript with PixiJS. Higher level Canvas functions (demo). Looks like fun.

    Or you could start with the Godot engine. That way you could eventually make bigger games. But for learning game-making and especially programming from scratch it’s too high level. Better learn the basics first, write a lil’ Tetris, Game of Life, Screensaver etc. before using complicated huge tools.

  • psycotica0@lemmy.ca
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Depends on what you want. I’ve been liking Godot, but I’m an “Open Source” person. There’s definitely more of a community around Unity or Unreal.

    But Godot is free in both ways and relatively user friendly, and since you’re uninterested in hiring a hundred people, using a tool that you like is fine, even if it’s not the most popular.

    There’s a course I’ve never used called Learn GDscript which teaches the inbuilt language for Godot (GDScript) in the browser with fun interactive tasks. It looks neat, but I’ve never tried it myself. You can use other languages with Godot, but I recommend the GDScript. It’s very similar to Python and is well integrated into the engine.

    So from there it’s about screwing around! Like other people have said, you’re not going to whip up the game that’s in your head in anything like the time frame you probably think. Even if you think you’re being realistic, it’s probably even worse than that. But I don’t say this to discourage you, I say this to prevent you from discouraging yourself!

    If you can get a game where a green circle goes through a maze and then text shows up on the screen that says “you did it”, that should be viewed as an accomplishment! It’s simple, sure, but it’s something you did. Try to break your game’s features up into micro chunks that are playable. It’s easy to spend 6 months working on something and making progress, but not in any way you can show friends or whoever, and can’t even really “play” yourself. That can be demotivating. Try as much as you can to have something playable as often as possible. It will feel much more like real progress if you constantly have something you can demo.

    And also don’t underestimate how much a bit of art and sound effects can change an experience. Silent 2D boxes is fine to test things out, but even a free art and sound effects pack makes a huge difference in how fun a game can feel. It can make even a simple premise suddenly feel like a game.

    Good luck, have fun! Oh, also once you’re done tripping over your feet, maybe try a game jam! They’re good exercise.

  • Margot Robbie@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    If you want a serious answer, C#. It’s a general purpose language with a great ecosystem in both the regular Dotnet Stack and stuff developed specifically for unity.

  • Teppic@kbin.social
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    Building a game from scratch sounds nice on paper, but if you are also trying to learn programming I’d suggest smaller steps.

    Start by looking at some really simple games (think Tron, or snake) and figure out how they work, adapt them, break the code, fix the code, change the rules of the game and make it work differently…

    Once you are confident changing code then try writing stuff…
    Much as I’d love to recommend a language from 20 years ago (e.g. Pascal) realistically you want to be looking at something like Python as an entry language these days.

  • SigmarStern@discuss.tchncs.de
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    I would suggest that you try something different. Do a little tutorial game in the Godot engine and learn all the things that you would need to implement yourself if you wouldn’t have the Godot engine doing the heavy lifting for you. This might help you to get a feeling for the scope of your endeavor. I think it’s hard enough to build a game where you don’t have to implement sprite movement, update ticks, physics, collision detection, etc yourself.

    If you want to do it anyway because it’s awesome, there’s a running joke that there are like 50 game engines currently being developed in Rust. Go all in!

  • Shartacus@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Not a developer but one time I decided to make my own game and I got one character sprite done for walking to the left and it took me 18 hours.

    My best friend is a senior developer and one of the brightest people I know. I’ve seen him code for me some arduino sketches that are absolutely next level (even after spending about 400 hours getting decent at python).

    He’s currently 3 years into developing his game and has a few more years to go.

    I’m not saying it’s impossible I’m just gonna say that maybe you should start small and see what the time commitment is and such and make sure you enjoy it enough to buckle up for a few years, overcome frustrations and are able to see it through.

    If it’s your absolute dream it is entirely possible, just don’t let the length of the road to get there be your deterrent. One step at a time and then onto the next problem or step.

  • LexaPrime@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    That would depend on what kind of game you want to make, and what do you mean by “from scratch” (hopefully not the Scratch programming language - that one I can tell you, you should not be using).

    If you’re planning on creating everything from scratch, including the game engine? With a “very limited background in programming”, I would advise against it, but if you’re stubborn enough, you could get it done in a couple years. But you would not be constrained to any specific language - you could use anything you’d like, even though some may be better suited for the task than others.

    Most AAA game engines are still built with C++, and that’s the one to use if you’re very serious about it and want good performance with good 3D graphics - you’ll find a lot of resources, libraries and bindings for it. On the other hand, it’s considered one of the most difficult mainstream languages to learn.

    If you only need 2D graphics, and don’t need to simulate a lot of stuff, you can focus on finding a language that would be easier for you to learn. Python is considered a good starting language, and despite being slow, it should be good enough for the task.

    If you’re planning on actually making a game, you probably want to use an existing engine and build from there - all of my own twenty-something attempts at creating my own game engine have ended with “ooh, so that why they don’t do it this way” instead of a game. There are lots of different ones to choose from, and again, depending on how complex the game is supposed to be, you can use Unity with C# or Unreal with C++ for advanced 3D (Unreal also has Blueprints, which would be… well… Scratch-for-Games - visual scripting, an editor that does not require a knowledge of any programming language); or, for example, Godot for 2D and simple 3D, with C# or their own GDScript, which is a mix between Python and Javascript, and pretty easy to get a hang of.

    So, my advice would be to find an engine that looks intuitive enough for you, and learn whatever it uses for scripting - if you decide to move to a different one with a different language later, it is much, much easier to learn a second language than it was to learn your first.

    • Rognaut@kbin.social
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I was gonna be a smart-ass and say that if you wanna use Scratch, you gotta learn Python. But your answer is better.

  • wagesj45@kbin.social
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    I’d highly recommend you start with a game engine like Godot. Very few studios, let alone individuals, code games from the ground up. Besides having lots of functions and libraries specifically designed to do the math required for games, these engines will have lots of tools that will be useful for performing all kinds of game-related work.

    If you’re looking for a true challenge and really hate yourself, and you really want to go from scratch, you could write your own engine in C or C++. Again, this is a Bad Idea™.

    • Calcharger@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      How is Godot compared to Unity?

      I’m on my language journey, and I’ve made stuff in Python, and I’ve also got some work in javascript and html. Eventually I’d like to learn C# as my main, working language so that I can make efficient windows apps and maybe hopefully create a game in Unity.

      But if Godot is strong and it takes (practically) python, maybe I’ll give that a go.

      • donuts@kbin.social
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Godot and Unity are pretty comparable in my opinion. Unity is a bit more mature and a lot more popular, but Godot is my preferred engine because it is fully open source and has a node-tree/server based system that resonates with me. If you have experience with Python, then learning GDScript will be a breeze for you. Godot also supports C# from what I understand (and can even be used with other languages through something called GDExtension) but I don’t have any experience with that stuff so I can’t really say if it’s good or not.

        If you’re looking for a job you will likely have an easier time with at least some Unity experience under your belt (because it’s extremely common and popular with small and mid-sized studios still), but Godot jobs are becoming more common and Godot experience is both increasingly valuable and also somewhat easily transferable over to Unity, should you need to.

      • Dukeofdummies@kbin.social
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        They focus on entirely different things.

        Godot is small. I would’ve loved to have it in high school because I would’ve dumped it on a flashdrive and built games on whatever computer I had access to. Even on flashdrives from the early 2000s. You will feel weird installing it… because when you download it it’s just a .exe and it just… runs. No “let’s check for updates” no “let’s create an account” no “hey can you answer this survey?” It just, goes from the moment you double click.

        Godot is entirely open source. Which sounds like a meh reason if you’re not an EFF warrior but is SERIOUSLY useful if you want to do weird stuff with a game engine. You gotta PAY if you wanna edit source code to Unity. On the other hand, you can just freely edit Godot. If you want to create a brand new tool within Godot’s interface, the hoops you jump through are trivial. Hell, Godot’s editor is actually a game built within Godot they’re literally teaching you how to edit the editor as you’re making games. Meaning if you wanna veer into the avant guard weird ass shit as a hobby. Godot is the better option.

        The GDscript might sound like a detriment, but it really does trivialize a lot of game engine specific concepts and tasks. Meaning that once you start getting used to GDscript… you no longer have to worry about a lot of things because the language takes care of it for you.

        Unity though, has a larger base. So importing assets are trivial, porting to consoles like the switch are vastly easier (so I’ve heard). If you’re planning on going big… Unity will probably make your final steps easier.

        • Calcharger@kbin.social
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Wow! Godot sounds really strong! Here I’m sitting thinking it’s just a novelty engine but it sounds like a really good option

          • donuts@kbin.social
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            Godot is a viable contender for sure. There have been a number of relatively popular and good games recently using Godot recently, like Dome Keeper, Brotato, Cassette Beasts, and Ex Zodiac, just off the top of my head.

        • donuts@kbin.social
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 year ago

          Godot is entirely open source. Which sounds like a meh reason if you’re not an EFF warrior but is SERIOUSLY useful if you want to do weird stuff with a game engine. You gotta PAY if you wanna edit source code to Unity

          As someone who went from Unity to Godot, the contrast between “I have a small problem in Unity and so now I have to go on some website to ask them to please implement some feature/fix alongside thousands of other posters” and “I have a small problem in Godot, so let me open up the source code and change a single function to work the way I want/need it to” is like night and day.

          You don’t need to change things about your engine often, but it’s really nice to be able to when you do.

          • Dukeofdummies@kbin.social
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            Not only that, sharing that fix is just so trivial. No trying to coordinate “you need to download 13.1.7.6 RC2 from Unity’s main site”

      • ATwig@kbin.social
        link
        fedilink
        arrow-up
        0
        ·
        1 year ago

        Honestly the biggest issue you’re gonna run into when swapping into C# (or Java) is how truly object oriented they are.

        Yes python has objects but it’s not the same.

        Personally I’d recommend starting with pure Java first and doing the basics like Pong, pinball, whack-a-mole before migrating fully into C# then try to add Unity.

        Java is a lot easier to compile and you’ll get to skip all the annoying C based compiler problems you’ll get with C#

        • Calcharger@kbin.social
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Thanks for the tips! Is it really that difficult to go straight to C#? I just don’t see myself using Java in any of my own projects

          • ATwig@kbin.social
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            (Sorry for the delayed response!)

            That’s a good question that I find a lot of newer programs ask. The short answer is yes because the Java runtime environment abstracts out all of the platform specific things you’ll have to be aware of in C# to some extent. Long answer is you can probably figure it out with some extra struggle that’s going to be C# specific.

            I fully understand that Java is not supported in Unity and that you will probably not use Java once you figure that out however, Java is still useful as a learning tool. I think that people focus on specific language too much (ie c# vs java) when in reality they are 99% the same. I think it’s more important to learn the data structure and logic behind object oriented programming over the specific nuances of a language. When to use an if/else vs a switch. When to for vs foreach. Abstract classes vs interfaces. These things are all the same amongst all object oriented languages and are the real things you should be focused on. Once you figure out how to do it on one language it’s a 30 second Google to look up the key words for whatever language you want to swap to.

            So in summary use Java for it’s ease of compiling to learn (and there’s a lot of good java tutorials online for this) then be amazed when you swap to C# and how much worse the compiler is lol.

            • Calcharger@kbin.social
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              Thanks for the response!

              My main desire towards C# is that i’m 100% a microsoft guy. I’ve always used Windows OS. I’ve tinkered with MacOS and Linux but I just, I cut my teeth from when I was a child to well in adulthood with Microsoft and it just feels like a natural fit for me. So I’d like to have as my main language be the #1 supported language by Microsoft because I want to make Microsoft applications. I wouldn’t necessarily call it a fanboy thing, it’s just a comfort thing. I know my way around the OS like riding a bicycle

    • Thaolin@kbin.social
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      This is the answer IMO. Godot is lightweight, easy to use, and free with fully open sourced communities. Check out GDQuest for tutorials. The best part is that Godot uses a programming language called GDscript which is based on Python. I’ve learned so much about programming best practices using Godot that it translates to my day job now when I need to use python. I cannot recommend it enough as a hobbyist.

      As an additional point, Godot 4 just released and it is really giving Unity a run for it’s money with features and capabilities.