So, let’s try to “open the chest” while in the “cell.” When the game was loaded previously, the data for moves and interactions were fetched from Parse. Clicking the Tweet button immediately logs your tweet to the list on the right. It then loops through all of the moves gathered from Parse until it finds one that matches your tweet (“open the chest”).
Once a match is found, it replies with the corresponding response (“There’s a coin in it.”), and triggers any interactions (chestopen) associated it. It will also change your position, although there is only one instance where this is necessary so far — when you tweet “start” at the beginning of the game.
Dumping all of the moves into Parse has been a big help, but it’s still unwieldy dealing with all of that data. I’ve begun work on an admin interface that will help with managing all of it.
I’m also not pleased with how certain items are being handled, such as the coin and the key. I’d prefer that there were some logic in place where you could be carrying them in an inventory.
Got questions or want to try to play through this prototype? Hit me up on Twitter!
Update 1/28: Well, this certainly complicates a few things.
This is Part 3 of a series of posts about the game. Part 4 can be found here. Or start at the beginning.