I''m working on a pinball simulation and have an architecture/design question for you all. Please keep in mind that one of the major design goals is to allow end user expansion.
So what would be the best way to allow end users to define new entities and their physical behavior without forcing changes to the main physics engine?
I''m inclined to have the physics engine be a moderator for a couple of queues (''entity needing attention'' and ''forces to be applied to entities'' queues).
The entities define their own behavior either through a simple scripting language or a DLL with a common interface. They would then determine their own reaction to an input given by the physics engine.
So before I go charging off implementing this I''d like to get an opinion or two on what pitfalls I''m setting myself up for.
Thanks for the feedback, and I agree on that point.
It is a stretch goal for the project to use a scripting language for entity physics. I'm going to start off supporting dlls through an abstraction layer that I should be able to add script support to without disturbing the dll implementation or adding too much overhead.
The scripting language definition has already been done for the game logic, allowing users to take existing entity types and create their own table layout,artwork, and game rules to create a new pinball table.
I'm really curious about people's experience in designing extendable physics implementations, however. If anyone has any pointers to information on the subject, I'd be overjoyed.