I was pleasantly surprised today when a reader kindly reached out on Facebook and asked about the state of world generator I built over the course of 2014 using PHP. He rightly pointed that I have not mentioned it since 2014 and asked if was still developing it.
The quick answer is: yes, I am.
The slightly longer answer is that in 2015 I started re-writing it in Python but haven't got around to blogging about my progress. I haven't worked on my blog much because I've been trying to write more fiction and I now have three young kids to take my time.
I decided to re-write the app in Python because, as much as I love PHP it limited the generator to the web (and the command line). Python opens up the potential to deploy on a wider variety of platforms including the command line, web (rich web app or restful API) or even a graphical desktop application.
Here's a look at the entry screen for the command line app:
So far I've separated out the code into core business logic (written as Python modules) with the ability to import these into whatever UI layer I want to use. This makes it much cleaner, versatile and easier to maintain than the PHP version.
Another reason why I haven't blogged much about the subject is because I haven't really settled on the persistence layer. Originally, I was using a nested directory structure with data stored in a mixture of markdown and json files. This was so the data was readily accessible for editing outside the app and to make the data easier to version control with Git.
I have largely replicated this in Python but I'm debating whether to use an SQLite database. I may even decide to code for multiple persistence layers, letting the user choose what format suits their needs.