From: Deepankar Sharma
Subject: Some questions from a game designer
Date: 
Message-ID: <5744112a.0403240159.48266ca2@posting.google.com>
I am a game designer who has begun with lisp sometime back.
By now i have an amateurisly competent idea about the language.

Could you please offer me your views on these questions


(1) How feasible is it creating a lisp framework which sits over 
a c++ graphics engine like OGRE (www.ogre3d.org) to create games.
(The core game logic, and player bots will be written in Lisp)

(2) If written, will the lisp core compile to platforms like the Xbox
and PS2

(3) Has anyone done this before?

(4) Are there any open source opengl programs in Lisp ?

Any help will be appreciated.

From: Rodolphe Saugier
Subject: Re: Some questions from a game designer
Date: 
Message-ID: <c3rnhq$ufe$1@innommable.ircam.fr>
Deepankar Sharma wrote:
> I am a game designer who has begun with lisp sometime back.
> By now i have an amateurisly competent idea about the language.
> 
> Could you please offer me your views on these questions
> 
> 
> (1) How feasible is it creating a lisp framework which sits over 
> a c++ graphics engine like OGRE (www.ogre3d.org) to create games.
> (The core game logic, and player bots will be written in Lisp)

Doing this is one of my dreams too :)
But I'm only a lisp beginner now... :(

> (2) If written, will the lisp core compile to platforms like the Xbox
> and PS2
> 
> (3) Has anyone done this before?

Naughty Dog software did something like this for Jak and Dexter.
(in fact it was a custom lisp cross-compiler for ps2...)

You can view their post-mortem at gamasutra.com (registration is free):
http://www.gamasutra.com/features/20020710/white_02.htm

> (4) Are there any open source opengl programs in Lisp ?
> 
> Any help will be appreciated.

Rolf
From: Andrew Cristina
Subject: Re: Some questions from a game designer
Date: 
Message-ID: <pan.2004.03.24.18.13.42.384000@cox.net>
On Wed, 24 Mar 2004 01:59:55 -0800, Deepankar Sharma wrote:
> ...
> (1) How feasible is it creating a lisp framework which sits over 
> a c++ graphics engine like OGRE (www.ogre3d.org) to create games.
> (The core game logic, and player bots will be written in Lisp)
On a related note, I tried something like this... only I wrote the
graphics engine in lisp.  I don't know openGL, so I did everything using
the 2d framebuffer functionality in SDL.  So I was able to make simple 2d
sdl games.  By being very very careful, and blindly declaring my variables
to be the same size as the ones C expects, And compiling with full speed
and no saftey, I was able to approach the performance of C, and it took
about 5 min before I had any garbage collection.  Which for my simple
game, was longer than anyone wanted to play.  With openGL, things might be
faster, but I remember reading, somewhere, that with alien, floating point
arguments create garbage.  I'm mostly a beginner to lisp, so I could be
way off on this.  But I gave up on this because I have to deal with
robocup now.  But the point is that you could look at SDL like a very very
low level graphics engine, and that works fine.  So I think that a higher
level one has a good chance at working.


> ...
> (4) Are there any open source opengl programs in Lisp ?
The SDL bindings for common lisp have several openGL examples.  
See the sourceforge homepage at http://cl-sdl.sourceforge.net/, or the
cliki page at http://www.cliki.net/CL-SDL
From: Matthew Danish
Subject: Re: Some questions from a game designer
Date: 
Message-ID: <20040324201529.GA22619@mapcar.org>
On Wed, Mar 24, 2004 at 12:13:43PM -0600, Andrew Cristina wrote:
> and no saftey, I was able to approach the performance of C, and it took
> about 5 min before I had any garbage collection.  Which for my simple
> game, was longer than anyone wanted to play.  With openGL, things might be
> faster, but I remember reading, somewhere, that with alien, floating point
> arguments create garbage.  

There are several OpenGL examples included with CL-SDL that run in CMUCL
with little or no consing.  You have to be a little careful with
variables, but it is certainly possible.  Mostly the problem is with the
results and intermediate values of arithmetic.  Lexical variables used
with inline or system functions should be mostly okay.  Special
variables will need to be boxed, but you can use an array of floating
point numbers to avoid additional boxing overhead here (yes, it will
have to be in memory but you can destructively update it).  Of course,
the more math you get OpenGL to do for you, the better.  CL-SDL also
provides a number of macros that enable you to use vectors that can be
passed to OpenGL functions directly.

-- 
; Matthew Danish <·······@andrew.cmu.edu>
; OpenPGP public key: C24B6010 on keyring.debian.org
; Signed or encrypted mail welcome.
; "There is no dark side of the moon really; matter of fact, it's all dark."
From: ······@nordebo.com
Subject: Re: Some questions from a game designer
Date: 
Message-ID: <87isgu2pzw.fsf@pluto.elizium.org>
················@yahoo.com (Deepankar Sharma) writes:

> (1) How feasible is it creating a lisp framework which sits over 
> a c++ graphics engine like OGRE (www.ogre3d.org) to create games.
> (The core game logic, and player bots will be written in Lisp)

