15 ms·
Lisp has been used in AAA games for scripting. https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Li
by petermcneeley 8y ago
Lisp has been used in AAA games for scripting. https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp
- monocasa 8y agoGOAL wasn't just scripting, it was the main language for the engine. In the one example I've ever seen of GOAL code, you can clearly see inline ASM for instance. Interestingly Halo used Lisp for scripting, and that rarely comes up.
- SomeCallMeTim 8y ago> GOAL encourages an imperative programming style: programs tend to consist of a sequence of events to be executed rather than the functional programming style of functions to be evaluated recursively. That alone is a pretty hard condemnation of LISP/functional for games. It's not really LISP/Scheme at that point, but a LISP-ish syntax for an imperative language. Some tasks are more innately imperative. Games (and game scripting) are in that category. Trying to force game programming to work in FP is like trying to build a computer in Minecraft: It's cool to see that it can be done, but it doesn't say anything about whether it should be done. Proving Turing Completeness doesn't mean you would want to actually write code in a Turing Machine.
- zeveb 8y agoLisp isn't a functional language (in the sense that you appear to mean; it has functions as a first-class type, of course, but that's different). This code is imperative: (tagbody start (decf x) (format t "~a~%" x) (when (plusp x) (go start))) Lisp works just fine in imperative contexts.
- wk_end 8y agoIn what sense is Lisp not an imperative language?
- TeMPOraL 8y agoLisp never was about functional programming (even if, in some way, it has invented it, or at least introduced the important building blocks). The Lisp family grew to be about symbolic computation, interactive development, and ability to modify the language to fit your needs (via macros) - which essentially eliminates whole classes of boilerplate, and allows you to directly express abstractions that cannot be specified cleanly in other languages. Imperative is normal for most Lisps.
- lliamander 8y agoJust curious, but what do you mean by symbolic computation? Do you just mean evaluating mathematical expressions in a symbolic fashion (as opposed to numeric calculations), or do you mean something more general?
- TeMPOraL 8y agoYes, both. AFAIK symbols in Lisp were originally intended to support AI research, but part of that is being able to do symbolic manipulation and computation, be it analysis, algebra or logic.
- Impossible 8y agoNaughty Dog abandoned GOAL during the PS3 era, but still uses PLT scheme for scripting. https://news.ycombinator.com/item?id=9813111 https://news.ycombinator.com/item?id=9813111 https://www.gamasutra.com/view/feature/134566/the_secrets_of_enemy_ai_in_.php?print=1 https://www.gamasutra.com/view/feature/134566/the_secrets_of...
- monocasa 8y agoYeah, they got bought by Sony to become a first party developer and share their code with other devs, necessitating the switch to C++.
- kayamon 8y agoThat isn't really Lisp -- no cons, no garbage collection, no dynamic typing. It's closer to C than it is to Lisp, at least in terms of language semantics.
- lispm 8y agoThere are about a dozen or "Lisp dialects" with similar properties. Even on GCed Lisps there were programs written which did manage memory manually.