• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

robinei

Game programming in Lisp

16 posts in this topic

I''ve recently acquired a fascination for Lisp, and I''m reading "ANSI Common Lisp" by Paul Graham. Luckily I also get Allegro Common Lisp for free at my university. What I''m wondering is how practical is Lisp for game programming? I''m thinking in particular of the graphical/engine element(nothing more than 2d for now though). Does anyone have experience with it? Is it fast enough? Or is engine programming more in the C++ domain? In that case how is Lisp as an extension language for a C++ engine?
0

Share this post


Link to post
Share on other sites
quote:
Original post by robinei
I''ve recently acquired a fascination for Lisp, and I''m reading "ANSI Common Lisp" by Paul Graham.

Great book.


quote:
Original post by robinei
Luckily I also get Allegro Common Lisp for free at my university.

What I''m wondering is how practical is Lisp for game programming? I''m thinking in particular of the graphical/engine element(nothing more than 2d for now though).
Does anyone have experience with it? Is it fast enough?

Why not give it a try? It''s certainly quick enough to get started. I''m not sure about Allegro but check out the Corman CL libraries for SDL/OpenGL.

SDL Bindings
Corman Lisp

You should also search these forums. I have a ton of links, but Lisp is King and What''s So Great About Lisp cross my mind.
Cheers.


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

(princ(substitute #\Space #\0(format()"~36R"5688852237040631986030796883)))
0

Share this post


Link to post
Share on other sites
quote:
What I''m wondering is how practical is Lisp for game programming? I''m thinking in particular of the graphical/engine element(nothing more than 2d for now though).

Abuse is a 2d platform game written in Common Lisp.

If you use Debian Linux you can install it with "sudo apt-get install abuse-sdl".
0

Share this post


Link to post
Share on other sites
I downloaded the abuse source, and it''s engine is C++ code. It apparently just uses Lisp for game logic.
I guess it was perhaps a cutting edge game when it came out, so it probably needed the extra bit of speed. But are there any examples of games written exclusively in Lisp?

SDL for Lisp sounds great, since that''s what I''ve been using in C++.
0

Share this post


Link to post
Share on other sites
quote:
I downloaded the abuse source, and it''s engine is C++ code. It apparently just uses Lisp for game logic.
Why does that matter? If that matters, why doesn''t it seem to matter that SDL is written in C?
0

Share this post


Link to post
Share on other sites
Naughty dog have used lisp in at least some of their titles:

http://www.franz.com/success/customer_apps/animation_graphics/naughtydog.lhtml

Jak, Crash, etc..
0

Share this post


Link to post
Share on other sites
> In that case how is Lisp as an extension language for a C++ engine?

I think there are a lot of people using C/C++ to do the rendering, and lisp-like languages to do the scripting and logic.

I love common lisp, it''s a fascinating language.

0

Share this post


Link to post
Share on other sites
Are there any library versions of Lisp which integrates like Lua, into C/C++ programs?
0

Share this post


Link to post
Share on other sites
quote:
Original post by SiCrane
Do you count dialects of Lisp? There''s TinyScheme


Thanks, I''ll check it out. I guess the idea behind all of them are the same? Hvor much beyond function/macro names differ between them?
0

Share this post


Link to post
Share on other sites
Hvor?

Scheme is very similar to Lisp, but lacks some of Lisp''s functionality. You can think of it as a subset of Lisp. (Boy am I going to get crucified for saying that.) For example, Scheme lacks packages, arrays, and hash tables.

They also spell somethings differently. (Like setq vs. set!)
0

Share this post


Link to post
Share on other sites
Ok, thanks.

quote:
Original post by SiCrane
Hvor?


I mean "how"! I actually managed to write the norwegian word...
0

Share this post


Link to post
Share on other sites
If you want to see some games implemented in Lisp, you can look at John''s book of Lisp games . It seems they''re all text-based, but it should help somewhat to see how the logic is implemented in lisp (I haven''t looked over them, but I''m betting its different from the style in whatever language you''re used to)
0

Share this post


Link to post
Share on other sites
quote:
Original post by SiCrane
Hvor?

Scheme is very similar to Lisp, but lacks some of Lisp's functionality. You can think of it as a subset of Lisp. (Boy am I going to get crucified for saying that.) For example, Scheme lacks packages, arrays, and hash tables.

They also spell somethings differently. (Like setq vs. set!)
Heh, you could've at least mentioned the shared namespace for functions and non-functions in Scheme, higher dynamicity, Scheme's continuations or some other bigger difference instead of the obvious name differences. Scheme is not simply a subset, because it does some things quite differently. Here's a good list on Common Lisp vs Scheme.

[edited by - civguy on April 30, 2004 3:34:11 AM]
0

Share this post


Link to post
Share on other sites
I just wanted to point out - there are lots of embeddable intepreters out there, many of them Lisp-like. You should look into several before you choose one - there are a lot of options.

Also, Scheme may lack hash tables, but I think most implementations of scheme "throw in" a hash table implementation along with a bunch of other handy data structures. Admittedly, it''s not portable to other scheme dialects, but that usually doesn''t matter so much if you''re using this as an embedded scripting language in a game. I''ve never tried "libguile", but it looked good last time I read up on it.

Type "scripting languages" (with the quotes) into google.

- Josh
0

Share this post


Link to post
Share on other sites
There is a lot of research at my school NC State University, about using lisp for video games, especially plot scripting.

If there was a good wrapper package that was designed to make C++ libraries accessable to the lisp runtime, then lisp would make a great language. I''m currently looking into the issues of writing one myself...
0

Share this post


Link to post
Share on other sites

> If there was a good wrapper package that was designed to make C++ libraries accessable to the lisp runtime, then lisp would make a great language.

Look up "SWIG" on google.

- Josh
0

Share this post


Link to post
Share on other sites