954,141 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

have you tried it? Have you actually gone out and built something in Java using the latest in available JVMs and libraries and done user experience testing on the result?

Of course you haven't. Your preconception of what would happen is all the proof you think you need.
Of course your lack of experience with Java also means you'd be unable to create that Java application to be optimised for performance, which is another problem for a new tool to gain acceptance in an established industry.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

But why? I actually have tried to do it, Java worked OK for this 3D game; comparable with C++ on the same machine; most of the speed problems were introduced via naive coding style. There aren't any show-stopping technical disadvantages to using Java; if releasing for the PC. Reasoning? The CPU intensive task that most games want to do is transform/lighting/texturing/etc - this is usually written in very low level code, and always accessed via some level of abstraction whatever platform is used. If you have low-level libs for physics aswell; the rest of the code in a game is usually 'light', event-based, quite dynamic; so, in a way, it doesn't matter what language you use for that part.

I didn't finish the game because I didn't finish the engine because it got stagnant and over-engineered. I'll happily write games in any language - some of the high level frameworks provide so many useful tools/libs, even runtimes these days. But.. if I was writing a tool, lib, or runtime; 'an engine'; I would want to do it in C++. In the games world C++ is more cross-platform-compatible than Java, it's got a proven track record; you rarely need to work at a lower level, but it is quite easily understandable, useable and well documented; a new language standard is going to be released soon, I don't see C++ stopping being de-facto.

The only time I'd want to use Java for any part of a game client, is if there was some platform-based reason for which Java HAD to be used; i.e. if the game had to be deployed through a browser, on a mobile phone, etc. If I had a choice between writing a game using an existing Java engine, using an existing C++ engine, or using an engine that compiles or interprets ECMAScript ( or similar ); assuming no constraints, and the same functionality and comparable speed from each engine; I would chose in the order ECMAScript, C++, Java.

Why? ECMAScript = multi-paradigm and highly unstructured, C++ = multi-paradigm, Java = rigidly OO. After core math-intensive graphics, physics/movement-feedback system, and general structural stuff is done; the only important thing is being able to make 'the game' - and this is often laughably high-level and inherently non-intensive code.. working with person not person.submodels[0,1..n].vertices[0,1...n].. As long as the ( context -independant ) engine is fast, well put-together, and appropriate; it actually doesn't matter so much what language you use to do the work that comprises a given game. I'd pick flexibility every time; I see C++ as more flexible than Java. Personal choice.

