Fractalwave
First Post
PeterDonis said:
That's what you need the (potentially massive) database table for--the alternative is to have every object register with every other, but then each object, as it's notified of another object's change, has to know whether that change will affect it, and if so, how. So again you still need a database table that tracks these cascading effects. I'm not saying the problem isn't solvable or that the pattern you've described isn't the right way to go--just that, even if the basic concept of the pattern is trivial, the implementation still isn't.
That's why you end up limiting the implementation to what is commonly used. The problem with that is you also might end up with something that is so generic it can't handle some of the really great things that we love about the different systems.
PeterDonis said:
(edit--P.S.) Another issue is that some cascading effects can happen when you add or delete an object rather than just changing its data, so objects also have to notify other objects when they are created or destroyed, and the other objects have to know how to deal with that too.
This is something that we have run into in a limited extent within Campaign Suite. You think something is unrelated but it isn't.
You don't have to completely link all the pieces of the database. In other words, you can create an npc that's an elf, then delete the elf race. It doesn't matter because it picks up what it needs when you created it. The problem then becomes what happens later when you need that npc to have something else that is elf-only after a certain level and you inadvertently deleted the item or the race so it can't run a check.
You can end up with a database that is not optimized and repeated information in different tables. Then you have to remember to update all the different tables and it potentially runs slower. So go for a happy medium, perhaps?