Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Game programming in Lisp


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
16 replies to this topic

#1 robinei   Members   -  Reputation: 187

Like
Likes
Like

Posted 28 April 2004 - 10:55 AM

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?

Sponsor:

#2 Woodsman   Members   -  Reputation: 426

Like
Likes
Like

Posted 28 April 2004 - 12:05 PM

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)))

#3 flangazor   Members   -  Reputation: 516

Like
Likes
Like

Posted 28 April 2004 - 12:11 PM

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".

#4 robinei   Members   -  Reputation: 187

Like
Likes
Like

Posted 28 April 2004 - 12:37 PM

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++.

#5 flangazor   Members   -  Reputation: 516

Like
Likes
Like

Posted 29 April 2004 - 01:02 AM

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?

#6 Thrump   Members   -  Reputation: 169

Like
Likes
Like

Posted 29 April 2004 - 05:04 AM

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..

#7 Nekhmet   Members   -  Reputation: 132

Like
Likes
Like

Posted 29 April 2004 - 05:06 AM

> 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.



#8 robinei   Members   -  Reputation: 187

Like
Likes
Like

Posted 29 April 2004 - 03:19 PM

Are there any library versions of Lisp which integrates like Lua, into C/C++ programs?

#9 SiCrane   Moderators   -  Reputation: 9674

Like
Likes
Like

Posted 29 April 2004 - 03:25 PM

Do you count dialects of Lisp? There''s TinyScheme

#10 robinei   Members   -  Reputation: 187

Like
Likes
Like

Posted 29 April 2004 - 03:28 PM

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?

#11 SiCrane   Moderators   -  Reputation: 9674

Like
Likes
Like

Posted 29 April 2004 - 03:38 PM

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!)

#12 robinei   Members   -  Reputation: 187

Like
Likes
Like

Posted 29 April 2004 - 03:44 PM

Ok, thanks.

quote:
Original post by SiCrane
Hvor?


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

#13 Extrarius   Members   -  Reputation: 1412

Like
Likes
Like

Posted 29 April 2004 - 06:27 PM

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)

#14 civguy   Members   -  Reputation: 308

Like
Likes
Like

Posted 29 April 2004 - 08:29 PM

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]

#15 Nekhmet   Members   -  Reputation: 132

Like
Likes
Like

Posted 30 April 2004 - 05:18 AM

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


#16 pTymN   Members   -  Reputation: 464

Like
Likes
Like

Posted 30 April 2004 - 06:40 AM

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...

#17 Nekhmet   Members   -  Reputation: 132

Like
Likes
Like

Posted 30 April 2004 - 08:10 AM


> 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





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS