From: skaller <skaller@users.sourceforge.net>
To: Pal-Kristian Engstad <pal_engstad@naughtydog.com>
Cc: caml-list@yquem.inria.fr, Brian Hurt <bhurt@spnz.org>, xm@xmunkki.org
Subject: Re: [Caml-list] How to do this properly with OCaml?
Date: Thu, 28 Jul 2005 08:28:58 +1000 [thread overview]
Message-ID: <1122503338.6768.383.camel@localhost.localdomain> (raw)
In-Reply-To: <200507271413.41026.pal_engstad@naughtydog.com>
[-- Attachment #1: Type: text/plain, Size: 5845 bytes --]
On Wed, 2005-07-27 at 14:13 -0700, Pal-Kristian Engstad wrote:
> On Wednesday 27 July 2005 10:21 am, skaller 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.
>
> Hi,
>
> Skaller, that's one of the most sweeping generalizations I
> have ever seen.
hehe ..
> Exactly what kind of games are you talking
> about?
My experience is with PC based games, not console.
Consoles are obviously limited by storage constraints.
> The gaming industry is big - I believe the latest
> numbers indicate that we're bigger than the movie industry
> w.r.t to earnings.
Yup, I think 4'th largest industry in Japan one year.
> I've been looking into O'Caml, and I've written some tools
> in it (caml is great for tools), but here's a couple of points
> against it:
>
> 1. It doesn't support console platforms.
> - The PC market is quite minor compared to consoles.
That is the fault of marketing idiots. The PC market
is in fact far larger and worth lots of money,
especially the adult market.
However, this is only evident where by luck someone
produced a good game for adults. One of my friends
works with Trainz, for example. It is basically owns
the world market for train enthusiasts, having killed
Microsofts offering.. and I can tell you train people
are all mad, rich, and there are a heck of a lot of
them -- hows that for another sweeping generalisation? :)
Some of these people spend $50-100 per week on this
single game .. that's a LOT of money. And the game
isn't going to die next week, like some fad game
for 14 year olds... it will keep developing
and growing for a long time.
> 2. It doesn't support low-level constructs.
> - No SIMD (AltiVec/VMX) vector operations.
> - No explicit assignment of (bit and byte) offsets
> within a record.
> - No explicit alignment specification.
> - No inline assembly.
It isn't necessary for higher level parts of a PC based game.
For a console, yes, you'd need lots of low level stuff,
but I have no interest in arcade games, which is about
all you can do on a standalone console.
That may change with unwired online networking, where
a lot of the engine runs on a remote server -- this
is happening with phones now so it may not be long
before online consoles (if not just your phone) are
the way to go: in this case most of the game
is running on a large server.
> 3. There is no controlled real-time GC.
> - GC needs to run between frames,
> and only for a controlled amount of time.
That is open to debate. Ocaml uses an incremental
generational and very fast collector. I have played
plenty of games where the framerate varied, and the
game even froze up a bit sometimes, so it is not clear
that a bit of sloppiness won't be tolerated.
It also isn't clear manual memory management can
do any better. If you limit what you're doing
for a console to a finite state machine, then
of course you don't really need ANY memory management.
As soon as you go to a more advanced game model,
you're going to need to split the video generator
thread off from the rest of the system anyhow:
the generator can provide a constant frame-rate
by running at a higher priority.
Fact is that most PC games I have played the programmers
didn't have the faintest idea how to get good frame rates,
in fact they couldn't even get double buffering to
work properly -- 2/3 games the mouse cursor is incorrectly
handled (and also on some Gnome/Linux apps too, it is done wrong).
> 4. There is no real support for unboxed data-types.
> - This one is actually very important for consoles.
There is some support, but not as much as you'd get from
C, C++ or my language Felix (which is designed for games
and uses C/C++ object model including unboxed types).
> For game-code (AI, behaviors, etc.), it is better suited,
> though the GC issue is there. But it doesn't support much
> of threading - be it through pthreads or cooperatively -
> which renders it unusable to us.
This isn't really correct. Ocaml certainly DOES support
pthreads, it just doesn't allow for multi-processing.
The bytecode interpreter actually DOES do cooperative
multi-tasking, using the same interface as the pthreads
in fact -- its pretty cool.
And of course you can design your own technique for
cooperation, although programming it can be painful:
the required control inversion is done automatically
by Felix.
> So in the end, ... ocaml is nice as a tool, but it is by far
> not usable for the game console world.
Yup, if you have a small box with limited store, and you need
to spend a lot of time playing with the hardware, then
Ocaml may not be ideal -- you could look at Felix instead
(it is a C++ code generator, so it can be used WITH your
existing codes).
however for larger games, eg RPG or Strategy class PC games,
you aren't tweaking the hardware anyhow: you'll have an
underlying abstraction like DirectX or OpenGl to work with
instead. On that class of platform, Ocaml would be quite
competitive IMHO.
Again, if you have a need to interface with C/C++ have
a look at Felix -- it provides lots of higher level stuff
like first class functions, pattern matching, high performance
user space threading, and other things, while retaining
C/C++ compatibility (to see how you'll need to look: the
language syntax isn't compatible, but the system is
source compatible .. :)
--
John Skaller <skaller at users dot sourceforge dot net>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-07-27 22:29 UTC|newest]
Thread overview: 105+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-22 14:26 Thomas Fischbacher
2005-07-22 14:52 ` [Caml-list] " Eric Cooper
2005-07-22 15:26 ` [SPAM_PROBABLE] - [Caml-list] How to do this properly with OCaml? - Bayesian Filter detected spam Christophe Dehlinger
2005-07-22 18:58 ` [Caml-list] How to do this properly with OCaml? Stephane Glondu
2005-07-22 15:50 ` Berke Durak
2005-07-22 16:47 ` brogoff
2005-07-22 15:54 ` Michel Quercia
2005-07-23 5:00 ` Michael Alexander Hamburg
2005-07-23 12:34 ` Xavier Leroy
2005-07-23 13:16 ` Berke Durak
2005-07-23 16:36 ` Stephane Glondu
2005-07-23 18:27 ` Berke Durak
2005-07-23 18:50 ` Matthieu Sozeau
2005-07-24 8:35 ` Berke Durak
2005-07-23 19:18 ` Stephane Glondu
2005-07-23 19:35 ` Thomas Fischbacher
2005-07-23 19:50 ` Stephane Glondu
2005-07-23 19:59 ` Thomas Fischbacher
2005-07-23 20:15 ` Brian Hurt
2005-07-23 23:16 ` james woodyatt
2005-07-23 23:27 ` Stephane Glondu
2005-07-23 18:37 ` Michael Alexander Hamburg
2005-07-23 18:52 ` Bardur Arantsson
2005-07-23 21:35 ` [Caml-list] " Michael Alexander Hamburg
2005-07-23 19:19 ` [Caml-list] " Thomas Fischbacher
2005-07-24 7:27 ` [Caml-list] "Just say no!" campaign against Obj [was: How to do this properly with OCaml?] Alex Baretta
2005-07-24 8:02 ` [Caml-list] "Just say no!" campaign against Obj james woodyatt
2005-07-24 17:27 ` Stephane Glondu
2005-07-25 8:43 ` Alex Baretta
2005-07-24 21:37 ` [Caml-list] "Just say no!" campaign against Obj [was: How to do this properly with OCaml?] brogoff
2005-07-25 8:15 ` Alex Baretta
2005-07-25 17:08 ` brogoff
2005-07-25 8:57 ` Alex Baretta
2005-07-24 17:33 ` [Caml-list] How to do this properly with OCaml? skaller
2005-07-24 18:13 ` Stephane Glondu
2005-07-24 18:48 ` skaller
2005-07-24 19:14 ` Stephane Glondu
2005-07-24 20:29 ` skaller
2005-07-24 20:49 ` skaller
2005-07-24 21:08 ` Stephane Glondu
2005-07-24 21:55 ` skaller
2005-07-24 23:23 ` Stephane Glondu
2005-07-25 0:32 ` skaller
2005-07-25 6:45 ` Stephane Glondu
2005-07-25 11:35 ` skaller
2005-07-26 0:47 ` Brian Hurt
2005-07-26 0:56 ` Jere Sanisalo
2005-07-26 1:10 ` Brian Hurt
2005-07-26 1:34 ` Jere Sanisalo
2005-07-26 9:03 ` Richard Jones
2005-07-27 17:21 ` skaller
2005-07-27 19:44 ` [Caml-list] Games Jon Harrop
2005-07-27 20:35 ` Jere Sanisalo
2005-07-28 0:13 ` Jon Harrop
2005-07-28 1:12 ` Jere Sanisalo
2005-07-28 2:44 ` Jon Harrop
2005-07-28 4:49 ` skaller
2005-07-28 19:48 ` Jon Harrop
2005-07-28 21:32 ` David Thomas
2005-07-28 22:31 ` Jon Harrop
2005-07-29 1:44 ` Michael Walter
2005-07-29 2:32 ` David Thomas
2005-07-29 3:52 ` skaller
2005-07-29 12:57 ` David Thomas
2005-07-28 10:58 ` Gerd Stolpmann
2005-07-28 17:19 ` David Thomas
2005-07-28 19:22 ` Jon Harrop
2005-07-27 21:13 ` [Caml-list] How to do this properly with OCaml? Pal-Kristian Engstad
2005-07-27 22:28 ` skaller [this message]
2005-07-28 1:47 ` Michael Walter
2005-07-27 23:17 ` [Caml-list] Games Jon Harrop
2005-07-28 0:03 ` [Caml-list] How to do this properly with OCaml? Paul Snively
2005-07-28 18:26 ` Jonathan Bryant
2005-07-28 23:10 ` Paul Snively
2005-07-27 16:03 ` skaller
2005-07-26 1:01 ` Stephane Glondu
2005-07-26 1:15 ` Brian Hurt
2005-07-27 15:33 ` skaller
2005-07-30 23:24 ` Thomas Fischbacher
2005-07-31 0:06 ` Jon Harrop
2005-07-31 3:10 ` skaller
2005-07-31 2:54 ` skaller
2005-07-26 20:32 ` David Thomas
2005-07-27 15:05 ` skaller
2005-07-27 15:29 ` Jon Harrop
2005-07-27 15:35 ` David Thomas
2005-07-27 20:11 ` skaller
2005-07-28 16:35 ` David Thomas
2005-07-30 23:33 ` Thomas Fischbacher
2005-07-31 0:39 ` james woodyatt
2005-07-27 19:59 ` skaller
2005-07-26 1:22 ` Jon Harrop
2005-07-27 17:23 ` skaller
2005-07-26 1:05 ` Jon Harrop
2005-07-26 1:20 ` Brian Hurt
2005-07-26 1:28 ` Jon Harrop
2005-07-27 17:03 ` skaller
2005-07-27 16:09 ` skaller
2005-07-24 23:26 ` Brian Hurt
2005-07-25 17:21 ` Ken Rose
2005-07-25 19:19 ` skaller
2005-07-26 7:10 ` Alex Baretta
2005-07-23 18:58 ` Thomas Fischbacher
2005-07-26 1:32 Jon Harrop
[not found] <200507271635.28931.jon@ffconsultancy.com>
2005-07-27 16:31 ` David Thomas
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=1122503338.6768.383.camel@localhost.localdomain \
--to=skaller@users.sourceforge.net \
--cc=bhurt@spnz.org \
--cc=caml-list@yquem.inria.fr \
--cc=pal_engstad@naughtydog.com \
--cc=xm@xmunkki.org \
/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