Monday, December 7, 2009

Serious Design Flaws

As I began working on linking rooms together with the Zone Builder I ran into several issues with the design of the toolkit. Serious design issues, and it is forcing me to re-work a pretty large chunk of the editors and engine to fix the issue. One of them being that the filenames are not modifiable by the users, I have forced them to be read-only, with the engine assigning a filename to each object. This creates an issue with room names, as what if I want a Room called Bedroom but 4 different variations of it, I can keep the Room title as ‘Bedroom’ but have the 4 variations saved as different filenames.

The next issue I ran into is what if I want to have two Zones with the same name, but within different Realms? This isn’t possible as Zones are contained within their own Data directory.

Another problem is that Realms contain a collection of Zones. The collection contains the entire Zone class. Wait a second though… Zones contain a collection too. A collection of Rooms, holding the entire Room class. What’s this mean? It means that even though the Zones and Rooms are being saved out into separate files, the Realm files where also saving every Zone and Room it contained. Duplicate saving was happening, and having a Realm save every zone, with every room, is going to take a lot of time up during the loading and Saving process.

Lastly, the linking of Rooms was going to seem cumbersome with the installing and uninstalling of doors into Rooms. It was a neat concept at the time, but I have since decided to do things differently.

So what am I planning? I will allow for custom filenames, move the Zones data directory into the Realms directory that owns them, provide Realms with a link to their Zones, but not an actual copy of the Zone, along with removing the copy of the Rooms within the Zones collection, and providing Zones just a link to the Rooms. Lastly I am deleting the Room Designer from the project, and giving the responsibility of creating rooms to the newly renamed Zone Designer. This is a couple days worth of work to get ready and finished, along with adjusting my namespaces within the classes. Hopefully by the end of the week I will have the Zone Designer working fully, with the creation and linking of Rooms completed.

No comments:

Post a Comment