This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| slubworld_notes [2013-06-03 12:05] – created davegriffiths | slubworld_notes [2013-06-12 13:56] (current) – davegriffiths | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== Slubworld Notes ==== | + | ====== Slubworld Notes ====== |
| - | Naked on Pluto commands (incl superuser ones) | + | =====Plutonian Bot Zlang===== |
| - | walk < | + | Command line in naked on pluto game interface: |
| - | take <object in room> | + | |
| - | drop <object in inventory> | + | Make a new bot and set it up: |
| - | build | + | make SlubBot |
| - | describe | + | program SlubBot slub |
| - | rename | + | |
| - | home | + | Ping the new bot: |
| - | dress | + | @SlubBot ping |
| - | addvocab | + | => SlubBot @BobBloggs I am stopped |
| - | nuke | + | |
| - | make | + | Program the bot: |
| - | save | + | @SlubBot 10 say hello |
| - | remove | + | @SlubBot 20 goto 10 |
| - | remove-player | + | @SlubBot run |
| - | program | + | => SlubBot @BobBloggs hello |
| - | lock | + | ... |
| - | look | + | @SlubBot ping |
| - | inventory | + | => SlubBot @BobBloggs I am running |
| - | poke | + | |
| - | like | + | Look at the code: |
| + | @Slubbot list | ||
| + | |||
| + | Rewrite code: | ||
| + | @SlubBot 20 goto 50 | ||
| + | |||
| + | @SlubBot ping | ||
| + | SlubBot @BobBloggs I have crashed with SYNTAX ERROR ON LINE 20: OUT OF RANGE | ||
| + | |||
| + | Otherwise, to stop the bot: | ||
| + | @SlubBot stop | ||
| + | |||
| + | Doing something more useful, look at the world - speak the names of the entities (players or bots) in the current room (or node): | ||
| + | |||
| + | @SlubBot 10 for node.entities | ||
| + | @SlubBot 20 say top.name | ||
| + | @SlubBot 30 end | ||
| + | |||
| + | top = top of the stack, I will change this for a form such as "for i in node.entities" | ||
| + | |||
| + | Read what entities are carrying: | ||
| + | |||
| + | @SlubBot 10 for node.entities | ||
| + | @SlubBot 20 say top.name is carrying: | ||
| + | @SlubBot 30 for top.contents | ||
| + | @SlubBot 40 say A top.name | ||
| + | @SlubBot 50 end | ||
| + | @SlubBot 60 end | ||
| + | |||
| + | Conditionals (will say " | ||
| + | |||
| + | @SlubBot 10 for node.entities | ||
| + | @SlubBot 20 for top.contents | ||
| + | @SlubBot 30 if top.name == " | ||
| + | @SlubBot 40 say BONG | ||
| + | @SlubBot 45 end | ||
| + | @SlubBot 50 end | ||
| + | @SlubBot 60 end | ||
| + | @SlubBot 70 goto 10 | ||
| + | |||
| + | |||
| + | ==Naked on Pluto commands (incl superuser ones) | ||
| + | |||
| + | | ||
| + | take <object in room> | ||
| + | drop <object in inventory> | ||
| + | build <name of new location> | ||
| + | describe | ||
| + | rename | ||
| + | home <bot name> (sets the current location as the bot' | ||
| + | dress <object in room> <object in room> | ||
| + | addvocab | ||
| + | nuke (deletes the current location and everything in it, other than you) | ||
| + | make < | ||
| + | save (save the game world, also happens automatically after modification commands) | ||
| + | remove | ||
| + | remove-player | ||
| + | program | ||
| + | lock | ||
| + | look | ||
| + | inventory | ||
| + | poke | ||
| + | like | ||
| + | |||
| + | === Ideas === | ||
| + | |||
| + | * Sonification : Play what bots say, use vowel filter based on the location? | ||
| + | * User interaction based on backend, keep it simple - walking around possibly changes stuff. | ||
| + | * User interaction in the front end (library): change audio based on mouse location? Draggable objects affect sound? [I think this will be too much work] | ||
| + | |||
| + | |||
| + | This is a scripting language for the bots in Naked on Pluto designed to be written from the text game interface, and for programming large numbers of independant, | ||
| + | |||
| + | http:// | ||
| + | |||
| + | ==Data structures== | ||
| + | |||
| + | ===pluto-node = room=== | ||
| + | |||
| + | * name (string) | ||
| + | * info (string) | ||
| + | * entities (list of entities) | ||
| + | * messages (list of messages) | ||
| + | * old-messages (list of messages) | ||
| + | * vocab (list) | ||
| + | * edges (list of connections to other rooms) | ||
| + | |||
| + | ===message=== | ||
| + | |||
| + | * meaning (string, " | ||
| + | * from (string) | ||
| + | * to (string) | ||
| + | * txt (string) | ||
| + | |||
| + | ===entity = players and bots=== | ||
| + | |||
| + | * id (number) | ||
| + | * name (string) | ||
| + | * desc (string) | ||
| + | * owner (number) | ||
| + | * instructions (list) | ||
| + | * contents (list) | ||
| + | * face-furniture (entity) | ||
| + | * hat (entity) | ||
| + | * vocab (list) | ||
| + | * money (number) | ||
| + | * criminal-rating (number) | ||
| + | * likes (list) | ||
| + | * liked-by (list) | ||
| + | |||
| + | ==Some experiments to try== | ||
| + | |||
| + | * Interpretation of player messages in behaviour | ||
| + | * Interactions between bots via messages (some kind of distributed state machine) | ||
| + | * Bots programming/ | ||
| + | | ||