For writing an engine, or a one-off game; if the domain is fullscreen graphically intensive games, targeted for the PC and perhaps eventually consoles; there aren't any domain-relevant advantages to using Java; but there are domain-relevant disadvantages - there's no compatibity on the consoles, an arguably higher level of abstraction from the graphics subsystem, ethereal memory management, and everything, for better or worse, is a 'platform-independant standard'. If the domain is browser-launched thin-clients for some physics-light multiplayer game ( i.e. RPGS, they don't have 'physics' like FPS do ); Java wins for the same reasons in reverse.

jwenting, you can't argue non-experience or non-ability because very few people want to spend the time using Java for a certain purpose - Java rarely gets chosen for writing the core of 'high-end' games/engines because it's never been pushed as a platform for developing the core of 'high-end' games. I don't need to know from personal experience that a drill isn't the best tool for hammering nails.. I do - and it kinda works; perhaps it damages the drill in the long term; but that's besides the point, and deviating into irrelevance.

bnastic, you can't blanket-rule 'games' as some singular - there's many types of games, and usually some development constraint on each game, Java MIGHT be the right tool for a given job, client side or server-side. Depends on the job.

MattEvans
Veteran Poster
Moderator
1,386 posts since Jul 2006
Reputation Points: 522
Solved Threads: 64
 

he actual plot etc... is not a part of the engine. e.g one game engine (for example, the unreal engine) powers about 50 different games.

Dont use java though. 99% of game engines are C++

mohanrobin
Light Poster
34 posts since Nov 2007
Reputation Points: 36
Solved Threads: 0
 

For writing an engine, or a one-off game; if the domain is fullscreen graphically intensive games, targeted for the PC and perhaps eventually consoles; there aren't any domain-relevant advantages to using Java; but there are domain-relevant disadvantages - there's no compatibity on the consoles, an arguably higher level of abstraction from the graphics subsystem, ethereal memory management, and everything, for better or worse, is a 'platform-independant standard'. If the domain is browser-launched thin-clients for some physics-light multiplayer game ( i.e. RPGS, they don't have 'physics' like FPS do ); Java wins for the same reasons in reverse.

mohanrobin
Light Poster
34 posts since Nov 2007
Reputation Points: 36
Solved Threads: 0
 

>>i.e. RPGS, they don't have 'physics' like FPS do

most RPGs these days have advanced physics, as MMORPGs are the big thing (world of warcraft/guild wars)

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
 

Why did you repost exactly what I said, mohanrobin? :p use quote tags and only if you have something to say about what i had to say.

jbennet.. physics in most RPGs isn't as heavy as physics in most FPS; only because it's not as integral to the game experience. By that statement I meant, RPGs don't need to have, and don't tend to have, the same complex physics simulation as FPS; not that RPGs don't have any kind of physics and FPS do.

'Advanced physics' implies soft body/fluid dynamics and realistic destructable/multipart objects in this day and age =P.. First-person shooter/adventure engines are starting to have them, based on ( certainly approximate ) solvers that take alot of variables into account; those MMORPGs you listed might fake this on a certain level ( i.e., breaking and fluids based on pre-written animation ), and have some degree of rigid body simulation; but.. that's not advanced anymore. I hold by my statement, that RPGs don't ( generally ) have physics like FPS. Correct me if I'm wrong; I've only played WoW once at a trade fair.

MattEvans
Veteran Poster
Moderator
1,386 posts since Jul 2006
Reputation Points: 522
Solved Threads: 64
 

yeah, i was just thinking of the arrows, catapaults, spell clouds etc

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
 

the physics in any FPS I've played go no further than you sinking when you get into water.
The very best may see bullets of long range weapons drift with gravity and wind, but that's as far as it generally goes.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

In some FPS games of a few years ago; physics simulation is a part of gameplay.. Think Halflife 2; you throw things ( boxes, cars, etc ) around, they affect other things; in Red Faction, which is really quite old now; you can blow holes in walls. In other FPS games that I've played briefly, but not enough to remember specifics, you can hurt people by hitting them with shrapnel from exploded objects, take cover from explosions by ducking behind short walls, etc.. That isn't so advanced anymore, but; I would imagine, based only on the history of games so far, that the 'advanced' physics in any time period will be more prevalent in FPS than RPGs. For modern, look at anything that uses Ageia's PhysX SDK ( i.e. Unreal Engine 3 ), or Crytek's CryEngine2.. CryEngine has support for realistic ( and massive ) explosions and interaction with the environment, PhysX SDK potentially supports realtime soft body, cloth and fluid simulation.. There is more to physics in games than paths of bullets and the like... what's the last FPS you played?

Any RPGs I've played don't really have even single object, rigid-body physics; the map is usually non-modifiable, and when you destroy an object it just disapears. That's not to say it'd be unreasonable to put good physics in RPGs... just that it doesn't seem to get done.

Decent gameplay-altering physics in a massively online game of any genre would be hard to do; since it'd have to be calculated or syncronized exactly at both the server and the client(s). Not impossible, but perhaps unnecesary; unless physics really is integral to the gameplay.

MattEvans
Veteran Poster
Moderator
1,386 posts since Jul 2006
Reputation Points: 522
Solved Threads: 64
 

> I hold by my statement, that RPGs don't ( generally ) have physics like FPS. Correct me if
> I'm wrong
Agreed. The amount of physics in 'sports' games is also worth taking into consideration. RPG's as such don't rely much on physics as FPS and Sports games do since the focus is never on fast paced game-play or real time physics.

~s.o.s~
Failure as a human
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 733
 

it seems to be that most agree that the sheer speed of c++ does not make it more suitable for games.

the real problem is rather that neither java nor c# has the libraries for games that c++ has been accumulating for decades.

does this mean that once one of these languages acquire those libraries that c++ is going to have a competitor?

Ravenous Wolf
Junior Poster
164 posts since Aug 2007
Reputation Points: 33
Solved Threads: 1
 
neither java nor c# has the libraries for games that c++ ]

C# has excellent DirectX support so your comment is wrong

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
 

and Java has excellent OpenGL support and networking support that far exceeds anything C++ has to offer...

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 
Java has excellent OpenGL support and networking support that far exceeds anything C++ has to offer...

No, Java far exceeds what STANDARD c++ has to offer (which is nothing), but IMHO the libs available for c++ and java are about the same, only difference is java has a lot built in whereas standard c++ is very bare

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
 

C++ is what major software companies use to make games. End of story.

C++ will never be replaced by C# because they serve two totally different purposes... C# was not designed to make full fledged games. It is of course not imposible, but it is not feasible. You can do unmanaged in C#, but.. what's the point? C++ does that for you and is built for that reason.

I am a C# Developer and use it for the reason it was created. Enterprise Application Development.

mariocatch
Junior Poster
103 posts since Apr 2007
Reputation Points: 11
Solved Threads: 17
 
You can do unmanaged in C#,

No you cant.

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
 

>libraries

i am not talking about the standard C++ library. that i know is far more limited that either java or c#'s libraries. i am taliking about gaming libraries. those like ogre, alegra, boost and so on. i know little about games but i am sure that c++ has developed even more class libraries for gaming over the decades.

>C# for application development...
if c# was really always intended for application development then what is microsoft trying to do with XNA? are they just blowing smoke or do they actually believe that XNA and C# has a chance?

i know that c++ is faster, smaller in memory etc. but with computer power and memory size growing all the time how long is this going to be a factor?

i have tried to learn c++ and stopped since i had to start learning c# as well and there are only so many hours in a day. i did not find c++ that hard but it is still way harder than c#. if someone devotes himself to c++ then the difficulty should become negligable. so lets remove difficulty as a factor. why else would microsoft want to bet on XNA and c#? is it quicker to develop in c# when it comes to games? i know it is when it comes to application development?

@mariocatch

would you mind supplying reasons why you say its just not feasible?

Ravenous Wolf
Junior Poster
164 posts since Aug 2007
Reputation Points: 33
Solved Threads: 1
 
>C# for application development... if c# was really always intended for application development then what is microsoft trying to do with XNA? are they just blowing smoke or do they actually believe that XNA and C# has a chance?

XNA isnt designed for serious games, its for hobbyists. They are planning for C# Express + XNA to be the next QBASIC, if you know what i mean.

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
 

Like the previous poster said, if you plan on developing a full fledged game with XNA, you're outa your mind.

And yes, you can do unmanaged in C#. Look it up.

mariocatch
Junior Poster
103 posts since Apr 2007
Reputation Points: 11
Solved Threads: 17
 

I thaught you couldnt write unmanaged C# but you can call unmanaged DLLS and embed ASM in it

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You