From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ANN: Chess III Arena 0.5
Date: Tue, 3 Jul 2007 23:43:43 +0100 [thread overview]
Message-ID: <200707032343.44111.jon@ffconsultancy.com> (raw)
In-Reply-To: <000001c7bdbb$ec4d4750$ac01a8c0@johnyaya>
On Tuesday 03 July 2007 22:48:40 Grant Olson wrote:
> Chess III Arena 0.5 is my first (allegedly) non-trivial app in OCaml. It
> is a fully functional chess game, although it lacks some desirable features
> such as a computer opponent and network play at this point in time. It
> uses Quake III player models as the pieces.
>
> Binaries for windows and source for other platforms are available at:
>
> http://members.verizon.net/~olsongt/c3a/
>
> I've also detailed some of the things I like about OCaml on that page,
> since I don't write enough to have a blog, but I imagine I'm preaching to
> the choir on this list.
ROTFLMAO. Wow! That is absolutely amazing! Love the name. =8-)
Here's a quick patch, if you put this right after your definition of draw_md3
in md3.ml then the whole program runs an order of magnitude faster:
let draw_md3 =
let m = Hashtbl.create 1 in
fun x y ->
try GlList.call(Hashtbl.find m (x, y)) with Not_found ->
let list = GlList.create `compile in
draw_md3 x y;
GlList.ends();
GlList.call list;
Hashtbl.add m (x, y) list
This simply memoizes the rendering of each frame of animation for each model
in a display list. The result is that your geometry is stored on the graphics
card and rendered directly, hence the gratuitous speedup.
This is a wonderful idea for a first project in OCaml. I've taken a quick look
at your code to give you some constructive criticism but your coding style is
already excellent. Keep posting!
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
The OCaml Journal
http://www.ffconsultancy.com/products/ocaml_journal/?e
next prev parent reply other threads:[~2007-07-03 22:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-03 21:48 Grant Olson
2007-07-03 22:43 ` Jon Harrop [this message]
2007-07-04 2:18 ` [Caml-list] " Grant Olson
2007-07-04 8:00 ` Daniel Bünzli
2007-07-04 20:06 ` Grant Olson
2007-07-04 20:51 ` Bünzli Daniel
2007-07-04 21:22 ` Jon Harrop
2007-07-05 0:25 ` Daniel Bünzli
2007-07-05 3:05 ` Jon Harrop
2007-07-05 7:45 ` Daniel Bünzli
2007-07-05 12:52 ` Jon Harrop
2007-07-05 13:37 ` Daniel Bünzli
2007-07-05 13:52 ` Daniel Bünzli
2007-07-05 14:22 ` Jon Harrop
2007-07-05 14:43 ` Daniel Bünzli
2007-07-05 23:40 ` Grant Olson
2007-07-06 19:41 ` Jon Harrop
2007-07-04 10:58 ` Jon Harrop
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=200707032343.44111.jon@ffconsultancy.com \
--to=jon@ffconsultancy.com \
--cc=caml-list@yquem.inria.fr \
/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