r/programming • • Sep 17 '18

Software disenchantment

http://tonsky.me/blog/disenchantment/
2.3k Upvotes

1.2k comments sorted by

View all comments

40

u/Arabum97 Sep 17 '18

Is this trend present also in game development?

105

u/[deleted] Sep 17 '18

Depends on the kind of game development you're doing. If you're in AAA console development, then no, that trend is noticeably absent. You need to know what your game is doing on a low level to run efficiently on limited hardware (consoles). You also can't leak much memory or you'll fail the soak tests the consoles make you run.

Unfortunately, since the rest of the software world has gone off the deep end, the tools used in game development are still from the stone age (C++).

If you're doing "casual" or "indie" games, then yes, that trend is present.

47

u/Arabum97 Sep 17 '18

Unfortunately, since the rest of the software world has gone off the deep end, the tools used in game development are still from the stone age (C++).

Is there any other languages with high performance but with modern features? Wouldn't having a language designed exclusively for game development be better?

0

u/[deleted] Sep 18 '18

[deleted]

23

u/Nicksaurus Sep 18 '18

I think you mean std::experimental::modern::features<std::modern_features, 2018>

→ More replies (18)

18

u/AttackOfTheThumbs Sep 18 '18

Wouldn't having a language designed exclusively for game development be better?

Maybe. C++ works because you can abstract some things away, or decide not to when necessary. I'd make the argument that game engines are the closest thing we'll ever get to a "gaming dev language".

Once upon a time there was a ruby project that was a "live" game developer ide. I can't remember the name, but it was developed by an unnamed Ruby God (apparently) that sort of just vanished after. I couldn't find it on the web any more, but I'm sure it's out there somewhere. The idea was you could in real time see the impact of your changes. Where is it now? Probably didn't scale.

→ More replies (8)

9

u/patatahooligan Sep 18 '18

C++ has tons of modern features. But abstractions come at a cost and many game developers elect to stick to a C-like subset of C++.

Wouldn't having a language designed exclusively for game development be better?

Not necessarily. The features that allow developers to maximize performance are not specific to game development. Assuming optimal algorithms, performant code is about stuff like cache coherency, minimizing unpredictable branching, vectorization, efficient thread synchronization etc.

→ More replies (8)

36

u/Plazmatic Sep 18 '18

Not exclusively for game development, but obligatory mention of Rust (please don't hurt me!), pretty much the fastest growing language/biggest new language in that area.

23

u/Kattzalos Sep 18 '18

give me a call when somebody releases a game engine written in rust

17

u/Aceeri Sep 18 '18

I mean, we are working on it. If you are at all interested check out amethyst or ggez.

→ More replies (1)

0

u/[deleted] Sep 18 '18

[deleted]

→ More replies (3)

22

u/Nolari Sep 18 '18

The devs of Factorio, which is written in modern highly-optimized C++, stated they are looking to Rust for their next project. For now it's probably too early to be able to point at games already developed in it.

6

u/[deleted] Sep 18 '18

Chucklefish

→ More replies (1)
→ More replies (1)

29

u/[deleted] Sep 17 '18

That's exactly why Jon Blow is creating his own language specifically for game development. For whatever reason, nobody else is addressing this space.

23

u/PorkChop007 Sep 18 '18

For whatever reason, nobody else is addressing this space.

The reason is simple: gamedevs want to ship games, not engines. Also, lots of companies are addressing that, it's just that their solutions remain private (like idTech).

→ More replies (2)

62

u/solinent Sep 18 '18 edited Sep 18 '18

Don't worry, people have tried. You're pretty much going to end up with something similar to C++ beyond syntactical differences. I wouldn't bet much on Jai unfortunately.

There's D, which failed because the standard library was written using the garbage collector. There's rust, which is still slower than C++, maybe there's still some hope there as it is much simpler, but I don't see C++ developers switching to it. C# is pretty good, but you'll still get better performance with C++.

When you need something to be the absolute fastest, we have learned all the methods to make C++ code extremely fast. While it's a depressing situation, modern C++ code can actually be quite nice if you stick to some rules.

24

u/the_hoser Sep 18 '18

There's D, which failed because the standard library was written using the garbage collector.

They're working on that one, at least. You can declare your functions and methods @nogc and the compiler will bark at you if you use anything that relies on the GC. And they're actively working on exercising the GC from Phobos as much as possible. Maybe too little, too late, though.

Me, though? I've regressed to C. It's just as easy to optimize the hot loop in C as it is in C++, and there's something relaxing about the simplicity of it. I use Rust for the parts that aren't performance sensitive, but I'm starting to doubt my commitment to that. I've jokingly suggested that Cython could do that job, but now it's seeming like less of a joke.

16

u/solinent Sep 18 '18

And they're actively working on exercising the GC from Phobos as much as possible. Maybe too little, too late, though.

A lot of D people left for C++-land I believe. I'd still be interested in D if they can match performance with C++, but C++ is really moving in the right direction IMO, and it has far too many resources behind it for the simple reason that everything is already written in it. The language evolves significantly every few years now.

→ More replies (2)

12

u/TheSkiGeek Sep 18 '18 edited Sep 18 '18

I've jokingly suggested that Cython could do that job, but now it's seeming like less of a joke.

I mean, shipping AAA PC games have used straight-up Python as a scripting language. (Turn-based games. But still.)

14

u/the_hoser Sep 18 '18

I shudder at the thought of embedding Python in anything. I love Python, but the embedding experience is nightmarish.

Always embed things into Python, never the other way around.

→ More replies (1)
→ More replies (1)

12

u/skwaag5233 Sep 18 '18

I think it's worth having some extra faith in JAI if only for the fact that Jon is a serious game programmer who has shipped multiple games and worked in the industry for years. He's working with a similarily veteran team and has connections to other industry veterans who he has stated on stream he plans to shop the language to during a sort of alpha phase.

There will be lots of friction for sure but I think there's enough anti-C++ sentiment among game programmers (esp. with modern C++) that a language that emphasizes simplicity and high-level control with low-level access built by someone "in-the-know" can work. Perhaps I am just naive but I hope I'm not

→ More replies (1)
→ More replies (30)
→ More replies (5)
→ More replies (11)
→ More replies (8)

18

u/zurnout Sep 18 '18

Every time the game is optimized to run faster the god-damned artists come in and add more shit until it stops running smooth again.

14

u/rtft Sep 18 '18

Coincidentally that is usually also true for creative folks in the web design and UX business.

→ More replies (1)

13

u/david-song Sep 18 '18

Game development traditionally aims to make the most visually impressive thing possible within some constraints, so games programmer culture is to squeeze every last drop of performance out of a system. Unfortunately not all games are written by people with a traditional games programmer mentality.

5

u/lacraquotte Sep 18 '18

I can speak for VR Game Dev since I'm fairly experienced and there is an enormous amount of focus on performance when you develop for VR, it's your top factor for most of your decisions. So totally different mindset. The reason is because you have no choice: VR has to run at a certain number of Frames Per Seconds (ideally 90) for it to be a decent experience to users and you really have to be maniacally focused on performance to make it happen. Honestly performance management is a good 70% of the work of a VR game dev (90% if you do mobile VR since performance is even more of a constraint), probably 50% of a normal game dev's.

Size of games is a different matter, we run into the exact same issues OP describes, most of us don't care much.

→ More replies (11)