Advertisement

Lisp Dialects & Interpreters in Games

Started by February 25, 2004 08:33 AM
28 comments, last by alexjc 20 years, 11 months ago
quote:
Original post by Woodsman
But you only explain why someone wouldn''t be inclined to use it (processing time)



"Common Lisp is a huge beast" so it''s too big for realtime games (it weighs in at a couple Mb), that makes it unsuitable for realtime games as memory is constrained for the AI -- and everyone so far has used scheme instead.


Whatever, I don''t know what you''re missing.

Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!

Something dodgy going on with these forums. I got triple reply notification from woodsman, and I replied to a different post that''s up now -- yet no sign of an edit.

quote:

Are there other kinds of programmers?
Are there other kinds of games?



Probably, and the full might of Common Lisp may work for them. But this forum is for game AI programmers, and I introduced the thread in the context of realtime games -- listing commercial and open-source examples.

I''ll stand by the statement that CL is not suitable for realtime games.

Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!

Advertisement
quote:
Original post by alexjc
[...]Extrarius, it seems you're just making another scripting language, but based on s-expressions![...]
Yes, pretty much, but aren't s-expressions combined with macros and lisp manipulation functions most of what makes Lisp so flexable and expressive? I'm not missing the point, I'm doing it to learn about interpreters and Lisp both, because I've wanted to make a scripting language for a long, long time and I think making one for a Lisp dialect will help me understand what goes into it better.

Also, from what I've seen of programs with embedded Lisp/Scheme/Etc, most compilers out there are not made with the idea of putting them into a C++ program and only have that as an afterthought. That is one of my main goals, so that I can continue to program in the language I know best (C/C++) and easily combine Lisp code with it at the same time (on the same projects).

[edited by - extrarius on February 27, 2004 2:27:47 PM]
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
quote:
Original post by alexjc
I''ll stand by the statement that CL is not suitable for realtime games.

Ok, the actual statement you made led me to believe that you were saying that CL is not appropriate for games in general, though I figured that you had meant it with relation to real time (probably graphics-intensive) games.
If a plant cannot live according to its nature, it dies; so a man.
quote:
Original post by Extrarius
That is one of my main goals, so that I can continue to program in the language I know best (C/C++) and easily combine Lisp code with it at the same time (on the same projects).

I, too, would really enjoy being able to use Lisp in conjunction with C++ or even C#, through some form other than an FFI interface.


If a plant cannot live according to its nature, it dies; so a man.

(princ(substitute #\Space #\0(format()"~36R"5688852237040631986030796883)))
If a plant cannot live according to its nature, it dies; so a man.
quote:
Original post by Extrarius
what makes Lisp so flexable and expressive?



It''s more the evaluation model, and the environment itself where code is data. That too would be a lot of work to replicate -- but I guess it''s a very educational project!

quote:

most compilers out there are not made with the idea of putting them into a C++ program and only have that as an afterthought



True. Something like Boost:ython would be nice. But the point is you can build that C++ scheme on top of the C and it''d suffer little or no overhead, and benefit from being taylored to your own application.

A

Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!

Advertisement
Does anyone know of any actual implementations (edit: open/non-proprietary obviously ) of CL or Scheme like this? The closest thing I can think of is Corman's FFI interface which relies on .dll interfaces as far as I can tell. This definitely has my interest.

[edited by - woodsman on February 27, 2004 8:33:33 PM]
If a plant cannot live according to its nature, it dies; so a man.
woodsman, I''d look into the lightweight Scheme implementations, and build upon them. Scheme In One Defun (SIOD) seems quite small, as does PLT mzScheme and possibly GUILE. Those would be easy to convert to C++.

I can''t find any similar lightweight Lisp implementations.

Alex

Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!

I was writing my own CLTL2 interpreter some time back (never finished it). The only thing about it that''s "large" is that it comes with a large standard library - that''s why I never finished, there were just too many functions to write. Even so, based on my measurements, you should be able to do it in 200k.

- Josh
Here''s a nice reference to an online book:

An Introduction to Scheme and its Implementation

Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!

This topic is closed to new replies.

Advertisement