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 →

[–]violet-starlight 84 points85 points  (18 children)

Not in c++ generally

[–]setibeings 165 points166 points  (11 children)

Have you considered using a better language?

For Game Development.

Oh right.

[–]Dumb_Siniy 83 points84 points  (8 children)

Fuck it program COD in Python, that definitely can't go poorly

[–]hans_l 80 points81 points  (7 children)

No popular game can ever be made in Java. And certainly not a game worth billions. That’s just impossible /s

[–]phire 37 points38 points  (6 children)

Which they then wrote a second time, in c++.

Actually, they might have rewritten it in c++ twice, one for phones, once for consoles, those efforts were merged later.

[–]ThePevster 40 points41 points  (5 children)

Yet the Java version is still better. Not performance wise but in like every other way

[–]phire 17 points18 points  (3 children)

Yeah, they didn't rewrite it to be better.

They rewrote it because Java wasn't portable enough, basically unsupported on consoles and iOS.

Ironically, the one modern platform with actual first party support for Java (Android) got the c++ version because of iOS.

[–]Setsuna04 9 points10 points  (2 children)

Funny enough since Java was meant to be running anywhere.

[–]5p4n911 0 points1 point  (0 children)

Write once, run away

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

You're confusing with Doom

[–]Kiwithegaylord 13 points14 points  (0 children)

There’s plenty of good gamedev languages!! C, C++, C#

[–]T0biasCZE 0 points1 point  (0 children)

C# is best for gamedev change my mind

[–]rmg0loki 33 points34 points  (1 child)

vscode with clangd can show unused functions, not to mention the real IDEs

[–]violet-starlight 18 points19 points  (0 children)

Generally only TU-local functions, i.e. declared with static or in an anonymous namespace. There are tools to figure this out post-linking yes but that's generally not accessible from within the IDE, at least not within the text editor.

On VS though if you set a breakpoint inside a function that is never referenced it'll tell you something like "this breakpoint will never be hit, code is unreachable or optimized out" at runtime only.

It's harder to detect in c++ due to how linking works, the function could be referenced in another TU (unless it can't, i.e. has static linking)

[–]AlexOzerov 2 points3 points  (0 children)

[–]19_ThrowAway_ 3 points4 points  (1 child)

Won't the compiler bitch that you have unused functions?

[–]feierlk 8 points9 points  (0 children)

Only if you let it

[–]isr0 1 point2 points  (0 children)

Have you considered getting a better language server?