Figuring out how my moonclimb worked
1. Moonclimb's README.org gives the example (abridged here):
(in-package :moonclimb/user) (push (verb-plist :verb 'com-sneeze :dobj 'screwtape) (get 'screwtape :queue)) (make-kernel (make-clock)) (funcall * :push-now 'screwtape) (funcall **) "you sneeze"
2. well, it worked admirably for my jamtest:
(uiop:Define-package :lispmoo2/main (:mix :moonclimb/all :clim :clim-lisp :cl) (:export)) (in-package :moonclimb/user) (push (verb-plist :verb 'com-sneeze :dobj 'screwtape) (get 'screwtape :queue)) (make-kernel (make-clock)) (funcall * :push-now 'screwtape) (funcall **) "you sneeze"
3. but tbh how did this work
So it turns out that the game clock has :push-now and :push-later which registers a symbol's :queue (of commands) to either happen immediately next or on the next clock tick.
4. But what about sneezing?
On inspection, screwtape is a $player
LISPMOO2/MAIN> (symbol-plist 'screwtape) (:OWNER SCREWTAPE :PARENTS ($PLAYER $OBJECT) :QUEUE NIL)
and $player-commands has
LISPMOO2/MAIN> (symbol-plist '$player-commands) (:COMMANDS ((COM-SNEEZE (PRINT "you sneeze"))) :PARENTS ($PLAYER))
5. This COM-SNEEZE is pretty straightforward!
So rather than attempt to implement a new engine, I'm just going to use this :commands thing basically for everything to implement the following plan
(Start-game 'screwtapes-jam)
There is a road leading north into a forest.You are in a place of new beginnings. You should type 'connect my-name' and then head north.
- connect playername
- playername connected
- north
- You follow the road north and enter the forest. There is a road leading south and a trail leading west. You see distressed-princess here.
- Distressed-princess says, "I lost my gold-ring at a picnic in the clearing to the west! If you find it, please give it to me."
- west
- You follow the trail until it reaches a clearing. There is a picnic-table here. In the setting sun, a metallic glint catches your attention on the ground beneath picnic-table. There is a trail to the east.
- look ground under picnic-table
- You see a gold-ring.
- take gold-ring under picnic-table
- You take the gold-ring.
- east
- You follow the trail and enter the forest. There is a road leading south and a trail leading west. You see distressed-princess here.
- Distressed-princess says, "Hello again! Did you find my gold-ring?
- give gold-ring to distressed-princess
- You give the gold-ring to distressed-princess
- Distressed-princess morphs into relieved-princess
- Relieved-princess says, "Thank-you so much! My hero!"
- Relieved-princess says, "This concludes my own jam, but feel free to screw around in your repl while here."
6. That will conclude my autumn-lisp-game-jam
In particular, I'm going to do all of this by specifying new commands. So I am not going to try and make engine changes such as having a special class of commands related to movement, everything is going to be explicit, like sneeze above.
7. LambdaMOO
Searching for a princess's lost ring is a reference to the lambda RPG first quest people encounter when you come across a room with an N64 in it and reality subtely shifts into one with a princess and lost ring. Go check out the east wing guest bedroom in
telnet lambda.moo.mud.org 8888
to have the authentic lambda rpg princess ring finding experience. 'help rpg' is also interesting.
Come hang out at the live show every Wednesday 0UTC and talk about lispgamejam, lambda, lisp and sm0lnet, or asyncronously chatter on the mastodon, though chattering in lambda via *chatter would be even better tbh.
Get lispmoo2
lispmoo2
Status | Prototype |
Author | screwtape |
Tags | common-lisp, emacs, lisp, mcclim, moo, new-kind-of-society, swank, Text based |
More posts
- LISPMOO2 INSTRUCTIONS (IMPORTANT)9 hours ago
- repeatedly-eval-qt - good old-fashioned AI, in my lispmoo2?3 days ago
- Richard Waters' Series and lispmoo24 days ago
- Itches Of Mine Lispmoo2 Scratches5 days ago
- Princess revisited5 days ago
- My very own computing revolution16 days ago
- A moonew language for itneraction.19 days ago
- Defining north between two rooms with the low engine19 days ago
- LISP kind of society urgently needed27 days ago
Leave a comment
Log in with itch.io to leave a comment.