tildemush
tildemush copied to clipboard
object taxonomy
A good aspect of tildemush's design is that all objects are GameObjects that can be scripted and have permissions set to fulfill the various roles, like object, player, room, and exit.
This issue asks if there should be some sort of official type flag for those roles, to facilitate server side logic and WITCH behavior.
For example: currently a player can /move into anything, be it player, object, or room. Ideally we could limit that on the server with something like select().where(room=true)
i've gone back and forth on this since the first round of design.
i think for as long as possible i'd like to avoid a strict taxonomy like this and be open to surreal uses of gameobject, but i admit i haven't thought this through at all.
i think what i'd like to try is using permissions to prevent stuff like moving into a player object by default. ultimately, a "room" is an object that allows you to move into it: not an object with room=True.
does that make sense? it might mean adding some more perms. it definitely means showing object permissions when using the WITCH pane and potentially adding to the WITCH macro so you can set default perms on a new thing.
Yeah I see the value in keeping it open, I do think we need some utilities for the "duck typing" of our objects. Perhaps something like reflection where you can test if an object implements exit handlers.
yes! i definitely have been thinking about reflection.
you can grab an object's handlers pretty easily so a "responds_to" (yes, i know it's a rubyism) is trivial to implement.