14
« on: May 12, 2011, 09:40:56 AM »
I am not a computer science person. I cannot speak to much of this design theory stuff. I also cannot comment on Lima's intent.
But as I understand the issue, this is a Turnpike Theorem problem. Yes, it might be some extra work to write the verb. But in the longrun, you are making your life easier. You are adding to your library of available verbs and making your entire world a more seemless structure. Having coded on a mud which used add_actions almost exclusively, you should avoid add_actions, if for the one reason of simplicity. But if that is not sufficient, I also argue that it is also work-minimizing in the long run.
We had 'read' as an add_action. We had some books hardcoded in rooms, which used the read add_action. AND we had book objects which also had the read add_action in them. Believe me, this became a nightmare very quickly, trying to distinguish every single book object in the game. When 'read red book' in your inventory is conflicting with a different 'red book' in your current room, I think that alone is sufficient evidence against add_actions. But consider this: The solution to this common object conflict in the verb case is pretty simple: add a unique adjective or alias to one of the objects. The solution to this conflict in the add_action case is to add a whole new if(str=="big red shiny book") OR statement. It is obvious at this point, that the verb route is both the optimal way and the work-minimizing way to go.
-Detah@Arcania