From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id GAA00248; Wed, 23 Jan 2002 06:21:13 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA01079 for ; Wed, 23 Jan 2002 06:21:12 +0100 (MET) Received: from plinky.bolt-action.com (node-d8e9cca3.powerinter.net [216.233.204.163]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g0N5LAT06367 for ; Wed, 23 Jan 2002 06:21:11 +0100 (MET) Received: from checkerlap.d6.com (node-d8e9cca2.powerinter.net [216.233.204.162]) by plinky.bolt-action.com (8.11.6/8.9.3) with ESMTP id g0N5Kgh03688; Tue, 22 Jan 2002 21:20:42 -0800 Message-Id: <4.3.2.7.2.20020122204927.028b0db0@arda.pair.com> X-Sender: checker@arda.pair.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 22 Jan 2002 21:20:33 -0800 To: Matthew D Moss , caml-list@inria.fr From: Chris Hecker Subject: Re: [Caml-list] Ocaml and games In-Reply-To: <00FC6BAE-0F80-11D6-86C2-00039354191C@usermail.com> References: <4.3.2.7.2.20020122124034.026d1750@arda.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >Just curious and wondering if anyone is doing (or has links to) games coded with OCaml... looking to get some opinions on overall structure and/or feelings as to how well it is working for that. I'm writing a commercial game in Ocaml right now (and for the past year, and for the next year ;). I'm reserving judgement on the overall worthiness of Ocaml for games until I actually finish and ship a robust product, but it's been fun and educational at least. Some short thoughts: - Performance seems to be totally acceptable so far, but I haven't been focusing on optimization yet, and the options are limited for optimizations-in-the-small short of dropping to C or modifying the compiler, so I'm slightly worried about it in the future. The GC performance predicability and smoothness is a huge looming shadow on the horizon that may or may not materialize, I have no idea. - Lack of a debugger for native code sucks (not helped by the lack of the bytecode debugger on non-cygwin Win32 builds, and the debugger's not great even when it works after rebuilding for cygwin, in my experience so far). - The toplevel has been a win (sometimes just as a pseudo-debugger). - Linking of bytecode and native code would be good. Currently if you're using bytecode (debugging, compile speed, toplevel, etc.) and you need to optimize something, dropping to C is your only choice, which is silly. - Lack of overloaded operators (needing op. for floats), overloaded functions (need mult_matrix_vector, mult_matrix_matrix, mult_scalar_vector, etc.), and "let mutable" makes imperative mathematical code (most of what I've done so far, since the game uses a lot of physics simulation) messy and overly verbose. - Closures are great. Variants are great. Pattern matching is good. Code is easier and faster to refactor than in C. I've noticed that code seems to get smaller as I add more features, which is fun and non-intuitive. ;) - Rigid for-loop structure is lame, recursive functions not as readable (and floats are boxed across them). - The library has been useful, although it desperately needs an orthogonality pass. - Labltk was fine for prototyping, but I now have my own Win32 thing I wrote because TK's a pig and unstable. LablGL is working fine but I expect to write a thinner layer over OpenGL/D3D before shipping. I've got a much bigger list that I'll post at some point. Overall, I don't regret deciding to use Ocaml. >(I am also reminded, having seen another email by Chris Hecker, that he mentioned something along these lines at his talk at the last Game Developers Conference.) My talk was about programming language features that C/C++/Java/C# don't have but that seem useful, not about Ocaml specifically. Chris ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr