[Ocaml-biz] Java and Games

Steve Taylor staylor at uidaho.edu
Fri Sep 10 14:08:37 PDT 2004


On Fri, 10 Sep 2004 15:33:24 -0500 (CDT)
Brian Hurt <bhurt at spnz.org> wrote:

> I was going to post this to the Ocaml Games mailing list, but seem to
> have mislaid the address for that list.  

ocamlgames at yahoogroups.com

> It's mostly on topic here:
> http://developers.slashdot.org/article.pl?sid=04/09/08/1452203
> 
> Someone has implemented Doom II in Java.  Yes, this is an old game,
> but the Java performance is reportedly comparable to the straight C 
> performance.

Quake II you mean.  An old game, but relevant even today in my
opinion.  Certainly an interesting and impressive achievement. They say
the framerates are 85% of the original C code. From the benchmarks it
looks like performance is indeed good.  It would be very
interesting to see a similar port done in OCaml.

> My opinion of what is going on here: the heavy lifting is being done
> by the OpenGL renderer.  If 95% of the computation is being done by
> OpenGL, even if the Java is half the speed of C, that still only
> translates to the Java being 5% slower overall than C.

For the renderer certainly, but there is still a lot going on that needs
to happen on the Java side.  I'd be interested in profiling this and
seeing where the majority of the time is spent.  Also, I didn't see any
mention of memory consumption.  Has anybody played with this yet?  I
haven't had a chance.

Getting back to OCaml:  I think a proof of performance piece like this
would be excellent for furthering the adoption of OCaml.  I
doubt you'll convince many PHBs with it, but you will get the
youngsters (or people interested in game development).  Something I'd
really like to see is OCaml ports of Nehe's OpenGL tutorials posted on
NeHe's site.  I swear I've seen the first few somewhere else (maybe
packaged with Lablgl?) but it'd be great to have them on the site.  If
there were 40+ real examples of Ocaml + OpenGL I think it would be a lot
easier to convince aspiring game and visualization devs to
try out OCaml.  What do people think about this?

		--Steve



More information about the Ocaml-biz mailing list