I see no reason why it wouldn't be feasible, as long as you can deal
with things like garbage collection pauses.  Depending on how the
graphics engine works it may be more or less difficult to integrate
with, though.


> (2) If written, will the lisp core compile to platforms like the Xbox
> and PS2

I believe the only Lisp which supports the PS2 is GOAL, Naughty Dog's
proprietary game Lisp.  Allegro Common Lisp, CMUCL and SBCL all have
MIPS support, so could perhaps be made to generate code usable on the
PS2, but it would probably involve quite a bit of porting work.  GCL
and ECLS are designed to be easy to integrate with C code, and may be
a lot easier to get to work on the PS2 since they compile via C.

The Xbox is mostly a Windows PC, so I'd guess anything that works on
Windows will work on it, pretty much.


> (3) Has anyone done this before?

Naughty Dog have, but they wrote their own Lisp.
From: Camm Maguire
Subject: Re: Some questions from a game designer
Date: 
Message-ID: <54isgt52nr.fsf@intech19.enhanced.com>
Greetings!

······@nordebo.com writes:

> ················@yahoo.com (Deepankar Sharma) writes:
> 
> > (1) How feasible is it creating a lisp framework which sits over 
> > a c++ graphics engine like OGRE (www.ogre3d.org) to create games.
> > (The core game logic, and player bots will be written in Lisp)
> 
> I see no reason why it wouldn't be feasible, as long as you can deal
> with things like garbage collection pauses.  Depending on how the
> graphics engine works it may be more or less difficult to integrate
> with, though.
> 
> 
> > (2) If written, will the lisp core compile to platforms like the Xbox
> > and PS2
> 
> I believe the only Lisp which supports the PS2 is GOAL, Naughty Dog's
> proprietary game Lisp.  Allegro Common Lisp, CMUCL and SBCL all have
> MIPS support, so could perhaps be made to generate code usable on the
> PS2, but it would probably involve quite a bit of porting work.  GCL
> and ECLS are designed to be easy to integrate with C code, and may be
> a lot easier to get to work on the PS2 since they compile via C.
> 

Just a quick note that GCL is supported on Debian mips and mipsel, and
compiles maxima/acl2/axiom there.

Take care,

> The Xbox is mostly a Windows PC, so I'd guess anything that works on
> Windows will work on it, pretty much.
> 
> 
> > (3) Has anyone done this before?
> 
> Naughty Dog have, but they wrote their own Lisp.

-- 
Camm Maguire			     			····@enhanced.com
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah
From: Kenny Tilton
Subject: Re: Some questions from a game designer
Date: 
Message-ID: <zYj8c.6635$DV6.2545@twister.nyc.rr.com>
Deepankar Sharma wrote:
> I am a game designer who has begun with lisp sometime back.
> By now i have an amateurisly competent idea about the language.
> 
> Could you please offer me your views on these questions
> 
> 
> (1) How feasible is it creating a lisp framework which sits over 
> a c++ graphics engine like OGRE (www.ogre3d.org) to create games.
> (The core game logic, and player bots will be written in Lisp)

Very feasible, but you really have to want it. There is some drudgery in 
building C glue to gain access to C++ from the Lisp FFI, and you'll have 
to think about deallocating C++ instances, but if you are writing enough 
game logic at a higher level it would be worth it. (I know, "How much is 
enough?" <g>)

For example, I see they interface to a C++ physics engine which involves 
callbacks to your code. Just getting from C to Lisp is a challenge for 
cmucl/sbcl (it's a new feature for them). You probably would have to 
create glue left and right. Which brings me back to: yes, it's feasible, 
but you have to want it.

> 
> (2) If written, will the lisp core compile to platforms like the Xbox
> and PS2

uh-oh. That I do not know about. Could be tough.

> 
> (3) Has anyone done this before?
> 

I do not think so.

> (4) Are there any open source opengl programs in Lisp ?

There is: http://cl-sdl.sourceforge.net/

and my nascent project: http://www.common-lisp.net/project/cello/

Cello for now uses OpenGL simply for portability. Its main objective is 
to provide a portable CL gui and application framework. But I am having 
fun with OpenGL, so I may be expanding the project in the games 
direction. But today I am working on a scrollbar widget, if that gives 
you an idea of the current focus. :)

My next bolt-on will probably be OpenAL. Something like Tokomak I would 
hesitate on--that might be better redone (or ported to) Lisp.

> 
> Any help will be appreciated.

Same here. Right now the project is being ported to other OSes and 
Lisps. No one has stepped up yet on OS X, but I'll be header there 
eventually for my commercial app. We do have one Linux port in the bag, 
so I think true universality is just a matter of elbow grease.

Good luck with your project.

kt

-- 
Home? http://tilton-technology.com
Cells? http://www.common-lisp.net/project/cells/
Cello? http://www.common-lisp.net/project/cello/
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
Your Project Here! http://alu.cliki.net/Industry%20Application