emacs and tetris

On Jul 28, 6:24 pm, Rael wrote:
> Hello all,
> I've just finished reading/doing Practical Common Lisp and I feel like
> making something of my own.
> A while ago I made a simple Tetris-like game, Pentris, in JavaScript
> (http://www.caps.be/pentris.htmfor those interested, code isn't
> entirely cleaned out) and I kind of set my mind on recreating it in
> (Common) Lisp to see what it feels like, how well techniques and ideas
> translate and all that while having a reference.
> The only problem I'm having is in the graphics department. Being
> rather inexperienced in the 'desktop programming' area I'm not even
> sure what to look for exactly.
> I'm looking for 'Something' to create a window in which I can draw
> simple stuff like coloured squares, nothing fancy. Documentation and
> background-information would also be appreciated.
> I'm using the Allegro version of LispBox from Practical Common Lisp,
> but I don't really hold any preferences towards any specific
> implementation.
> My operating system is Microsoft Windows (XP 64). Compatibility is a
> preference, but not a strict requirement. Guess it would give me a
> reason to try out Linux.
> Forgive the ignorant tone/nature of this request.
> Ruben

you can do it in emacs lisp. Here, you don't even need a graphics library. The images are just bitmapped images in a text field. In fact, tetris is bundled with emacs as early as emacs 22. Just type “Alt+x tetri” to start it. To view the implementation, type “Alt+x describe-function” then “tetris”, then click on the link “tetris.el”.

emacs lisp's heritage is close to Common Lisp's (as opposed to Scheme Lisp), and is pretty similar. You can think of emacs lisp as subset of common lisp. For some glimpse of differences, you can see my tutorial at:

• Emacs Lisp Basics

∑ http://xahlee.org/

No comments:

Post a Comment