From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id E7925D55E for ; Wed, 27 Jul 2005 22:35:36 +0200 (CEST) Received: from naru1.oldskool.fi (naru1.oldskool.fi [193.64.190.82]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6RKZaI2023180 for ; Wed, 27 Jul 2005 22:35:36 +0200 Received: by naru1.oldskool.fi (Postfix, from userid 562) id D9CDF67005A; Wed, 27 Jul 2005 23:35:35 +0300 (EEST) Date: Wed, 27 Jul 2005 23:35:35 +0300 From: Jere Sanisalo To: caml-list@yquem.inria.fr Cc: Jon Harrop Subject: Re: [Caml-list] Games Message-ID: <20050727203535.GA30737@xmunkki.org> Reply-To: xm@xmunkki.org References: <20050726013444.GA32493@xmunkki.org> <1122484910.6768.133.camel@localhost.localdomain> <200507272044.43231.jon@ffconsultancy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200507272044.43231.jon@ffconsultancy.com> User-Agent: Mutt/1.4.1i X-Miltered: at nez-perce with ID 42E7F018.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 interfacing:01 elegantly:01 syntax:01 ocaml:01 compilers:01 ocaml:01 bindings:01 compiler:01 bindings:01 triangles:01 producers:98 dog:98 pursued:98 wrote:01 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 On Wed, Jul 27, 2005 at 08:44:42PM +0100, Jon Harrop wrote: >> Just an aside-- but this is why >> most games are utter crap. The developers have no idea >> how to develop high level code, so they focus on weenie >> details of graphics, and as a result we have stunning >> high performance motion interfacing to the most banal >> rubbish I have ever seen. As time goes by things just >> seem to get worse. >I would have put that much more elegantly but, basically, I agree. Humh, missed where this started, but.. :) As a games developer I somewhat disagree. Sure there are people who do not know how, but in my view (and experience) most of professional games developers are pretty good at doing high level code. For the problems described here I can see much easier explanations. Mostly having something to do with extremely tight deadlines, producers/publishers not knowing what they want and changing their mind all the time and the tight coupling to a limited hardware. On one game developer forum there was a poll on how people managed their high level code. Many developers had actually written their own preprocessors to C++ in order to get introspection and the like. Only one (I know of) have written their own language; GOAL / Naughty Dog. And what I gather, even GOAL is split into two parts. The macro language is a full scheme and the game side is more like an imperative language in the lisp syntax. Most (if not all) game programmers I have talked to have actively pursued more better ways to create their games and handle those increasingly complicated event queues that happen there. It's not easy, I can tell you. I tried to formulate a basic game in ocaml once and failed badly. It's mostly because I'm not yet so experienced in FP style and need to learn to think things differently. (btw, one major reason for not using more FP-like languages in gamedev is because the platforms are nowadays mostly not-PC and the compilers / trained staff is hard to find) >I have actually been thinking about writing an "OCaml for Games Programming" >book. I think there is a lot of scope for interesting and unusual material in >such a book and I think there are lots of possible examples which would >demonstrate the power of OCaml for general purpose programming whilst also >making wicked cool games. The downside is mainly the lack of state-of-the-art >OpenGL bindings. I would love such a book! It would basically have to touch on every single aspect of FP programming I do not yet know how to do. And it would probably teach me to think more in FP way, since game programming is much closer to my daily programming than algorithmic issues (those I can cleanly write in FP. And I have even written a compiler; those are easy to think in FP terms). And I don't think you'd need state-of-the-art OpenGL bindings to write a good book on the subject. The problem is in the high level, mostly. The low level bindings are relatively straightforward to do. A shameless plug; a game I've written for this years Assembly demo party: http://fpb.xmunkki.org/ The reason I bring this is up is that is uses OpenGL. And all it need is textured triangles with two different blending modes (normal alpha and additive). And I've played many fun games with only flat shading :). The general issue here (I think) is that most programmers are unfamiliar with the FP style of thinking (about problems). That's why most of them never even try, except by accident. >I think there is ample market for a games programming OCaml book but it would >be difficult to sell it at a low enough price (again, I think it would really >benefit from being full color). I'd be willing to pay about 80e for such a book.. But then again, it's a book I've been looking for a long time. -- Jere Sanisalo [xm@xmunkki.org] - http://www.xmunkki.org/