Live data from Hacker News

Creating a Non-Trivial Lisp Game in 2018

defungames.com

1–10 of 28 posts

Re: Creating a Non-Trivial Lisp Game in 2018

#2
See https://news.ycombinator.com/item?id=1998321

"I even went so far as to write an entire compiler and environment (a several man-year endeavor) to design two different runtime oriented dialects called GOOL and GOAL used in 8 Naughty Dog Crash Bandicoot and Jak & Daxter games. All 30-60 FPS action games -- 40 million copies sold. All written in Lisp! (more or less)"

Re: Creating a Non-Trivial Lisp Game in 2018

#4
post #2

See https://news.ycombinator.com/item?id=1998321 "I even went so far as to write an entire compiler and environment (a several man-year endeavor) to design two different runtime oriented dialects called GOOL and GOAL used in 8 Naughty Dog Crash Bandicoot and Jak & Daxter games. All 30-60 FPS action games -- 40 million copies sold. All written in Lisp! (more or less)"

That's pretty interesting too! Although I think the advantage of the game here is that it's not only written in Lisp (or CL as the case may be) but the client is actually going to be open source, and it sounds like they're incorporating a (subset?) of the Lisp language as a component of playing the game.

Re: Creating a Non-Trivial Lisp Game in 2018

#5

Of all the code that might have to be written for a non trivial game, a skeletal animation system doesn't strike me as particularly difficult. Curious why that was called out specifically as something not to try and implement yourself?

I agree that skeleton system is not very hard to implement. Anecdotally, one of the first CL based apps I wrote were to implement Quake MD5 (.md5mesh and .md5anim) parsers to do skeletal animation.

I think he might be categorising it as hard for the following: - Defining a simple, easy to navigate data structure with the bone and weight mappings across vertices, to do the math for pose calculation - Having a highly compressed binary format for animation data, which is definitely hard but required for good FPS - Doing it on CPU or GPU

Re: Creating a Non-Trivial Lisp Game in 2018

#6
My group is developing Clasp (github.com/clasp-developers/clasp.git). It's a Common Lisp implementation that interoperates with C++ and uses llvm as the backend. It's something you might want to look at because it could change your options in the following ways:

(1) Clasp interoperates with C++ - C++ libraries like graphics and physics engines can be easily exposed within Clasp Common Lisp. (See https://github.com/clasp-developers/demo-expose-bullet-physi...)

(2) Clasp uses llvm as the backend - it generates llvm-ir from Common Lisp code and uses link time optimization to link C++ and Common Lisp generated llvm-ir.

(3) Clasp uses the Memory Pool System garbage collector, which can be configured to minimize GC pause times to a programmer-defined level.

(4) Clasp generates debug info and can be profiled with standard tools like dtrace and C++ functions, Common Lisp functions and GC functions are all profiled against each other.

I'm a professor of Chemistry at Temple University - I'm developing Clasp to design molecules and materials - but it could be applied to a lot of other problems.

Caveat: Clasp is not yet as performant as Steel Bank Common Lisp, but it uses the open source and highly configurable Cleavir compiler developed by Robert Strandh and we have incorporated inlining and are currently incorporating type inference.

If you want to see a little bit more - I have a 25 min talk up on youtube that I presented a couple of weeks ago at the 2018 llvm developers meeting (https://www.youtube.com/watch?v=mbdXeRBbgDM&feature=youtu.be)

Re: Creating a Non-Trivial Lisp Game in 2018

#8

My group is developing Clasp (github.com/clasp-developers/clasp.git). It's a Common Lisp implementation that interoperates with C++ and uses llvm as the backend. It's something you might want to look at because it could change your options in the following ways: (1) Clasp interoperates with C++ - C++ libraries like graphics and physics engines can be easily exposed within Clasp Common Lisp. (See https://github.com/cl…

Wonderful and inspiring work! I wonder if it would be possible to create a similar interop story with the Rust programming language, which also targets LLVM -- ideally without having to redo all the hard work that went into Clasp. I have a Prolog interpreter/compiler I'm developing in Rust right now. One of my aims (eventually) is to compile Prolog to fast native code with it. It would be nice to have convenient access to it from a Common Lisp environment.

Re: Creating a Non-Trivial Lisp Game in 2018

#9

My group is developing Clasp (github.com/clasp-developers/clasp.git). It's a Common Lisp implementation that interoperates with C++ and uses llvm as the backend. It's something you might want to look at because it could change your options in the following ways: (1) Clasp interoperates with C++ - C++ libraries like graphics and physics engines can be easily exposed within Clasp Common Lisp. (See https://github.com/cl…

Hi, I watch your llvm talk but, correct me if I'm wrong, it seems you didn't really have enough time to cover all you wanted. Do you think you'll have another conf to do it fully ? or maybe find time to do it on another video platform ?

oh also, someone on your talk main thread suggested to use more GPU (https://news.ycombinator.com/item?id=18707771 <= get ready for some harsh adjectives). I wonder if you're already doing so or planned ? Maybe it's just a backend parameter (llvm-to-gpu-cluster..)

Re: Creating a Non-Trivial Lisp Game in 2018

#10
The article talks about one of the primary motivations for using Lisp being that it's 'fun,' which is a comment I've heard about Lisp elsewhere, and which makes sense to me since I've noted a difference in funness between other languages.

So that's pretty appealing to me, but I haven't quite found the right Lisp to use. It seems like Clojure (probably ClojureScript actually) would be the most practical for me to use on some projects—but I'm curious whether others have found Clojure/ClojureScript to have that same element of fun Lisp is sometimes known for.

Post reply on HN