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

Pages: 1-4041-

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

( ≖‿≖)

Name: Anonymous 2009-12-22 11:41

What is it with dicks and gaem programming?

7. Conclusion
Scheme is a highly adaptable language in which to think concretely about computation. Rather than being cast in concrete, useful software architectures may be cast in jello and easily remolded. This flexibility readily allows a single author to explore a wide range of interesting computational ideas and idioms.
Lao Tze said, ”If you are one with the way, the way welcomes you” [17].
After a quarter century of use and dozens of other programming languages, the author finds that Scheme still welcomes him.

Name: Anonymous 2009-12-22 11:47

Lao Tze said, ”If you are one with the way, the way welcomes you”
Clearly he has read his SICP.

Name: Anonymous 2009-12-22 11:48

>>40

(≖‿≖)

Name: Anonymous 2009-12-22 12:06

>>42
Lao Tzu never said this.

Name: Anonymous 2009-12-22 12:07

>>44
MY ANUS

Name: Anonymous 2009-12-22 12:09

>>45
The quote was invented by author.

Name: Anonymous 2009-12-22 12:13

>>46
MY ANUS

Name: Anonymous 2009-12-22 12:47

>>47
Oh, sorry, i'll use lube next time.

Name: Anonymous 2009-12-22 12:54

Jak & Daxter

Name: Anonymous 2009-12-22 13:06

>>49
Toejam & Earl

Name: Anonymous 2009-12-22 13:24

>>50
Benny & The Jets

Name: Anonymous 2009-12-22 13:34

Anii & The Hax

Name: Anonymous 2009-12-22 13:38

Oh, okay.

Bitches & Hoes

Name: Ego the Living Planet 2009-12-22 13:39

Switches & Witches

Name: Anonymous 2009-12-22 13:56

Jak & Daxter was actually made in Lisp you fucking faggots.

Name: Anonymous 2009-12-22 14:43

>>55
"GOAL's primary development and maintenance engineer is no longer available to Naughty Dog, and so they are transitioning to a C++ based pipeline for future projects."

;_;

Name: Anonymous 2009-12-22 14:49

Name: Anonymous 2009-12-22 15:06

I find it amusing how people are unable to enjoy something just because it has no practical use in the real world, while it provides a sufficient amount of entertainment otherwise.

Name: Anonymous 2009-12-22 15:27

>>55
developed in lisp, implemented in C++

Name: Anonymous 2009-12-22 15:28

>>58
"If you care what other people think, you're essentially giving them the keys to
your spiritual home. Upon giving them to a stranger, you can expect to find
your happiness and dignity stolen like the treasures they are..."

Name: Anonymous 2009-12-22 15:33

>>58
Its because most people prefer their enjoyment to be both fun and practical. Doing thing just for fun is good sometimes, but if you do it too much it becomes wasteful.

Name: Anonymous 2009-12-22 15:35

>>60
However, you must let them in in order to receive the greatest gift of all: social acceptance.

Name: Anonymous 2009-12-22 16:25

>>62
Looks like someone has been watching too many Christmas Specials and is spouting all sorts of bullshit.

Name: Anonymous 2009-12-22 17:23

>>58
Because they feel the need fit in no matter what they're doing, and they need to belong to a group more than anything else, like >>62 here.

I really despise most of humanity.

Name: Anonymous 2009-12-22 17:28

>>58-64
Go to your rooms, all of you!!

Name: Anonymous 2009-12-23 0:22

>>65
Go to considered harmful

Name: Anonymous 2009-12-23 7:27

>>1
Are you implying that LISP is a toy language?

Name: ​​​​​​​​​​ 2010-10-23 14:14

Name: Anonymous 2010-11-28 10:40

Name: Anonymous 2011-02-03 8:27

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