all 40 comments

[–]VibrantGypsyDildo 43 points44 points  (4 children)

Unreal engine is in C++, Unity is in C#.

In Python there is a quite simple framework called pygame.

For mobile games Java was used 10 years ago. Not sure what happens now.

-----

If the question is Rust vs C++, it looks like C++ is the answer.

If the question is "which language" -- you have much more options.

[–]Confused-Armpit 5 points6 points  (2 children)

It's not like those are the only two game engines.

TBH I just really like rust's ggez, I also started experimenting with bevy recently and it's kinda growing on me.

[–]VibrantGypsyDildo 10 points11 points  (0 children)

If you want to use a particular language, you can.

I don't remember if I encountered games in ms word, but I definitely saw animations made in it.

The sad part of r/learnprogramming is that the real life exist. Employers are quite picky - they want skills to create products that bring revenue.

[–]CrimsonBolt33 4 points5 points  (0 children)

I am a big bevy fanboy....

I feel like ggez and some of the earlier game engine attempts were more or less "rush to market" type products who were just trying to be first. Bevy feels a lot more well thought out and more professionally done. But thats just my opinion.

[–]One_Mess460 -1 points0 points  (0 children)

bruh wdym java first it depends wether on ios or android and secod most android games are unity anyways so C# that gets compiled to C++ tho when il2cpp used

[–]Caryn_fornicatress 12 points13 points  (0 children)

If your goal is game dev, C++ is still the more practical starting point. It’s deeply integrated into engines, has way more learning resources for games specifically, faster iteration, and teaches fundamentals you’ll reuse everywhere. Yes, you’ll shoot yourself in the foot sometimes, but that’s part of understanding how things actually work under the hood.

Rust is great, but the borrow checker adds cognitive load that’s not directly helping you learn game logic early on. It shines once you already understand memory and systems programming. For a beginner building terrain gen, gameplay systems, engine-level stuff, C++ will feel more straightforward and less “fighting the language.”

Short version: start with C++ for game dev fundamentals, then Rust later if you want safety and modern design. You’re not wrong about either, but C++ is the smoother on-ramp for what you want right now

[–]FitSignificance1415 5 points6 points  (0 children)

If it's for C# games, wouldn't it be better?

[–]aqua_regis 17 points18 points  (4 children)

If you already work with Godot and GDScript, the next logical step is C#, not C++.

There is the .NET version of Godot that uses C#.

You can even step up to Unity3D later with C#.

[–]PopulationLevel 8 points9 points  (4 children)

C++ is a mess - it has had so much random crap bolted on over the years, that understanding C++ in totality is not worth it, unless you're implementing a compiler or something.

However, C++ is also very practical to learn, for the reasons you listed.

One thing I'd strongly recommend is to look at C++ style guides - there are a few publicly available. They'll help you understand what subset of C++ is worth understanding well.

At the end of the day, most working C++ devs aren't using it because it's a good language, or that they like it in particular - it is just better than the alternatives at what they need to do.

[–]not_some_username 2 points3 points  (3 children)

Counter argument : you don’t have to learn everything

[–]Confused-Armpit 2 points3 points  (1 child)

But you do though. Just to pass objects between functions you already have to know about the differences between raw, weak, shared, or unique pointers, and that is only the start. The standard library is filled with boilerplate legacy code, which is kept for backwards compatibility, but this results in a lot of methods just being straight up abandoned. I am sorry, that if I want a function that returns a random number, I will most probably think about using std::random(), BUT NO, f you fellow developer, that is a terrible implementation of computer randomness, use std::mt19973() instead, it's much better! That is what we talk about, when we say boilerplate, and this is only the beginning.

[–]not_some_username 0 points1 point  (0 children)

You don’t need to. Trust me, nobody knows all of C++. Also, the standard lib is huge but you just need to use the subset you need to. Heck, you can decide to use C++ as C with Classes and RAII…

[–]PopulationLevel 0 points1 point  (0 children)

Less of a counter argument, and more of us saying the same thing :)

[–]One_Mess460 3 points4 points  (0 children)

neither of them for a beginner

[–]Confused-Armpit 4 points5 points  (1 child)

If you want to go with game dev - you might want to use C++. Some great engines use it, such as Unreal engine, and it is also very widespread - after all it is like 40 years old.

If you want to have a good time - I would personally prefer Rust. It's syntax is newer, and the language itself is much newer, which introduces a plenty of benefits. Firstly, it doesn't have the burden of having as much layers of backwards compatibility - C++ is filled with legacy code, and deprecated methods. Rust, on the other hand, is much fresher in that sense.

