Re: Event-based MUD server concept
The idea is sound. I've opted for a similar system and find it works very well since the "objects" in any given environment space aren't directly affected by other "objects" except through messaging. It provides for a nice decoupling, so to say. Publisher/Subscriber -- Broadcaster/Listener messaging systems are common patterns used daily by software developers. As a general concept, it's a proven one.
I prefer a "broadcast" type system, where objects broadcast action messages into an environment and objects filter out those they are interested in. My preference is based on the assumption that objects move from location to location and would need to unsubscribe/resubscribe to publishing objects(other objects in the current/next environment space) upon every room change. I didn't want that perceived overhead --- or management duty.
Cheers!
|