Social sim. engine, pt. 2

So what’s first? I’ve got the requirements down, so now I need to start translating that in to code.

The most basic thing I’ll need to build is a player. I like to use a simple MVC pattern for this. It’ll need to be a very scaled down version of my Ramen player so that should be easy enough.

The player/controller will have the model load an XML file that contains the information for the characters, the structure of the sim and some settings (ui, speed, don’t know at this point). Model will do a little parsing and then the view will take over and draw the UI. After we’re all set up, the player will show the first page.

Each page will be a movie clip in the library of the player. In ramen, each page is an external SWF, but I’d like to keep this player simple. Having everything in one place will make it easier to keep a consistent UI and make it easier to edit. The content for each page will be stored in an XML file. I’ll need a class for the page that handles loading the XML and then kicking off any interaction specific interaction code. So a base template class and a few subclasses for each specific type.

Also need to come up with a schema for the XML and keep it as human readable as possible. Keeping the structure separate from the content of the questions should help a little. But as the complexity of the simulation goes up so will the mark up. I’m not quite sure how the variables and evaluations of the dynamic state will even be defined yet.

All of that will probably take me a week or so to get though. I’ll have screen shots up as I make progress.

Leave a Reply