•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Game Development section within the Software Development category of DaniWeb, a massive community of 456,595 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,443 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Game Development advertiser: Programming Forums
Views: 8970 | Replies: 74
![]() |
The main issue here is not which language will execute faster .... it hardly matters for most computers when the games are mid to small, there will be plenty of processing power left over.
Only huge 3D games will require the raw power C/C++ allows, but as there's more complexity and time overheads associated with C/C++ coding.
Java may have it's restrictions but when it comes to cross-platform compatibility, it wins hands down against C++..... and for many developers that is more important factor.
Lower level acess for C/C++ makes it more difficult to make it totally cross-platform, and you will need separate binaries for each.
If you want to do cutting edge stuff C++ is the way to go. All the latest APIs, Engines etc use it and it saves a lot of time in development.
If you want cross-platform compatibility and easy of deployment or do small time stuff.. java ... although it has improved a lot and now you have DX and OGL bindings in java... so you can do cutting edge stuff there, but it would be a bit slower.
So to finish this off C/C++ or Java it does not really matter for most games. If you do comparisons efficiency would almost be at par. It's mostly deciding which lang would be more efficient for you to code in and deploy.
Large 3D games are out of reach for java atm, but there are promising engines out there, using java technology to bring 3d games into the browser and with better hardware we get these days .... who knows.
Only huge 3D games will require the raw power C/C++ allows, but as there's more complexity and time overheads associated with C/C++ coding.
Java may have it's restrictions but when it comes to cross-platform compatibility, it wins hands down against C++..... and for many developers that is more important factor.
Lower level acess for C/C++ makes it more difficult to make it totally cross-platform, and you will need separate binaries for each.
If you want to do cutting edge stuff C++ is the way to go. All the latest APIs, Engines etc use it and it saves a lot of time in development.
If you want cross-platform compatibility and easy of deployment or do small time stuff.. java ... although it has improved a lot and now you have DX and OGL bindings in java... so you can do cutting edge stuff there, but it would be a bit slower.
So to finish this off C/C++ or Java it does not really matter for most games. If you do comparisons efficiency would almost be at par. It's mostly deciding which lang would be more efficient for you to code in and deploy.
Large 3D games are out of reach for java atm, but there are promising engines out there, using java technology to bring 3d games into the browser and with better hardware we get these days .... who knows.
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 971
Reputation:
Rep Power: 5
Solved Threads: 48
Agreed.. But I don't see C++ as more, or Java as less time consuming to work in than any other language, once I know what needs to be done and how to best go about it. Depending on the app, C++ might be easier : with third party libraries, the need to write code for different platforms in C++ can often be removed anyway - graphic libs, input libs, thread libs, network libs; they are written to be machine independant with a common interface. I guess that's the whole point of Java, in that it's ALL a common interface; which is, I suppose, a natural progression. If more game-specific libs were available on Java, and if the language wasn't so abstracted and neutered; It'd perhaps be a better choice for 'bigger' games than it is at the moment. Unrelated; I actually prefer C# to Java, although it's still lacking in terms of the capabilities afforded by the base language - no multiple inheritance, no 'const' in the C++ sense, no stack-allocated class-type ( polymorphically-capable ) objects, forced non-deterministic garbage collection and no manual memory management... But, you can write inline code with pointer arithmetic, and marshal C++ objects in and out of the managed system, pass-by-value or reference in some circumstances, use closures/anonymous functions, use a function pointer-like/event-based syntax, it's quite fast to work in, since it has a reasonable DX-wrapping game framework library that works on the XBox 360 and PC. But, poor support outside of Microsoft platforms of course...
Plato forgot the nullahedron..
> There's nothing special in Java that doesn't exist in C++
Security as a language feature.
> A better model IMO is to use C++ and/or C for the raw engine and embed to or call
> from a very dynamic interpretted language
This approach has been used from times unknown. Letting C/C++ handle the rendering / physics while the developer can script away the entire game is the way to go. Graphics Engine / Physics engine / Particle engine come in as pluggable modules with a well exposed API. Look into games like 'Severance the Blade of Darkness or Freedom Force' which use Python as the scripting language.
> But not for the client end of a 3D FPS engine on PC/console with hot physics, graphics
> and the rest.
Agreed. Java has a long way to go.
>Why even try?
Because success comes to us only when we get used to failures.
> So to finish this off C/C++ or Java it does not really matter for most games.
It does matter. Every layer of abstraction has it's own price to pay. When we run C++ programs, what we run is raw machine code. When we run java programs, what we run is the JVM which loads the bytecode, converts it into machine code using JIT which is then executed.
>Unrelated; I actually prefer C# to Java,
Microsoft made a smart move by coming up with XNA in an attempt to push C# as a mainstream game programming language. Maybe java needs to do something along those lines...
Security as a language feature.
> A better model IMO is to use C++ and/or C for the raw engine and embed to or call
> from a very dynamic interpretted language
This approach has been used from times unknown. Letting C/C++ handle the rendering / physics while the developer can script away the entire game is the way to go. Graphics Engine / Physics engine / Particle engine come in as pluggable modules with a well exposed API. Look into games like 'Severance the Blade of Darkness or Freedom Force' which use Python as the scripting language.
> But not for the client end of a 3D FPS engine on PC/console with hot physics, graphics
> and the rest.
Agreed. Java has a long way to go.
>Why even try?
Because success comes to us only when we get used to failures.
> So to finish this off C/C++ or Java it does not really matter for most games.
It does matter. Every layer of abstraction has it's own price to pay. When we run C++ programs, what we run is raw machine code. When we run java programs, what we run is the JVM which loads the bytecode, converts it into machine code using JIT which is then executed.
>Unrelated; I actually prefer C# to Java,
Microsoft made a smart move by coming up with XNA in an attempt to push C# as a mainstream game programming language. Maybe java needs to do something along those lines...
I don't accept change. I don't deserve to live.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
•
•
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation:
Rep Power: 32
Solved Threads: 305
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 19
Solved Threads: 200
Java has excellent IDEs. IntelliJ is second to none, far superior to MSVS (and a lot cheaper too).
Eclipse and JBuilder aren't bad either.
Netbeans indeed is a disaster.
>> There's nothing special in Java that doesn't exist in C++
>Security as a language feature.
Networking as a language feature.
Multithreading as a language feature.
Standardised user interface libraries as a language feature (less useful for games as those generally don't use regular user interface elements).
Java was never conceived for making games, but it's quite capable if used by people who know what they're doing.
The main reason there's not been major adoption in the game industry is the incredible resistance to change in that industry, an industry where many still work in raw assembler or C because they consider C++ "too slow" (or too cumbersome, too modern, and a variety of other non-reasons).
Java is over a decade younger than C++, and is only now gaining acceptance.
There are several game engines (including complete 3D engines) for Java out there, and far more serverside code for game servers that use C++ (for example) client applications on a Java backend.
http://www.jmonkeyengine.com/ is a good example. I've not used it but it certainly looks powerful.
Eclipse and JBuilder aren't bad either.
Netbeans indeed is a disaster.
>> There's nothing special in Java that doesn't exist in C++
>Security as a language feature.
Networking as a language feature.
Multithreading as a language feature.
Standardised user interface libraries as a language feature (less useful for games as those generally don't use regular user interface elements).
Java was never conceived for making games, but it's quite capable if used by people who know what they're doing.
The main reason there's not been major adoption in the game industry is the incredible resistance to change in that industry, an industry where many still work in raw assembler or C because they consider C++ "too slow" (or too cumbersome, too modern, and a variety of other non-reasons).
Java is over a decade younger than C++, and is only now gaining acceptance.
There are several game engines (including complete 3D engines) for Java out there, and far more serverside code for game servers that use C++ (for example) client applications on a Java backend.
http://www.jmonkeyengine.com/ is a good example. I've not used it but it certainly looks powerful.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Project Darkstar (Project Darkstar Community - Home), developed by Sun Labs, is also taking aim at massive online games on Java.
•
•
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation:
Rep Power: 32
Solved Threads: 305
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 19
Solved Threads: 200
Swing indeed. And before that AWT (which is still at the back of Swing in the non-visual area).
There's nothing like that for C++. Each compiler and platform has its own user interface libraries, and often a plethora of them, some of which work only on some platforms and libraries and others on others.
There's nothing like that for C++. Each compiler and platform has its own user interface libraries, and often a plethora of them, some of which work only on some platforms and libraries and others on others.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
•
•
I think java needs a batter IDE. Netbeans is crap compared to VisualStudio
Yeah I agree with Bennet. I think microsoft have been clever by releasing the express editions without any time restriction clauses. It has restrictions with databases but the express editions are more or less the polished end product. I noticed intelliJ has a 30 day trial period, so if it is as good as Wenting says, which I'm sure it is, the restriction would put a lot of people of.
In that case it is no wonder why a lot of people go on about the ease and superiority of visual studio. I think sun needs to do something about that perhaps?
... the hat of 'is this a cat in a hat?'
•
•
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation:
Rep Power: 32
Solved Threads: 305
•
•
•
•
Yeah I agree with Bennet. I think microsoft have been clever by releasing the express editions without any time restriction clauses. It has restrictions with databases but the express editions are more or less the polished end product. I noticed intelliJ has a 30 day trial period, so if it is as good as Wenting says, which I'm sure it is, the restriction would put a lot of people of.
In that case it is no wonder why a lot of people go on about the ease and superiority of visual studio. I think sun needs to do something about that perhaps?
Yeah, IMHO the express editions are almost exactly the full ones except for the lack of some things relating to databases, deployment, source control and mobile development
TRY MY SUGGESTIONS AT YOUR OWN RISK
Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
![]() |
•
•
•
•
•
•
•
•
DaniWeb Game Development Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
advertising ajax asp blogging browser business code console development engine firefox game games google hardware intel internet java linux marketing math microsoft mozilla msdn news nintendo playstation programming ps3 revenue rss search security seo software sony stocks technology video video game vista w3c web web development wii wiki windows xbox 360 xml yahoo
- Java Game Engine for a Game called "Attaxx". (Game Development)
- Game engine for car engine (Game Development)
- Game engine (C++)
- Game Engine Code [Help] (Game Development)
- Game Engine (C++)
Other Threads in the Game Development Forum
- Previous Thread: Help me whit algorithm for my web-based game
- Next Thread: Can you have a look to my game?



Linear Mode