TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Asteroids in under 600 lines of Common Lisp (uses SBCL and SDL)

83 pointsby Charles__Lover 12 years ago

11 comments

prosperoover 12 years ago
Here's an Asteroids clone I wrote in Clojure a few years back, which has less than 400 lines and some neat stuff like procedurally generated 3D asteroids: <a href="https://github.com/ztellman/penumbra/blob/master/test/example/game/asteroids.clj" rel="nofollow">https://github.com/ztellman/penumbra/blob/master/test/exampl...</a><p>Some of the design decisions are discussed in detail at <a href="http://ideolalia.com/creating-a-simple-game-in-clojure" rel="nofollow">http://ideolalia.com/creating-a-simple-game-in-clojure</a>
评论 #4429814 未加载
评论 #4431809 未加载
评论 #4430817 未加载
kenover 12 years ago
Looks pretty good overall, but there are a few little oddities.<p>Not to turn this into a design review, but using EQ to test for 0 seems like it's asking for trouble, and it looks like that * has only one argument.
评论 #4432449 未加载
notJimover 12 years ago
It would be incredible to me if someone could write some commentary about this for the non-lisper. Skimming it now, it seems very familiar to me (as in, I don't really see anything about it that expresses anything particularly beautifully), but I might be missing some of the finer points. Overall, I recognize a lot of familiar code that I've written for games in javascript. It's hard to appreciate the aesthetics of this, since I'm not familiar with the language.
评论 #4429891 未加载
评论 #4432487 未加载
rwosover 12 years ago
This was on /r/programming and now it's here - I'm sorry, but I don't really understand what this is all about. 600 lines doesn't seem ultra-small to me. And Lisp - well sure, not too common a language for games, but it's not as if this was written in a purely functional style or something. In fact, it looks like pretty standard imperative programming to me - it wouldn't look much different in C.<p>Am I missing something here?
评论 #4432465 未加载
justinhjover 12 years ago
Nice to see a project using <a href="http://code.google.com/p/lispbuilder/wiki/LispbuilderSDL" rel="nofollow">http://code.google.com/p/lispbuilder/wiki/LispbuilderSDL</a> which wraps the SDL library amongst others and works on Linux, Mac OS X and Windows.
spaninispaover 12 years ago
great!<p>it's a nice project, it's free, it's modern, it works, it's an interactive-graphic-non-boring thing, it's a game!<p>lisp needs more of this.<p>party's open: more functional, macro wiser and skinnier ones are welcome.<p>vim should be welcome too as I run ASTeroids fine under vim+slimv (just like the terminal) while under emacs+slime it doesn't display some white line segments here and there... (same sbcl for all)<p>last thing, I scored 3432 (level 11) with the first coin...;)
评论 #4432473 未加载
rule30over 12 years ago
no macros? I'm no expert and I'm asking to experts: macros are one of the key features of Lisp. Should macros have helped reducing LOC or improving maintainability?
评论 #4430526 未加载
swahover 12 years ago
"If the browser ran bytecodes instead of javascript..."
gawiover 12 years ago
Not even using libasteroid...
sahatover 12 years ago
I didn't know what a beautiful code was, until I looked at this project.
评论 #4432477 未加载
prtamilover 12 years ago
I just observed , whenever there is a discussion about Common Lisp , some how somebody would inject something about Clojure. Did anybody noticed that ?
评论 #4434119 未加载
评论 #4434105 未加载