New design pattern I discovered for dynamic behavior at run time without changing the coding of a object

Started by
2 comments, last by scruthut 7 months, 3 weeks ago

Based on my recent work, not the latest as of yet, but still good; I have come across a new unpublished design pattern and I hope to get credit for it if you all believe it is new. My name is Charles Alan Martin, own a game development company for android and PC working on a indie game engine and a new MMORPG that I plan to market.

The pattern gives objects dynamic behavior at run-time without recoding them, giving behavior that can change at run-time and respond to events. I have a list of IFeature interfaces as composites of an object which inherit IStep (which is a computational resource in my engine) inherited by IObject that is a memory managed object with a smart pointer along side for shared references. IFeatures will respond to events at run-time per object they interact with. this sends a signal to my module layer for the system object responsible for managing the object which notifies the listeners for that event and hand over data to a handler telling what object and event data as well for the mechanics of the event. This way one can change settings at run-time to say shoot someone in the head and it makes a dot, or it makes a hole, or it explodes the head; yet, all of this can change at run time depending on settings or manipulating behavior at a high level which would be complex too. I am thinking of stepping back and checking if it can help my weather simulations too. I will look for more uses other than destructible walls and leaning around walls while crouching for the event / listener system.

please tell me what you think if I need to post more, as I hope it is simple enough to understand with that short of a description. Thank you for your time everyone…

Advertisement

It sounds a lot like a unity-style entity-component system, where your IFeature is equivalent to a unity MonoBehavior component that can be attached to a game object to extend the functionality.

ok so I would need to look into that, thanks for the feedback with such speed. maybe it can be more specific in its topic to generate a separate pattern instead of a implementation that is specific to a more general feature. Does that make sense? Which means you can have one without the other that is to say.

This topic is closed to new replies.

Advertisement