XMICAE 0.1.0 has undergone some testing and finishing, and I have to say that I’m happy with where it has come. The roll system should work fine, so a lot of what remains is going through and putting in some end of life support for the platform and whatnot. This means documentation writing, which shouldn’t be too horrifying, as well as cleaning up my production folder. I’ll leave all my test files in there so that people can mess around with them if anyone wanted to extend/learn from XMICAE.As mentioned, here’s a (semi-)complete feature list of XMICAE as it stands, complete with versioning:
- Loads XMICAE narrative files (0.0.0)
- XMI files can specify another file to load immediately (0.1.0) (via <load> element)
- XMI files can specify a prompt to load another XMI file as a separate prompt (0.0.0) (via <action> element)
- XMI files can specify token, state, and stoken database updates (via <action> element)
- XMI files can choose what to display based on attribute, token, state, or stoken data (via <object> and appropriate <Xrequire> or <Xorrequire> elements)
- XMI files can store data for a roll, including: <0.1.0>
- <description> elements containing displayed text for the link that calls the roll
- <modifier> elements which contain a string with an internal variable (one could write abacus[‘brawn’], which loads $abacus[‘brawn’] which is a storage for the contents of the brawn column in the abacus table for the player, put in a number, or load any other variable, such as the user’s ID)
- <target> elements containing a CSV string with a target number and a comparison (using [/] instead of </>)
- <Xoutcome> elements (X=success/failure/general) which function identically to actions and are carried out when the roll is completed; general outcomes occur regardless of success or failure.
- <function> elements (where function is a defined function) which determines what the roller will run. See “roll.php” to examine each of the RNG functions.
- Various other back-end MySQL features. (0.0.0)
- Server-side data for prompts to ensure security (0.0.0)
I’m calling this XMICAE’s postmortem, so I’ll be writing up some reflections here:
XMICAE was crippled from the start by its very design; XML is not a particularly great markup language for my purposes, and while it has some advantages over other things, it has some major flaws that made it incredibly clunky to work with, including the need for start/end tags and the DOM platform being a little finicky.
As far as the actual production side, beside XMICAE being as ugly as sin (for a variety of reasons, including the fact that I’m a little afraid to touch my archaic HTML and CSS for fear of breaking it even worse, and don’t have time to do a complete mulligan), I feel that it functions pretty well. I used mysqli as opposed to PDO because of not being terribly familiar with object oriented programming, but now I feel like that was a mistake; PDO is capable of working with more SQL database types and seems more intuitive as I begin work on YMICAE, with its prepared statements being nine times easier to deal with.
XMICAE’s code is also a major concern. I have a ton of code spaghetti, largely due to last-minute fixes for deadline purposes, and while it is functional and doesn’t hurt performance it makes it very hard to iterate updates to and work with. Many things that should be functions are not, and many things that should be placed in a separate include file are not.
And that’s XMICAE; I’m proud of it in a way that I’m proud of a fourth-grade essay—it’s an achievement, but far from perfect and not worth extending rather than just starting anew.
I’ve sort of tipped my hand for my next project; I’ve got a couple things I’d like to do in the upcoming months that will be mostly dependent on when I get time to do them and how they all come together, one of which involves coding and the other of which involves writing. YMICAE, which is YAML-based instead of XML-based, is the former. It has its own unique challenges and situations, some of which stem from the fact that YAML and XML have wildly different structures and I will need to acquaint myself with them, but the fact that YAML more natively represents the variable structure of PHP is a massive plus for the project.
To make a long story short; I already know how to read and write YAML files after a few hours of poking around at making YMICAE, some of which involved setting up PDO for a database management system, while XMICAE took me days to even successfully utilize any XML file input, and I still don’t know everything I need to to neatly parse and output XML directly without the abstractions that XMI uses.
The other project I’m working on is a tabletop role-playing game. It’s not Orchestra or Aduelle, which I should really get around to (though Orchestra is a priority for a YMICAE game built on the ABACUS system), but rather a game that focuses on borrowing mechanics and design philosophies from a number of games and utilizing them in a collection to be more than the sum of its parts. It’s based on a steampunk-gothic setting that is focused on “putting the punk in steampunk”, with a darker tone and elements of rebellion and postmodernist philosophy colliding with Victorian social structures.
Mind you, both of these things are a good distance away; my honors project will eat the majority of my working time between now and August, as will (hopefully) returning this blog to a functional state.