From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 7739AD55E for ; Thu, 28 Jul 2005 06:49:26 +0200 (CEST) Received: from ash25e.internode.on.net (ash25e.internode.on.net [203.16.214.182]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6S4nOlF028635 for ; Thu, 28 Jul 2005 06:49:25 +0200 Received: from rosella (ppp33-38.lns1.syd6.internode.on.net [59.167.33.38]) by ash25e.internode.on.net (8.12.9/8.12.6) with ESMTP id j6S4nIEU060692; Thu, 28 Jul 2005 14:19:19 +0930 (CST) (envelope-from skaller@users.sourceforge.net) Subject: Re: [Caml-list] Games From: skaller To: Jon Harrop Cc: caml-list@yquem.inria.fr In-Reply-To: <200507280344.03323.jon@ffconsultancy.com> References: <200507280113.34285.jon@ffconsultancy.com> <20050728011248.GA10661@xmunkki.org> <200507280344.03323.jon@ffconsultancy.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-nMdARavLibDCoiAP0VFz" Date: Thu, 28 Jul 2005 14:49:18 +1000 Message-Id: <1122526158.6769.93.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 X-Miltered: at nez-perce with ID 42E863D4.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 recursion:01 recursion:01 simulate:01 ocaml:01 monster:98 stone:98 wrote:01 sourceforge:01 sourceforge:01 hacks:01 interactions:01 tend:02 covariant:02 hoc:02 X-Attachments: type="application/pgp-signature" name="signature.asc" X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 --=-nMdARavLibDCoiAP0VFz Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 2005-07-28 at 03:44 +0100, Jon Harrop wrote: > If the mutual recursion from having them "all know about each other" caus= es a=20 > problem then you can use objects to circumvent the mutual recursion, That isn't really the problem. Consider two fighters, with various kinds of attacks and defences: what happens when A uses punch type P, and B defends with action D .. taking into account other properties like speed and strength.. now consider all the possible combinations: it isn't possible to actually list them all. You also cannot simulate the real physics -- there isn't time for a proper simulation. This problem is often handled by sending messages and interpreting them.. and having a default. If the default seems wrong, it is fixed. Play testing is essential here. The problem is basically that the interactions are covariant. Crudely, you need an approximation physics that works for the game: and this is what most games get wrong. They don't actually design a physics, they do hoc hacks left right and centre, and then the whole system becomes almost impossible to manage. This is why simplistic games work, and more sophisticated ones tend to be full of stupid bugs .. for example casting a 'life leech' spell on an undead monster or stone gargoyle .. the programmers forgot to make a special case, and they didn't design a workable physics either. > Yes, I doubt anyone here has used their language on a console but there i= s a=20 > lot of interesting non-console stuff to discuss. Felix has been used on an X-Box .. not really a console like=20 a PS2 but anyhow .. :) > I know when I'm doing console/mobile > > stuff, my memory and perfomance limits are REALLY tight. Sometimes all = I > > have memory free is like 200kb out of 32mb total. And it HAS to work, m= any > > hours on end. >=20 > Yes, this is the kind of games programming that OCaml is least well-suite= d to. Why do you think that it is any worse than C++? --=20 John Skaller --=-nMdARavLibDCoiAP0VFz Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBC6GPMsRp8/9aGVGsRArjZAJ9xj4V1sYUK45lZK642iVBKNe9UIACgm3/E TR3oEwjinphos6w8J6RrrrI= =y7V1 -----END PGP SIGNATURE----- --=-nMdARavLibDCoiAP0VFz--