fucking explain fluently why C++ is better than Java and Java will never be used for real games like Assasins creed Battlefield Diablo starcraft 2 fucking 0.001% of the awesome games c++ made.
But ye i need to explain to my friend that java is good and all but c++ is just better eod.
Tell your friend to read SICP, and that all games should be programmed in Scheme.
Name:
Anonymous2012-02-09 6:53
It's not "just better", nooblet.
Programming languages serve different purposes, that's why there are so many of them. C++ is better suited for certain tasks than Java and vice versa.
Games are a special domain of realtime computing, imposing certain constraints like a guaranteed maximum time spent computing and rendering a frame. C++ does not do anything behind its curtains (unlike Java), therefore you have better control of how much, when and where you spend your cpu cycles. That's the reason why AAA games use C++.
On the other hand, programming enterprise software in C++ is a waste of time, because the user usually does not care if his request is served in 0.0001 or 0.001 seconds. You get the point.
Name:
Anonymous2012-02-09 7:39
i actually am a nooblet^
and seems like a fairly simple response there
Even if games a driven by scripting languages, the cpu spends nearly all of its time in the C++ part of the engine/game, thus making it the crucial part for AAA games.
>>8
You're supporting a claim that C++ is better than Java for games.
But games are much more than engines, and Java could be better than C++ in other modules.
Sometimes you do. E.g. GTA is streaming all necessary data while you play. But as mentioned before, a lot of game logic is done nowadays using scripting anyways.
It's not weird if you look at it historically. Before hardware accelerated graphics cards became common in the late 90ies, a lot of code was done in C with performance critical sections (like software rendering) in asm. Transitioning from C to C++ was easy despite the lack standardized C++, as there were no real alternatives back then.
Name:
Anonymous2012-02-09 14:21
""and Java will never be used for real games ""
Shitty inter-op with C++. Shitty installer. Shit language doesn't have delegates. The cultural that comes with the Java language is incompatible with coding for games.
Java's GC is shit. It's optimised for high typical performance. Which means that on a regular basis it has to spend a fuckton of time reorganising the heap. You can't have that in a game.
Scripting languages (with GC even) are used in games. But Java is too big for that and has poor integration with C/C++. Lua on the other hand is easy to integrate with C/C++. And C# (unity) interoperates well with C/C++ libraries. Not to mention stack allocation, and the ability to manually control the lifetime of objects.