Prev: Numbers & Precision
Next: Comparing Lisp to Python, what you consider more important:speed or macros.
From: Raffael Cavallaro on 3 May 2010 15:49 On 2010-05-03 11:51:53 -0400, His kennyness said: > In something more complex such as a game, you will likely pass one > parameter that is pretty much the entire universe (so the hooks can do > what they like) and a second parameter that will be some object in the > universe, such as a player instance. This is, of course, answering the question he really should be asking - how do I design the underlying architecture for my game? For an interesting view along the lines that kenny mentions where each routine takes a "world" parameter, see: <http://www.cs.brown.edu/~sk/Publications/Talks/Moby-Bootstrap/> listen to the audio of the talk while (optionally) viewing the ppt slides. (yes, I know it's scheme, but you can do the same in lisp...) warmest regards, Ralph -- Raffael Cavallaro
From: Krzysztof Drewniak on 3 May 2010 18:40 On 2010-05-03, Krzysztof Drewniak <krzysdrewniakNOSPAM(a)gmail.com> wrote: > On 2010-05-03, Krzysztof Drewniak <krzysdrewniakNOSPAM(a)gmail.com> wrote: > [split] >> (let ((x 3)) >> (progn (print x) (+ 2 2))) >> I am really lost on how to implement this. Any help? >> >> Krzysztof Drewniak >> >> > The idea is this. For example, suppose there is a magic sword that > makes all doors open on the first try with a clos method 'on' which > takes as arguments a subclass of monster and subclass of object and > puts the sword (object) on the monster. As a part of the method, the > sword will create the actual effect by hooking into the 'open' method > a (setf succeeded t) which would gaurantee the door would open. (This > was the silly example). > > Krzysztof Drewniak > I forgot to mention, the method 'off' would also need to remove the hok. -- X-Real-Email-With-Antispam: krzysdrewniak at gmail dot com pgp key on keyserver.ubuntu.com and maybe some other place too
From: Krzysztof Drewniak on 3 May 2010 18:42 On 2010-05-03, Krzysztof Drewniak <krzysdrewniakNOSPAM(a)gmail.com> wrote: [split] > (let ((x 3)) > (progn (print x) (+ 2 2))) > I am really lost on how to implement this. Any help? > > Krzysztof Drewniak > > The idea is this. For example, suppose there is a magic sword that makes all doors open on the first try with a clos method 'on' which takes as arguments a subclass of monster and subclass of object and puts the sword (object) on the monster. As a part of the method, the sword will create the actual effect by hooking into the 'open' method a (setf succeeded t) which would gaurantee the door would open. (This was the silly example). There must also be an 'off' method that would remove the object. Krzysztof Drewniak -- X-Real-Email-With-Antispam: krzysdrewniak at gmail dot com pgp key on keyserver.ubuntu.com and maybe some other place too
From: Pascal J. Bourguignon on 3 May 2010 18:58 Krzysztof Drewniak <krzysdrewniakNOSPAM(a)gmail.com> writes: > On 2010-05-03, Krzysztof Drewniak <krzysdrewniakNOSPAM(a)gmail.com> wrote: > [split] >> (let ((x 3)) >> (progn (print x) (+ 2 2))) >> I am really lost on how to implement this. Any help? >> >> Krzysztof Drewniak >> >> > The idea is this. For example, suppose there is a magic sword that > makes all doors open on the first try with a clos method 'on' which > takes as arguments a subclass of monster and subclass of object and > puts the sword (object) on the monster. As a part of the method, the > sword will create the actual effect by hooking into the 'open' method > a (setf succeeded t) which would gaurantee the door would open. (This > was the silly example). There must also be an 'off' method that would > remove the object. Yes. And the rest is called 'programming'. -- __Pascal Bourguignon__
First
|
Prev
|
Pages: 1 2 Prev: Numbers & Precision Next: Comparing Lisp to Python, what you consider more important:speed or macros. |