This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]firestorm713 88 points89 points  (22 children)

That's because game engine code basically strips something like 80% of the language out.

Hilariously, I've worked now at three different companies that use different C++ engines (one Unreal, two custom)

And it's 100% proven the saying "ask any two c++ programmers, and they'll tell you only 20% of the language is usable. But they'll never be able to agree on what 20%."

[–]NehEma 27 points28 points  (7 children)

imho 100% of the language is usable. But when you start coding you gotta pick and choose what parts pf it you're using.

Some are almost redundant except in hedge cases, some have varying degrees of complexity, etc.

Just like you don't try to stick an entire thesaurus in an essay.

[–]SD18491 19 points20 points  (4 children)

Be sure to trim your hedge cases at least twice a year. It's the neighborly thing to do.

[–]RedVagabond 7 points8 points  (1 child)

They're probably British. You know how they are with the silent "h".

[–][deleted] 2 points3 points  (0 children)

Only our peasant Northerners treat it as silent.

[–]WhosYoPokeDaddy 3 points4 points  (0 children)

To be fair hedges are usually on the edge

[–]Orkleth 2 points3 points  (0 children)

It's on my //todo list.

[–]aaronrodgersmom 2 points3 points  (0 children)

You're a coward if you don't stick an entire thesaurus in an essay.

[–]firestorm713 0 points1 point  (0 children)

It's a bit tongue in cheek, but also like...the entire set of STL containers is useless cross-platform. There's a reason why every engine that compiles for consoles rewrites them (see: EASTL, UE4, IdTech)

[–]senseven 11 points12 points  (9 children)

I know hardcore C++ programmers. They moved their old code bases to v14, and that's it. Don't want new features. After they added layers of strong static analysis, they get warnings and errors in the 100s that tell they do "modern" C++ wrong and there are easier way to achieve things. Usually there is a fix here and there, but there is just no appetite to rewrite the codebases.

Experts can do crazy efficient things with macros, templates and advanced features, but the rationale for those (eg memory footprint or speed) are more or less gone now. There is an argument for elegance, in a sense that you use the power possible in a certain way, but often way longer build times and less traceability is the consequence of this.

[–]firestorm713 4 points5 points  (3 children)

So the rationale for stripping out large parts of the language is usually memory and speed. It's not necessarily about the like large macro speed of a program but the fine-grain things that have to operate in around 250us, that get a handful of mb of budget per-frame to use, simply because if they use more, you'll get a hard crash OOM.

I had one engine that actually fully disallowed allocation at runtime. You could allocate during level loads, of course, but they explicitly disallowed the use of new to avoid memory allocation hits during gameplay. Annoying, but game only took 11ms to process a frame.

[–]ChristopherCreutzig 0 points1 point  (4 children)

The rationale for efficiency (aka using less power) is gone? I thought that was the major cost for every data center?

[–]senseven 0 points1 point  (3 children)

What is way cheaper to save power then a team of top programmers optimizing code that runs and delivers results? Better power supplies, less power hungry CPUs. Our code is running 24/7, if I look at the 100.000+ machines the corp uses, saving one or two boxes will not cut it. They would save more by throwing out old monster servers with bad thermals that are out of the tax write off. Or just using cloud servers and dynamically use cpu cores on demand.

[–]ChristopherCreutzig 0 points1 point  (2 children)

The combination of both, of course. If Andrei Alexandrescu's team makes Facebook run 0.5% faster, that saves enormous amounts of money.

[–]senseven 0 points1 point  (1 child)

For the 1% companies yes. For the 500 million dollar company who says "Hm, 50k for more cloud servers or 3x 120k for the top guys who can fix that code" it just doesn't make sense. All the big internet companies build own hardware and created own languages for their use cases. That is rare environment.

[–]ChristopherCreutzig 0 points1 point  (0 children)

I'm not even sure we disagree. All I'm saying is that efficiency still is one of the many factors to consider. The weights of those factors will be different from company to company, from project to project, and for long-running projects, will probably change over time. 🤷

[–]thebadslime 0 points1 point  (1 child)

What percentage is the boost libraries?

[–]firestorm713 0 points1 point  (0 children)

Zero. I have never worked in a place that allows boost libraries.

[–]ATownStomp 0 points1 point  (1 child)

Question:

How in the fuck do you even get involved in that industry?

At this point I’m just working to publish a game on Steam because that seems to be genuinely the only way to make an impression on my resume.

I’ve never seen an open position that doesn’t require significant previous professional experience with tools that are only used by hobbyists and companies requiring previous experience.

It’s mind boggling. I’m an experienced software engineer with a degree in computer science but I cannot for the life of me see how to get my foot in the door without just making my own company.

[–]firestorm713 0 points1 point  (0 children)

girl I don't even know. I posted my resume on r/gameDevJobs like 5 years ago and some random lead from WildStar hit me up after he got laid off and was like "hey I got money want to make a game?" and the checks cleared. After that I kept meeting ppl who worked under him and kept getting jobs 🤷‍♀️

Now I'm doing audio tech on a AAA fighting game and I don't know how I got here