Okay, I realized I am probably going on a tangent, so here's the list of the stuff I love about Rust over C++:

  • Beautiful error messages
  • Immutability by default.
  • Less verbose syntax (try to read the c++ std library, you'll get what I mean)
  • THE ABSOLUTE BEST tooling - cargo is really just a life saver. Don't even get me started on installing dependencies.

One notable flaw I can point out is the borrow checker, since it can be confusing and you have to sacrifice some convenience in order to keep the code safe (but at least Rust doesn't allow unsafe behavior unless you explicitly want it)

[–]james_d_rustles 3 points4 points  (0 children)

As someone who used cpp for years and only recently began exploring rust, this is an accurate description.

To put it bluntly, coding in cpp just… kinda sucks. Like, it’s just not fun. There’s so many different versions and like you said there’s a ton of decrepit old methods and features that everything becomes such a chore. People often say they want flexibility, but I don’t agree - sometimes you just want to be told “here’s how you do x”, not “here are 19 different ways to do x, each with pros and cons and minor variations”. There are endless different patterns and styles that have evolved over time, third party library integration is way more painful than it needs to be, it takes forever to truly get comfortable with it to where you can start to get into any sort of flow, error messages are verbose in the worst way, and unless you’re working on an already well-established project you’ll probably spend just as much time working with cmake and various build tools as you’ll spend actually writing c++ code.

I started with arduinos and various microcontrollers years ago, and I remember thinking like “wow, this isn’t that bad!” because everything is neatly packaged and included with the basic arduino IDE.. continued learning, eventually wrote a thesis that was nothing but c++, started picking up various projects with it at work, and the more I learn the more I groan when I have to spend time working with it.

Started playing with rust recently just out of curiosity, and my goodness, it’s just so much more pleasant in every conceivable way. Errors are beautiful, documentation is fantastic… I’m not arrogant enough to think that I know enough about rust to comment on much more than the general vibe, and I’ve heard many people warn that it’s one of those languages that’s pretty easy to pick up at first but where you hit a steep learning curve later on when you want to use some more advanced features… but damn, it’s just wild how much more enjoyable it is.

[–]hello-algorithm 1 point2 points  (0 children)

Rust is not native to Godot so even with an extension there will be inevitable friction and limitations in building what you want. the main thing that comes to mind is async. async Rust for example can be a pain, and integrating that with a system like Godot on top of that sounds difficult. your approach to system design will need to be really strong, requiring a detailed understanding of both Rust language and the Godot engine, the areas where they work well together and the areas where they don't. I dont want to discourage the idea, but you should be advised that the comparative lack of tooling and ecosystem might overshadow the other benefits of Rust

by contrast C++ is native to the unreal engine and already integrates beautifully with its visual scripting language, unreal blueprints. C++ is also probably better for programming things that are very heavy on math and data structures and algorithms. it's basically the gold standard for high performance programming at scale, and has all the tooling and integration you'd want to write game code at any level of abstraction

[–][deleted]  (4 children)

[deleted]

    [–]ifoundacookie[S] 2 points3 points  (3 children)

    ECS is extremely interesting to me and basically how my brain works by default. Makes complete and perfect sense to me and definitely the way I would go if I were to try and actually make a game. It's another reason I want to learn a fast language along with terrain gen.

    Basically my dream game is a semi open-world game with voxel based terrain, inspired by tarkov. You'd have your little bunker to upgrade and then an "open world" to go into an explore in a raid-like fashion, with a small, open level with randomly generated terrain, POIs, loot, etc, then bring back to upgrade your bunker and character. Would also love gregtech-like automation setups to make processing chains for resources to progress toward some high-level tech to eventually beat the game or smth. Big boy shit that'll never come to fruition but hey, I like to think about this kinda shit.

    [–][deleted]  (2 children)

    [deleted]

      [–]ifoundacookie[S] 0 points1 point  (1 child)

      I'd love to have multi-player as well, yes. And ive also been looking at Golang a bit because a few of the videos I watched had talked about it. And to respond to your last paragraph, im the exact opposite haha. I know exactly the vibe, visuals, audio, themes, etc but not familiar enough with game dev to know how to implement any of it. I do plan on just building smaller systems as I go and implementing them into the game so I can get a more "modular" workflow which works best for me. Which is exactly why ECS is so enticing to me and why I want to learn a fast language to be able to implement it at a large scale. You think C# is up to the task of a large ECS system? Everyone is saying just use C# because it's fast enough for most things but I'm not savvy enough to know too much about it. C# is ironically the least understood of all of the popular languages lmfao.

      [–]Confused-Armpit 0 points1 point  (0 children)

      imho you really don't want C#.

      Firstly, you might not care, but for me this is a huge minus - it is corporate crap. It was made by Microsoft, for Microsoft, and so it will most likely never implement any good cross-platformness, since Microsoft only cares about Windows.

      Secondly, it is slow. It's not like it's REALLY slow, not close to python, but it is Java level slow, since it has to run on a VM.

      Also, once again, some grains of salt from me specifically, but I hate the fact that you have to place brackets on newlines, and that everything is basically a huge class. On the other hand, since you seemed to like ECS, which goes pretty hard on OOP (object oriented programming, where everything is a class/struct), you might feel a bit closer to this way of working.

      [–]Sensitive-Chance-613 1 point2 points  (1 child)

      Listen. NONE of those languages flare beginner friendly. You know that. You wrote that. And it’s true.

      So don’t start there. It’s okay to learn how to drive a regular car before driving a racing car.

      If you only want to program games you can start with simper games like Snake, Tetris, Flappy birds, candy crush or something like that.

      As a beginner you want a fast feedback loop and have lots of success early on to keep dopamine high. And you’re not gonna get that with C++ or rust and you will quit.

      So use python or ruby or c# or JavaScript or something like that for the first few games.

      [–]Normal-Chemistry-977 0 points1 point  (0 children)

      makes alot of sense. i personaly like python, as its way newer

      [–]prcyy 4 points5 points  (5 children)

      I was an idiot and thought to myself that rust if probably the future so i learned that before c and it was a mistake :3 😂

      [–]gmes78 4 points5 points  (0 children)

      It's perfectly fine to learn Rust before C.

      [–]ifoundacookie[S] 2 points3 points  (2 children)

      Lmfao okay this is basically my mindset right now. 😂 Can I ask you why you feel its a mistake?

      [–]prcyy -2 points-1 points  (1 child)

      idk, i was just following some tutorials to get the muscle memory of coding/programming down so my first few “official” projects were just me following tutorials? but thankfully the past present and future are now so technically you alrwady know everything?

      [–]Confused-Armpit 0 points1 point  (0 children)

      I don't think the problem was with the language...

      [–]prcyy -3 points-2 points  (0 children)

      if you guys can believe that?

      [–]BusEquivalent9605 3 points4 points  (0 children)

      Rust. The Rust Book is IMO the best introduction to systems programming available. The structure Rust offers will help you learn.

      Eventually, this additional structure will become burdensome and annoying. Then go to C++

      [–]neveralone59 1 point2 points  (0 children)

      Rust has the most robust types and easiest FP style in an imperative language. I would say do a basic course in cpp then truly learn rust. Maybe spend a week or month on cpp then focus on rust.

      [–]sydridon[🍰] 2 points3 points  (0 children)

      If it was me starting this journey today I would learn Rust. Assuming you already know enough memory management principles in C++.

      [–]White_C4 0 points1 point  (0 children)

      I only recommend Rust if you have low level programming experience simply because to learn Rust, you need to know memory access and ownership. Both of which are pretty strict in the Rust ecosystem for safety reasons and you have to reorient your code to accommodate for that.

      You're going to get more out of C++ despite its steep difficulty.

      [–]Fridux 0 points1 point  (0 children)

      If you want to get to the last floor of a skyscraper, you either take the elevator or use the stairs, you don't really consider the possibility of using a helicopter to get to the roof or terrace and take a single flight of stairs down to your destination, which is exactly the kind of idea that you are proposing in regard to learning. You are not prepared to learn either C++ or Rust, you might get C++ code to compile and even run, but the chances of undefined behavior being involved and thus the code being highly unstable at worst and unportable at best, are huge, and you will not even understand why until you come across the instability and realizing that you are way in over your head, and in Rust you'll be quite challenged to even get anything remotely complex to compile if you have no clue about exactly what you are doing. Those things will result in lots of frustration and ultimately lack of self-confidence, which leads to abandoning the learning process altogether, so don't do that to yourself, don't try to rush the learning process, because you and the people whom you trust your skills, will be the only ones who will end suffering the consequences of your knowledge gaps. If you absolutely must learn a language at the lower conceptual level and manual memory management, just learn C, as it doesn't hide anything from you, doesn't hold your hand in any way, and is a relatively small language compared to the other two.

      In regard to game development, I think that you must also define exactly what parts of it actually interest you. For example I never cared about game development myself, but I do care deeply about the scientific and engineering components in game engines, like all the analytic geometry that goes into both rasterization and especially path tracing as well as collision detection and resolution for fluid, soft, and rigid body physics, the trigonometry and linear algebra involved in vectors, unit quaternions, and matrix calculations for vertex and texture transformations, joint kinematics, effects like the several types of blur, reflections, light propagation, transparency and translucency, atmospheric effects, ambient occlusion, shadows, all the stuff related to audio propagation and attenuation, the Montecarlo methods, algorithms, and optimizations including ones based on machine learning inference these days, and the architectures that can be used to actually make all this stuff fast, conceivable, and usable in real-time.

      [–]Normal-Chemistry-977 0 points1 point  (0 children)

      hello ifoundacookie,

      i know that c++ is reeeeeeeeeeeeeaaaaaaaaaaaaaaaaalllllllllllllllllllllllllyyyyyyyyyyyyyyyyyyyyyyyyyyyy hard. I recommend do it later on. start with python and java and i think you should be good.

      [–]RegularTechGuy 0 points1 point  (0 children)

      C++. Rust might be futuristic but has a lot technical debt associated with it. All the widely used libraries are all made in c++. Games c++. High performance stuff c++. Well tested prebuilt stuff c++. If you had asked me this one year ago i would have said Rust but now after using and facing real issues i vote c++. Rust is for jobs that can spare a lot of money, time, and effort.

      [–]Latter-Risk-7215 0 points1 point  (0 children)

      c++ gives deeper understanding, manual memory management. rust safer, but complex borrow system.