オワタ
(let ((q t) (wx 80) (wy 20) (x 20) (y 19) (yv 0) (xv 0) (buff (get-buffer-create "(^o^)")) (cl "└(^o^ )┐")(cr "┌( ^o^)┘") (cb "\(^o^)/")(c "\(^o^)/")) (save-excursion (with-output-to-buffer (buff) (set-buffer buff) (setup-temp-buffer buff) (while q (erase-buffer buff) (format t "~{~80A~%~}" (make-sequence 'list 20 :initial-element #\SPC)) (let ((pos (+ (* (round y) (+ wx 1)) (round x)))) (delete-region pos (+ pos (count-column c))) (format (make-buffer-stream buff pos) c)) (let ((k (read-char-no-hang))) (if (eq k #\q) (setq q nil)) (case k (#\Left (decf xv 0.6) (setq c cl)) (#\Right (incf xv 0.6) (setq c cr)) (#\b (setq c cb)) (#\v (setq yv 1.5)))) (incf x xv) (decf y yv) (decf yv 0.3) (if (< (- wx (count-column c)) x) (setq x (- wx (count-column c)) xv -3) (if (< x 0) (setq x 0 xv 3))) (if (< (- wy 1) y) (setq y (- wy 1) yv 0 xv (if (< xv 0.001) 0 (/ xv 1.7))) (if (< y 0) (setq y 0 yv 0))) (sit-for 0.016) (refresh-screen)(do-events)))))
アクションゲームは作れるけど、キーボード入力には向かないな。マウスで動かすとか・・・(エディタで何をしているんだ)。