Original Post
I''ve started thinking about how to implement the scripting system in my shootem game and i''ve come to a dilema i''d like some outside opinions and suggestions on.
I''d like game objects to be self-contained. One file contains everything that object needs to display and operate. Polys, Textures, Script, etc. This way adding another object to the game is as simple as droping that object file into the data directory and putting a reference to it on a map.
However, this leads to a potential problem. Object interaction. Since every object has it''s own script and is not part of one common binary; if an object is created that needs to effect another object in a way that is not normally pre-defined, it becomes difficult.
Objects can effect other objects properties, but that can only go so far.
For Example: Lets say we have a new object that is a freeze weapon of some sorts. Every other object in the game would have been coded before the freeze ray and therefore would have no special code for dealing with being frozen. The freeze weapon could still effect the other objects, but it could only go as far as what It could do by changing target objects properties. (such as setting nextthink to time + UNFREEZE_TIME)
Another Example: A new object touches an old object. The old object reacts to the touch, but since it does not know what the new object is, it does not know how to deal with it.. Hmm, I guess this is a bad example as flags could be used to make every object have certain properties so as DAMAGEABLE, etc. Still, certain cases could still exist...
The other option is to have a single common binary but that means that only certain objects could be used at the same time. The whole point is to be able to add and remove objects at will.
Any thoghts?