Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

game development in lisp

Name: Anonymous 2007-10-31 18:37

Is it doable? What do I use? Are there some books? Should I use a real programming language instead?

Name: Anonymous 2007-10-31 18:39

Forget it, it's NP-complete.

Name: Anonymous 2007-10-31 18:51

Crash Bandicoot was made with Lisp.

Name: Anonymous 2007-10-31 19:07

>>1
You use SDL like in every other faggot language.

It's easy.

Name: Anonymous 2007-10-31 20:11

Pretty much every text game was either written in LISP, or implemented LISP to be played. There's even a website to make a text game in LISP, but you can look that up yourself.

Name: Anonymous 2007-10-31 20:37

>>4
Any SDL bindings that actually work with common lisp?

Name: Anonymous 2007-10-31 21:01

Name: Anonymous 2007-10-31 21:11

>>6
>>7
Yes.

Name: Anonymous 2007-10-31 22:16

Name: Anonymous 2007-10-31 22:29

>>6
>>9
Yes.

Name: Anonymous 2007-10-31 22:45

Name: Anonymous 2007-10-31 22:50

>>6
>>11
Yes.

Name: Anonymous 2007-10-31 22:59

                                       , ┐
                                         _,//
                                    _,. -、/ ィ〈
                  ,. ‐ァ…¬ー 、         ,. '´ |  |_,.二)
              /::/:,::、::::ヽ\;ゝ      /   l  j
            /:::::〈:/:/ー}、::;ハ:::::}       /     j‐'´
            ,':::Λ:l∨代マ`弋、Λ   /    ,. '′
             |::::Τ゙!::::', `´ <7 }::!} /     /
             |:::l::L.|:::|:| _  ノ:!:!!'′    , '´
             |:::l::!:、',::lリ.  「ノ/ノj     /
            ヽ{_ゝミヾ`\ノ`ヾ_Λ i/
            「 `ヽ \ \'´ヘ. ∨       C-C-C-COMBO BREAKER
    .        丿   \ \ ヽ,ハ. lヽ
    .      /     l   \ `ヽ.V゙} j }
        / _  ,.=-へ、  `ヽ二ソ/ /
    .     ヽ.  `´\  ,>、   r‐廾ヘ
         \    _入〈 _,.、__ ゙Y:!!:!Y′
           `ーく´ _Λ^…'-=^ニ|:||:「
               r{´ 丿       }:|l::|
             7T´  /    〈ノ|_;!
            / ノ  /        \
           /     /l       \ \
            \_   ,' !         _L=く
           / `¬-=L.__     /´    ヽ
    .      /     /   ` ̄´ \      ヽ
    .       /    ,.'         \     ヽ
         /     /           \   ヽ

Name: Anonymous 2007-10-31 23:55

game development in lisp

i lol'd

Name: Anonymous 2007-11-01 0:15

>>14
wai?

Name: Anonymous 2007-11-01 0:50

>>15
You typically don't do game development in quasi-functional toy languages like Lisp. What next, game development in Haskell? Gtfo.

Name: Anonymous 2007-11-01 0:53

                  ,. ‐ァ…¬ー 、         ,. '´ |  |_,.二)
              /::/:,::、::::ヽ\;ゝ      /   l  j
            /:::::〈:/:/ー}、::;ハ:::::}       /     j‐'´
            ,':::Λ:l∨代マ`弋、Λ   /    ,. '′
             |::::Τ゙!::::', `´ <7 }::!} /     /
             |:::l::L.|:::|:| _  ノ:!:!!'′    , '´
             |:::l::!:、',::lリ.  「ノ/ノj     /
            ヽ{_ゝミヾ`\ノ`ヾ_Λ i/
            「 `ヽ \ \'´ヘ. ∨       

Name: Anonymous 2007-11-01 0:54

            ,':::Λ:l∨代マ`弋、Λ   /    ,. '′
             |::::Τ゙!::::', `´ <7

Name: Anonymous 2007-11-01 0:54

代マ`弋、

Name: Anonymous 2007-11-01 0:55

>>16
That's just because you're not typically an expert programmer.

So, OP, is that game done yet? Since you're writing it in Lisp, I figure you could have it done by now.

Name: Anonymous 2007-11-01 4:49

sbcl: ''(but only certain demos don't crash)''
clisp: ''It doesn't quite work.''

Name: Anonymous 2007-11-01 11:37

>>21
I've never had a problem in practice.

Name: Anonymous 2007-11-01 12:03

Well look, if you guys don't like CL-SDL, I've got some great partial Ncurses bindings. You can write the next great Lisp roguelike.

Name: Anonymous 2007-11-01 18:30

>>23
Link to ncurses bindings?

Name: Anonymous 2007-11-01 19:29

>>1
HAHAHAHAHAHAHAHA

Name: Anonymous 2007-11-01 19:30

>>24
There's a CL-Ncurses somewhere, but it's buggy (don't ask me how that happened). Mine aren't complete (only got the basics necessary for drawing to the screen and reading one character at a time), so they're super short. I just went through the trivial exercise of typing function definitions. Color support will probably happen at some point.

ncurses.asd:
(require 'asdf) ; This line probably only works in sbcl.

(asdf:defsystem "ncurses"
    :depends-on (cffi)
    :components ((:file "packages")
         (:file "ncurses" :depends-on ("packages"))))

packages.lisp:
(defpackage #:ncurses
  (:use #:cffi)
  (:export #:initscr
       #:start-color
       #:endwin
       #:echo
       #:noecho
       #:cbreak
       #:nocbreak
       #:keypad
       #:erase
       #:refresh
       #:getch
       #:addch
       #:mvaddch
       #:mvaddstr
       #:curs-set

       #:+screen-width+
       #:+screen-height+))

ncurses.lisp:
(in-package #:ncurses)

(define-foreign-library libncurses
    (:unix (:or "libncurses.so.5" "libncurses.so"))
  (t (:default "libncurses")))

(use-foreign-library libncurses)

(defctype window-ptr :pointer)
(defctype bool :int)

(defcfun "initscr" window-ptr)
(defcfun ("start_color" start-color) :int)

(defcfun "endwin" :int)

(defcfun "echo" :int)
(defcfun "noecho" :int)
(defcfun "cbreak" :int)
(defcfun "nocbreak" :int)
(defcfun "keypad" :int
  (window window-ptr on bool))
(defcfun "erase" :int)
(defcfun "refresh" :int)
(defcfun "mvaddch" :int
  (y :int) (x :int) (char :int))
(defcfun "mvaddstr" :int
  (y :int) (x :int) (string :string))
(defcfun "getch" :int)
(defcfun ("curs_set" curs-set) :int
  (visibility :int))

(defcvar ("COLS" +screen-width+) :int :read-only t)
(defcvar ("LINES" +screen-height+) :int :read-only t)

Name: Anonymous 2007-11-01 19:35

And here are some wrappers that remove the need for typing ncurses: before every function as well as letting you use type 'char rather than character codes. These should probably be in a package ncurses-user:, but they aren't.

(defvar *window*)

(defun init-graphics ()
  (setf *window* (ncurses:initscr))
  (ncurses:curs-set 0)
  (ncurses:start-color)
  (ncurses:noecho)
  (ncurses:cbreak))

(defun cleanup-graphics ()
  (ncurses:echo)
  (ncurses:curs-set 1)
  (ncurses:nocbreak)
  (ncurses:endwin))

(defun clear-screen ()
  (ncurses:erase))
(defun refresh-screen ()
  (ncurses:refresh))
(defun move-add-char (x y character)
  (ncurses:mvaddch y x (char-code character)))
(defun get-char ()
  (code-char (ncurses:getch)))
(defun move-add-string (x y string)
  (ncurses:echo)
  (ncurses:mvaddstr y x string)
  (ncurses:noecho))
(defun screen-width ()
  ncurses:+screen-width+)
(defun screen-height ()
  ncurses:+screen-height+)

Name: Anonymous 2007-11-02 11:43

>>27
wrappers considered harmful

Name: Anonymous 2007-11-02 12:21

>>28
Not in ENTERPRISE lisp. You should wrap your datastructures, thus  abstracting them in case you need them to be altered.

Name: Anonymous 2007-11-02 13:32

>>29
Abstraction considered harmful, you'd better watch out.

Name: Anonymous 2007-11-02 23:52

>>16

I recall Tim Sweeney saying something about using Haskell being good. The link was on gamedev.net (I think over a year ago now) no idea if it was archived though.

I happen to be more on the side of "no fucking way." I've not used functional languages (I've been having too much fun with embedded development) but I could imagine them being useful for rendering pipelines and physics.

Name: Anonymous 2007-11-03 0:01

>>31
I don't see why a language like Haskell wouldn't (in theory) be useful for game development. They're pretty good, although as bad as Java when it comes to being obsessive about a paradigm. Of course, in the real world a language with the "I can tell you the results but not the run time" philosophy isn't going to work out for anything but the simplest games.

Name: Anonymous 2007-11-05 19:10

___ BEGIN
|OOO|O|
|O|O|O|
|O|___|
END|

Name: Anonymous 2009-03-06 10:46

o eliminate common dispatch   Trying to make   a web downloader.

Name: Anonymous 2009-12-22 10:53

Resurrecting an interesting topic.

Name: Anonymous 2009-12-22 10:57

[b]WARNING: THIF FREAD HATH RIVEN FFFLOM ITTH GLAVE

Name: Anonymous 2009-12-22 11:18

Some Lisp Games
http://xach.livejournal.com/237639.html
One of the games was written by David O'Toole who has a blog dedicated to them http://lispgamesdev.blogspot.com/

Name: Anonymous 2009-12-22 11:20

Starting with the simple server in the Worms game developed in Ikarus Scheme [16], the author implemented an SDL interface and server which currently works across Chez, Gambit, Ikarus, Larceny, PLT, and Ypsilon Schemes. The use of a server process does allow for rapid porting. While simple, the C server code required considerable debugging time and the author was forced to relearn why he had forgotten the C language. (Emphasis added.)

Name: Anonymous 2009-12-22 11:21

>>35
Novice necromancer

>>34
Competent necromancer

Name: Anonymous 2009-12-22 11:28

>>38
Thinking Scheme
  Kenneth A Dickey

( ≖‿≖)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List