Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
slubworld_notes [2013-06-03 14:30] – 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===== |
+ | |||
+ | Command line in naked on pluto game interface: | ||
+ | |||
+ | Make a new bot and set it up: | ||
+ | make SlubBot | ||
+ | program SlubBot slub | ||
+ | |||
+ | Ping the new bot: | ||
+ | @SlubBot ping | ||
+ | => SlubBot @BobBloggs I am stopped | ||
+ | |||
+ | Program the bot: | ||
+ | @SlubBot 10 say hello | ||
+ | @SlubBot 20 goto 10 | ||
+ | @SlubBot run | ||
+ | => SlubBot @BobBloggs hello | ||
+ | ... | ||
+ | @SlubBot ping | ||
+ | => SlubBot @BobBloggs I am running | ||
+ | |||
+ | 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) | ||
walk < | walk < | ||
Line 23: | Line 85: | ||
poke | poke | ||
like | 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/ | ||
+ | | ||