From: Chris Hecker <checker@d6.com>
To: Matthew D Moss <moss@usermail.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Ocaml and games
Date: Tue, 22 Jan 2002 21:20:33 -0800 [thread overview]
Message-ID: <4.3.2.7.2.20020122204927.028b0db0@arda.pair.com> (raw)
In-Reply-To: <00FC6BAE-0F80-11D6-86C2-00039354191C@usermail.com>
>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
next prev parent reply other threads:[~2002-01-23 5:21 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-21 23:27 cgillot
2002-01-21 22:43 ` [Caml-list] Re: your mail Markus Mottl
2002-01-22 0:03 ` [Caml-list] Re: about toplevels cgillot
2002-01-22 20:41 ` Chris Hecker
2002-01-22 21:35 ` [Caml-list] Ocaml and games Matthew D Moss
2002-01-22 21:43 ` Will Benton
2002-01-22 23:53 ` Eric C. Cooper
2002-01-23 0:58 ` Ian Zimmerman
2002-01-23 1:23 ` Yaron M. Minsky
2002-01-23 3:29 ` Doug Bagley
2002-01-23 5:20 ` Chris Hecker [this message]
2002-01-24 3:02 ` Matthew D Moss
2002-01-24 6:59 ` Chris Hecker
2002-01-25 20:22 ` Daniel Phillips
2002-01-25 20:53 ` Ken Rose
2002-01-25 22:16 ` Chris Hecker
2002-01-25 23:00 ` Thatcher Ulrich
2002-01-23 8:39 ` Sven
2002-01-23 15:35 ` Xavier Leroy
2002-01-22 9:00 ` [Caml-list] Re: your mail Daniel de Rauglaudre
2002-01-22 13:12 ` Markus Mottl
[not found] ` <4.3.2.7.2.20020123011902.00cde840@arda.pair.com>
2002-01-23 9:35 ` [Caml-list] Re: about toplevels Christian Gillot
2002-01-23 10:20 ` Chris Hecker
2002-01-24 16:03 ` Daniel de Rauglaudre
2002-01-24 17:20 ` Christophe Raffalli
2002-01-24 17:34 ` Christian Gillot
2002-01-24 20:42 ` [Caml-list] gotchas [Was: toplevels] Ian Zimmerman
2002-01-25 10:59 ` Christian Gillot
2002-01-25 11:17 ` Sven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4.3.2.7.2.20020122204927.028b0db0@arda.pair.com \
--to=checker@d6.com \
--cc=caml-list@inria.fr \
--cc=moss@usermail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox