Inspired by this FAQ Friday thread on /r/roguelikedev, which lead me to keep a changelog, I've started keeping a log of everything I've done on BotLG. I'll be keeping it all in one file, divided up by weekly chunks rather than version numbers. You can always read the plain text, latest version at https://bonesofthelostgod.com/changelog, but I'll also be doing occasional blog posts like this one, where I'll expand on what I've been doing.

So, without further ado, this week's changelog:

KEY to VARIOUS SYMBOLOGIES and MYSTERIOUS MARKS
[!] New and important features or content
[+] Changes to existing features or content
[-] Minor tweaks, bug fixes, miscellany
[?] Arcane and unsolved puzzles, disturbed thoughts

Week commencing 2018-11-12
[!] Signed unholy covenant with the LOST GOD to resurrect this accursed project
[!] Added splash screen with mysterious countdown timer
[!] Implemented the Router and Page objects to handle URL routing
[!] Pages now consist of Models and Templates to provide a nice MVC-esque divide
[!] Created working log-in form action and template
[!] Created log-out action
[!] Created simple navbar menu
[!] Created Character object with functions for generating names and personalities
[+] Added support for public, private pages with optional redirects
[+] Added support for custom CSS, headers and footers on a per-page basis
[+] Added FontAwesome icons to navbar elements
[+] Page model can output JSON instead of HTML
[+] Converted existing session code to use the Router object
[+] Logging function, database table, page view
[+] Simple admin flag for Player accounts, routing options
[+] Nice little function for returning random elements from array
[+] Wow, that regex for URL rewriting is really something, huh?
[-] Created favicon
[-] Fixed up some minor CSS issues
[-] Slight adjustments to blog stylesheet, header image
[-] Ongoing tweaks to mobile view

First of all, the symbols. The idea is to make the file a little easier to skim through looking for the important stuff -- players will want to focus on the [!] that marks out new content primarily, and may want to dig into [+] lines, which denote changes to existing content. Only the super-fans will care about [-] lines, the most basic bugfixes and mundane dross that nonetheless needs doing.

There's a lot of [!] important and new lines this week, because this is essentially the first week of development work -- almost everything is new! I've mainly been working on the basic objects that make up the game's structure; there's a lot of behind-the-scenes scaffolding work here. I've settled on three main objects so far:

  • BOTLG.class is actually one of the slimmest classes so far, but it deals with low-level authentication, talking to the mySQL database, and provides some helper functions that lots of other objects will lean on.
  • Router.class does HTTP routing, surprisingly. All requests are directed through one script, and the Router object handles them (very nicely, if I do say so myself). It's main goal is to transform an HTTP request into a bunch of configuration options for this next object...
  • Page.class does the heavy lifting. It takes a successful request from the Router, and generates the content to send back. It has Models, which do something, and Templates, which format results from the models and generates the actual pages you end up looking at.

It's a really nice, flexible system, with a clean delineation between processing and content display, and it's easy to add new pages and output types (like a route that results in JSON, for consuming via an AJAX request). I'm really pleased with how this has turned out, which is important, because this is the stuff making up the most fundamental, building-blocks that everything else will rely on.

I've also got two objects that are leaning toward more actual gameplay purposes, which is of course what we really care about. I have a Player object, representing the real, actual person playing the game -- email addresses, passwords, account-wide settings -- important but dull things like that; and a Character object, for holding the various heroes and NPCs the players will both control and interact with.

The next step is to create some behind-the-scenes functions for creating fully fleshed-out characters, and then to create some UI to allow players to recruit their first hero and get into the main gameplay loop of adventuring, exploring, crafting and carousing with them. This sounds easy, but that first step into UI creation is going mean a lot of Javascript / AJAX / JSON scaffolding will need creating first. I think I can make a few tweaks to the Router and Page classes to speed that along, but I'm going to need a corresponding "application" object up and running in Javascript in the web browser to handle everything. That's going to be fun.