[gameprogrammer] Re: Fast development over multiple platforms, which language?

  • From: "Jason Clark" <jclark@xxxxxxxx>
  • To: <gameprogrammer@xxxxxxxxxxxxx>
  • Date: Fri, 1 Apr 2005 14:26:52 -0800

Sorry, I'm stupid, that was the second page of the article. I can get a =
bit excited about these things.
The correct starting point is=20
http://www.gamasutra.com/features/20050324/steinmeyer_01.shtml

Thanks,
Jason.

> -----Original Message-----
> From: gameprogrammer-bounce@xxxxxxxxxxxxx=20
> [mailto:gameprogrammer-bounce@xxxxxxxxxxxxx] On Behalf Of Jason Clark
> Sent: Friday, April 01, 2005 2:48 PM
> To: gameprogrammer@xxxxxxxxxxxxx
> Subject: [gameprogrammer] Re: Fast development over multiple=20
> platforms, which language?
>=20
>=20
> This weeks Gamasutra article is awesome and just saved me=20
> tons of =3D research time if anyone is interested.=20
> http://www.gamasutra.com/features/20050324/steinmeyer_02.shtml
>=20
> Jason.
>=20
>=20
>=20
> > -----Original Message-----
> > From: gameprogrammer-bounce@xxxxxxxxxxxxx=3D20
> > [mailto:gameprogrammer-bounce@xxxxxxxxxxxxx] On Behalf Of brianevans
> > Sent: Wednesday, March 09, 2005 9:36 AM
> > To: gameprogrammer@xxxxxxxxxxxxx
> > Subject: [gameprogrammer] Re: Fast development over multiple=3D20 =20
> >platforms, which language? =3D20
> >=3D20
> >=3D20
> > >I am not going to argue with anyone over the difference=3D20
> > between fashion=3D20
> > >and habit :-). How about we call it cultural inertia? We can let=20
> > >the=3D20 term cover every factor from fashion to habits as well =
as=3D20
> > factors like=3D20
> > >the preponderance of books and libraries.
> >=3D20
> > Well, I know it seems piddly, but to me theres a difference=3D20 =20
> >between people=3D20  using things because it's new and trendy=20
> and cool,=20
> >and people=3D20  using things=3D20
> > because they've been using it for years and it works.
> >=3D20
> > I would argue that Java is the fashionable trendy language=3D20
> > nowadays.  Especially in the business sector.
> >=3D20
> > But I agree to your term.  We're not really interested in=3D20
> > sociology here,=3D20
> > after all. :)
> >=3D20
> >=3D20
> > >Lets face it, it is much
> > >easier to find a book written about doing game programming=3D20
> > in C++ than=3D20
> > >in about any other language. I'm not saying the other=20
> books don't=3D20=20
> > >exist. They do. But a quick look at the games section at B&N=3D20
> > shows what=3D20
> > >we are talking about, tons of books based on C++, nearly=3D20
> > none on Java.
> > >
> > >Then there is the huge number of libraries written in C and C++=20
> > >that=3D20 you can "just use" in C++. To use them in Java you have =
to=20
> > >write an=3D20 interface using JNI. Every written a JNI interface? I =

