So I haven’t worked on my TextWorld project for a while, but after a week of doing web development for a local unitarian congregation, I dropped the beat on the A-Life and decided to pick up the Text again.
From what I learned in the A-Life project, NME seems like the ideal target for my Text Game too. I can pump it out for Flash, HTML5, and a bunch of other platforms. Of course, that’s just the front end. First I’ve gotta make the backend.
I brought over the data classes I made before and put them into a new NME project. Now that I’m using NME I don’t have to keep the interface and logic seperate, though I’m wondering if I should.
The plan before was to have the TextWorld object reveal certain properties which would contain the text for the four regions of the game board. Then I started thinking about how to do the context menus. I could probably reveal a list of strings with the context menu htmlformatted triggers inside. Then the interface would format those into floating boxes of links. When the links are pressed, they release a text event, which the interface passes back to the textworld, to find out what to do.
I still haven’t perfected the actions system. I’m thinking I’ll make a class that’s nothing but action functions. If you wanted to get a pie that was sitting on the floor, you’d click on the pie link in the room text, that would tell the textworld you clicked on the pie, and the textworld would generate a context menu for the pie. The links would be tied to either further context menus or actions. If you click the get action, the get function will take the getter and the object as arguments and attempt to move the pie to the player’s inventory.
*work work work* Hang on, what’s this? There’s no function class in HaXe? Hmm… Looks like there is a way to do it, using dynamic functions, but the syntax is different. Hmm… I’m not sure what to do with this. I suppose instead of using a direct function reference, I could call the function from a switch based on input. Kind of a funny way to do it.
Anyways all of this is spiking my anxiety, so I’m going to take a break. I swear, the more I work on this the more I think I should just drop all the pretenses and make a basic TextGame, and build up from that.