I'm working hard at coming up with a way to implement scripting support into the Mud Designer. One of the problems you encounter with a visual approach to anything is constraint. All MUDs will act the same, and feel the same when created using a visual tool. Scripting breaks that issue, and provides MUD designers a way of expanding or changing the way things work within their game, a way to make it unique. The interface provides new comers and seasoned pro's a quick way to prototype and build a base game, and then build ontop of that via a script system.
I'm pretty sure the route I'm going to take is to give The BaseObject class a script Property. This way every object in the MUD can have a script attached to it. Doors, Rooms, Zones, individual items and even characters.
All scripts will have an OnCreate(), OnEnter(), OnExit(), OnDestroy() function. Additional functions will be added overtime as I think of them.
Each script object will inherit from BaseObject, and have all of those functions contained within BaseObject. Then users can create their own OnCreate() functions that get called and still use base.OnCreate() in order to have the stock OnCreate function executed. This is the best approach, as it allows users to piggy back the existing code, or omit the 'base' call and write their own.
Another thing I'm planning is to build a BaseCharacter class, all characters will inherit from that, regardless if it's a monster, player or NPC. The goal is to build Party Support, communication and fighting all within the BaseCharacter class. Monsters, NPC's and Players classes can be tweaked on how things are done, but still have the bulk of the code already contained within BaseCharacter.
It would be neat to have NPC's able to join the players party and fight, or have monsters fight in Party's, with supportive and offensive monsters working together. This can be achieved if they all share the same Party code found in BaseCharacter.
- Posted from my iPhone
Tuesday, November 24, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment