Sunday, January 01, 2006

Problemoid #1: Unified Environmental Feedback Architecture

Happy New Year to all. I'm going to start making mini-posts that I'll call problemoids. They'll have a number and a kneejerk name assigned to them. These are visions of finished-product I have in my head that demand some kind of design or implementation decision.

Today's problemoid is as follows. Given a random feature in a map, that feature will have attributes and contain objects having attributes that should be affected by some relation the feature has with the rest of the map. For instance, a randomly generated tunnel may have a "dripper" prop placed in it — a little scenery touch that shows some water drops falling from the ceiling to the ground, probably resulting in a moody "bloop" sound effect. But whether or not a dripper appears may depend on several factors, perhaps the humidity value assigned to that region of the map or the temperature in an ice-themed feature (higher temperature = ice melting = more drippers). The attributes upon which the prop's creation depends must be expressed in a uniform way so that the dripper creator and other interested factories can tap into them, especially when developers decide they want their hand-crafted features to take on some dynamic morphology. I want the environment to have a feedback mechanism.

How do I create a unified attribute exposure/consumption architecture? What's a good way to expose actionable attributes to the API for use by me and others who extend Vyde later? Are we talking about every actor in the engine having a collection of "VydeAttribute" objects that can be reflected upon, queried, etc. by the factory? Or perhaps invert the control and have the factory's creator inject the attributes and the formulas that consume them into the factory when it's instantiated?


Post a Comment

<< Home