Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C vs. Java for game programming [closed]

Tags:

I understand that C++ is generally considered better than Java for games (at least larger-scale games). Why is this?

What is keeping Java from being competitive in this field? Which reasons against using Java for game programming have the most basis, and which ones are myths?

EDIT: Am a bit unfamiliar with C/C++, and did not think to differentiate between the two at line 1 >.<

like image 447
Jonathan Avatar asked Oct 14 '09 23:10

Jonathan


People also ask

Is C programming good for games?

C++ C++ is the foundation of most major console and Microsoft Windows games. It's an object-oriented programming (OOP) language, meaning it organizes code into self-contained, reusable units. Those objects are designed to be reusable and movable, so you can code complex games without building everything from scratch.

Why is Java not used for games?

Gaming platforms: Ironically, the Java slogan “Write once, run anywhere” doesn't quite work in the world of video games. The most popular game consoles simply don't have a Java Virtual Machine. There are no fundamental or technical limitations for porting JVM on a console.

Is C++ better than Java in game development?

C++ helps to include lower memory footprint as it has no garbage collection. C++ can compile all C programs virtually allowing the developer to reuse C software. On the other hand, Java programs run faster than C++. Java code is compiled to Bytecode and is saved in .

Is C# better for games than Java?

C# is best suitable for Windows applications and video game development. It is often used for web applications and enterprise software too. While Java performs great for web apps and Android apps but also is known for its application in scientific and other high precision software.


1 Answers

The reason Java (and C#/.NET) is not a viable option for AAA titles at this point is the established game engines and their toolchains are written in C++. Game development is all about getting a title on the market in the shortest amount of time, and budgets don't allow for piddling in things like a new language/engine when several are already available, work well, and have an extensive set of editors and tools backing them.

Moving to Java (or C#) would also require a new performance-driven JVM (or CLI) across the big-3 (PC, X360, PS3) or big-5 (add Wii, iPhone). It's technically doable, but not financially viable.

Edit: Anyone with low-level knowledge of both virtual machines and the current state of game engines can tell you that a JVM or CLI could unquestionably be implemented with a new game engine to beat the performance of current C++ engines. The preventing factor is time and money, nothing more and nothing less.

like image 94
Sam Harwell Avatar answered Sep 27 '22 21:09

Sam Harwell