4 ms·
Computer games which are impacted by performance the most are written in what language?
by matjazmuhic 13y ago
Computer games which are impacted by performance the most are written in what language?
- venomsnake 13y agoI doubt that C++ is chosen because of raw performance (both C# and Java are close enough), but mostly because of memory and cpu cycle determinism.
- yeukhon 13y agoDoes it have anything to do with history? Given Java relying on JVM and in the beginning JVM's performance probably wasn't so good, game libraries were probably written in C, C++ and then nobody wanted to rewrite game engines because gaming industry is really fast-pace and very very busy.
- thirsteh 13y agoBoth: Manual memory management and library support.
- ksk 13y ago>I doubt that C++ is chosen because of raw performance As long as you're guessing, you can say anything you want. >but mostly because of memory and cpu cycle determinism. There is SOME memory determinism in C++. Much of the memory layout is left unspecified in the standard and left upto the implementations - e.g. virtual tables, exceptions, C++ standard library internals, primitive data type sizes, and a bunch of stuff that if listed one-per-line would take up dozens of pages.
- pmelendez 13y ago>"(both C# and Java are close enough)" Not really, a GC call in the middle of your render loop can drop your FPS rate significantly, and those cpu cycles are vital when you start adding physics simulation, not to mention the limitation of memory on consoles. Sure, Java and C# would be enough for minecraft or some xbox live puzzle game, but I really doubt that you could manage to write an Uncharted game in Java or C# on a PS3 or an Xbox.
- venomsnake 13y agoA GC call cannot drop your FPS a lot, but it could add a lot of latency spikes and inconsistent framerates. Techreport's inside the second is amazing read on the subject. So ... you will have slightly lower FPS (55 instead of 60) but much worse experience.
- camus2 13y agoC/C++ though game engines usually support higherlevel languages like Lua or Python.
- tokenrove 13y agoC with classes
- jeremiep 13y agoThe entire logic of most games is written in slow-ass languages like UnrealScript or LUA. The runtimes of the games are often code monstrosities wasting performance here and there. Performance is way over-rated.