> > >have, it is a=3D20 pain in the @$$. So, Java by itself has created =
a=20
> > >huge barrier to=3D20 people using it for games by making it=20
> so hard to=20
> > >access C/C++=3D20 libraries.
> >=3D20
> > I have yet not delved into what seems like the wonderful world of=20
> >JNI=3D20  interfaces.  Yes, sarcasm. :)  Whenever you get=20
> something so=3D20 =20
> >successful and=3D20  established, so driven by cultural inertia, it=20
> >becomes hard=3D20  to get rid of,=3D20
> > even in the face of superior technology. Witness:=20
> Microsoft, x86, web=3D20
> > browsers/applications and, yes, C++.  Now, I'm not yet ready=3D20
> > to concede=3D20
> > that Java is superior technology.  However, Java is more=3D20
> > modern, has a lot=3D20
> > of attractive features, and appears to have fixed a lot of=3D20
> > performance=3D20
> > issues whose reputation it can't quite shake loose.  In C++'s=3D20
> > defense (or=3D20
> > not), the language has stagnated.  Maybe the people in charge=3D20
> > of the C++=3D20
> > standards are to blame, I don't know.  Why they haven't=20
> integrated=3D20
> > something like Boost into the standard when C++ desperately=3D20
> > needs a library=3D20
> > like Boost is beyond me.  Perhaps 'D' is the next step for C++:=3D20
> > http://www.digitalmars.com/d/overview.html   But new=3D20
> > languages mean doing=3D20
> > everything over again.
> >=3D20
> > > > It was not that long ago that we had sub Ghz processors=20
> and memory=20
> > > > was expensive, compared to now.  On Win95/98=3D20
> > era hardware=3D20
> > > > (100-500 Mhz machines, 64-128MB ram), the only choice=20
> that made=3D20=20
> > > > sense for serious games was C/C++.  Java has just=3D20
> > recently (2001+ at=3D20
> > > > least ;) ) become viable for games, IMO, because the=20
> JVM's have=3D20=20
> > > > gotten better, and/or the increase in hardware=20
> performance and=3D20=20
> > > > available memory hides the performance hit.  I would=20
> not have=3D20=20
> > > > considered it viable for any but the most basic of=20
> games in 2001.
> > >
> > >Can't disagree with you on that. 'though, I know people were=3D20
> > trying to=3D20
> > >do serious games in Java as early as 1996. But, that was=3D20
> > mostly for the=3D20
> > >server side on networked games. Even back then a Java server=3D20
> > running on=3D20
> > >a 100Mhz Pentium could saturate a T1.
> > >
> > > > I'm not talking about mobile games.  Any mobile class=3D20
> > game will get
> > > laughed
> > > > out of the serious PC game arena.
> > >
> > >Ok, I think we need to define what you mean by "serious=3D20
> > game" because I=3D20
> > >take any game that generates revenue seriously. :-) What do=3D20
> > you mean by=3D20
> > >the phrase?
> >=3D20
> > That's a fair point.  If a game makes money, certainly=20
> it=3D20  should=20
> >be taken=3D20  seriously.  However, the level of expectations=20
> for a phone=20
> >game, when=3D20  compared to a PC game, is vastly different. =20
> It's akin=20
> >to comparing a=3D20  gameboy game to a gamecube one, except more=20
> >exaggerated. =3D20
> > But I didn't mean just any PC game that makes money.  I meant =
the=3D20
> > commercial games that all the gamers get excited about, and=20
> sorry, I=3D20
> > haven't heard a gamer rant about the greatness of bejeweled=3D20
> > lately. :)  You=3D20
> > know the ones that push the technological edge like Rome=3D20
> > Total War, Doom 3=3D20
> > and Half Life 2.  The ones that independent developers like=3D20
> > us have no hope=3D20
> > whatsoever of developing. :P
> >=3D20
> > The point is well taken.  I would probably be happy with=3D20
> > writing a game=3D20
> > that made money, but I wouldn't be satisfied.  I think I=3D20
> > would have to=3D20
> > write a game that I and others would want to play that did at=3D20
> > least one=3D20
> > thing in a fairly novel way to be truly satisfied.  Oh yes,=3D20
> > money would be=3D20
> > nice too. :)
> >=3D20
> >=3D20
> > >More examples of cultural inertia.
> > >
> > >Yep. No question.
> > >
> > >Define "memory efficiency". Do you mean total memory used? Or do=20
> > >you=3D20 mean time spent managing memory? Or, do you mean (ok, I=20
> > >know=3D20
> > you don't
> > >mean) programmer time spent on memory management.
> >=3D20
> > I can tell I need to be careful here. :)  I meant memory size=3D20 =20
> >efficiency,=3D20  but its not really just size, more along the=20
> lines of=20
> >only=3D20  using the memory=3D20
> > I have to at a certain time to perform a task.    Java does=3D20
> > have the memory=3D20
> > size overhead of the JVM, and as you said they trade size for=3D20
> > performance.  I did not mean programmer time spent on memory=3D20
> > management,=3D20
> > unless that programmer was going for a real time java app. :)
> >=3D20
> > >Yep, most programmers do not know who to program using a=20
> garbage=3D20=20
> > >collector. Even in Java you can statically allocate variables,=20
> > >even=3D20 string buffers, so that the GC *never* gets invoked and=20
> > >you=3D20
> > never get a=3D20
> > >GC hiccup. If you must dynamically allocate memory you can do=20
> > >thing=3D20 like calling the GC explicitly at reasonable times =
to=3D20
> > collect garbage=3D20
> > >before it causes a GC stall. The fact that Java is noted for=3D20
> > GC stalls=3D20
> > >tells you something about the lousy job they have done on=3D20
> > the storage=3D20
> > >allocation system. :-(
> >=3D20
> > I confess I don't know all the tricks to avoid GC hiccups,=20
> I=3D20  just=20
> >know some=3D20  exist.  Sometimes its nice to be able to explicitly=20
> >allocate=3D20  and deallocate=3D20
> > memory.  That hybrid system listed in 'D' sounds intriguing,=3D20
> > maybe optimal.=3D20
> > I wonder why java didn't let you override.  I guess they were=3D20
> > afraid of=3D20
> > giving programmers a hand grenade because they might blow=3D20
> > themselves up=3D20
> > with it.  Sometimes you need a hand grenade though.
> >=3D20
> > >I have in fact written simple games and a real time=20
> telephone link=3D20=20
> > >using Java and did not *ever* have a pause due to the GC.=3D20
> > But, then, I=3D20
> > >*do* know how to program using a GC.
> >=3D20
> > It's nice to know its possible. :)  I just wish you=20
> didn't=3D20  have to=20
> >rely on=3D20  certain restrictions to do it.
> >=3D20
> >=3D20
> > >It is interesting to look at languages like Perl and Python=3D20
> > that both=3D20
> > >have garbage collection and do not suffer from GC stalls (at=3D20
> > least not=3D20
> > >that you would notice) To the best of my knowledge those=3D20
> > languages use=3D20
> > >reference counting storage allocators. A lot of C++ programs=3D20
> > also use=3D20
> > >reference counters through a smart pointer type. Reference=20
> > >counting=3D20 allocators use much more of the total runtime than=20
> > >garbage=3D20
> > collecting=3D20
> > >allocators do. But, they spread it out over time so you don't=20
> > >notice=3D20 it.
> > > >From a total run time point of view reference counting is=3D20
> > a horrible
> > >thing, but from a psychological point of view, it wins every time.
> > >
> > >BTW, both Python and Perl are also compiled some version of=3D20
> > byte code=3D20
> > >and interpreted.
> >=3D20
> > I like Perl and its mutant cousin PHP.  I have yet to=20
> program=3D20  in=20
> >Python,=3D20  but I know people swear by it.  I saw some benchmarks=20
> >that=3D20  had Perl an=3D20
> > order of magnitude or two behind both C++ and Java (1000=3D20
> > seconds vs 10=3D20
> > seconds).    Which, if they are to be believed, shows that I=3D20
> > was wrong=3D20
> > about Java being interpreted class, and that Java is a lot=3D20
> > faster than true=3D20
> > interpreted languages.
> >=3D20
> > I would guess its a response time thing.  Most people don't=3D20
> > care of things=3D20
> > take a little while longer, as long as the app doesn't freeze=3D20
> > and hang up a=3D20
> > "out gathering twigs and memory" sign on the front window.
> >=3D20
> > >If you write Java code that dynamically allocates lots of=3D20
> > memory and do=3D20
> > >not control the operation of the GC you will still run into=3D20
> > GC stalls.=3D20
> > >The size of the memory tends to make the initial stall even=3D20
> > longer than=3D20
> > >before.
> >=3D20
> > Hopefully the size of the memory would allow you to avoid=3D20  =
doing=20
> >that while=3D20  actually in a game, or at the least hold off until=20
> >between levels. =3D20
> > >This is very rare these days and any such code would be=20
> put in a=3D20=20
> > >library and accessed through JNI. Which is, for example, exactly=20
> > >how=3D20 the SIMD blit code in SDL is accessed from Java.
> >=3D20
> > Yes, you're right.  The JNI stuff actually sounds cool, in=3D20  =
that=20
> >its cool=3D20  that java can actually call C++ libs.  But its=20
> not java=3D20
> > that's doing the=3D20
> > low level stuff.  Then again if you're writing ASM its not=3D20
> > really C/C++ either.
> >=3D20
> > >Ok, this statement doesn't have any meaning. It is an=20
> appeal to an=3D20=20
> > >authority based on a personal opinion. An argument cannot be=3D20
> > based on a=3D20
> > >personal opinion of what someone else may or may not do. Unless,=20
> > >of=3D20 course, you are actually Carmack masquerading as Brian.
> > >
> > >Thought I would just point that out.
> > >
> > >BTW, my personal opinion is that Carmack wants to spend=20
> his time=3D20=20
> > >building spaceships and will do what ever he needs to to get=3D20
> > the cash=3D20
> > >he needs to build spaceships, including writing video games.=3D20
> > Of course,=3D20
> > >that is only my opinion.
> >=3D20
> > It's a valid opinion.  I think he's bored with=20
> programming=3D20  games=20
> >(arguably,=3D20  game engines).  I wasn't appealing to Carmack on an=20
> >authority=3D20  basis, but=3D20
> > more on a personality basis.  He's the type of programmer who=3D20
> > will go low=3D20
> > level, or tweak things to push the edge.  Java just isn't the=3D20
> > language for=3D20
> > him.  And I'm flattered, but no I'm not Carmack. :P  But I=3D20
> > did read a book=3D20
> > about him (Masters of Doom) and id, so I'd say I'd have some=3D20
> > basis for=3D20
> > knowing something about his personality.  But you're right,=3D20
> > it doesn't mean=3D20
> > anything more than what I think Carmack would not do, given=3D20
> > the facts I=3D20
> > know about him.  I do doubt that you could write Doom3 in=3D20
> > Java right now,=3D20
> > as it runs pretty slow as it is on current hardware.  But=3D20
> > maybe that's just=3D20
> > my "Java is slow" prejudice getting in the way again.
> >=3D20
> > > > Maybe you will do something that requires
> > > > hand-optimized Assembly loops?
> > >
> > >Separate file, JNI interface. Of course, as I said before, JNI is=20
> > >a=3D20 PITA.
> > >
> > > > Maybe the JVM can optimize it enough for
> > > > you?  Granted, most of us will probably never need that control.
> > > >
> > > > If you're writing a Bejeweled clone, I doubt any of this=3D20
> > matters. =3D20
> > > > If you were writing Quake 2 in 1997, you had to pick=3D20
> > C/C++.  If you=3D20
> > > > were writing Quake 2 now, maybe you could use Java.  If you=20
> > > > were=3D20 writing Doom 3 now,
> > > I'd
> > > > think you'd have to use C/C++.  But for most of the games=3D20
> > most of us=3D20
> > > > can make right now, it really doesn't matter, though its=3D20
> > nice not to=3D20
> > > > have to worry about a JVM being installed.  But then=3D20
> > again, it would=3D20
> > > > be nice
> > > not to
> > > > worry about memory leaks.  Ahhh, tradeoffs.
> > >
> > >Exactly!
> >=3D20
> > Finally!  More like it. Hehe.
> >=3D20
> > We probably will see a trend reversal soon.  CS students at=3D20  UT =

> >these days=3D20  get Java as their entry language (which=20
> really sucks as=20
> >the=3D20  intro level CS=3D20
> > class they made me take, after I had already taken the entry=3D20
> > level C++=3D20
> > class, was HASKELL taught by a HASKELL ZEALOT!).  Anyway,=3D20
> > they get out=3D20
> > thinking that Java is the best language ever.  And it IS=3D20
> > trendy, especially=3D20
> > in the business sector.
> >=3D20
> > So maybe fashion has more to do with it than I originally=3D20
> > thought.  Fashion=3D20
> > gets the cultural inertia ball rolling, and habit keeps it=20
> bouncing=3D20
> > along.  It will probably start with the Java phone games and=3D20
> > then trickle=3D20
> > upwards into PCs.
> >=3D20
> > >But it is so much fun!
> >=3D20
> > And educational to be sure.  But its a lot of time spent=3D20 =20
> >developing the=3D20  tool to make your game, when you could=20
> just buy the=20
> >tool and have fun=3D20  modifying the tool to make your game. Most=20
> >independent devs=3D20  frankly won't=3D20
> > have the time or ability to write a full featured engine that=3D20
> > can handle=3D20
> > complicated games.  I know I don't at the moment.
> >=3D20
> > > >
> > > > Geez, I write too much.
> > > >
> > >
> > >We both suffer from that disease :-). I think this is a good=3D20
> > discussion=3D20
> > >though.
> >=3D20
> > I hope so.  Tell you what though, I'm running out of steam.=20
> =3D20  You=20
> >got me=3D20  saying that Java is not as slow as I thought it=20
> was and is=20
> >a=3D20  valid choice=3D20
> > for games.  I really don't see it being used for AAA=3D20
> > commercial cutting=3D20
> > edge games in the short term, but it is wrong to simply write=3D20
> > it off for=3D20
> > every game idea since it will be a valid choice for most of them.
> >=3D20
> > So I would say I learned quite a bit. :) (phew.)
> >=3D20
> > brian.
> >=3D20
> >=3D20
> > > > brian.
> > > >
> > >
> > >                 Bob Pendleton
> > > >
> > > >
> > > > ---------------------
> > > > To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >---------------------
> > >To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> >=3D20
> >=3D20
> >=3D20
> > ---------------------
> > To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> >=3D20
> >=3D20
> >=3D20
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.857 / Virus Database: 584 - Release Date:=20
> 2/10/2005  =3D20
> >=3D20
> > --=3D20
> > No virus found in this incoming message.
> > Checked by AVG Anti-Virus.
> > Version: 7.0.308 / Virus Database: 266.9.0 - Release Date: 3/31/2005
> > =3D20
> >=3D20
>=20
> --=3D20
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.0 - Release Date:=20
> 3/31/2005 =3D20
>=20
>=20
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>=20
>=20
>=20
> --=20
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.0 - Release Date: 3/31/2005
> =20
>=20

--=20
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.0 - Release Date: 3/31/2005
=20


---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: