After yet another hacking incursion, due to a vulnerability in the CMS we used, I’ve rewritten the website as a set of static pages generated by Jekyll . I’m actually very happy with the results- Jekyll is definitely the programmer’s approach to web design, which is probably why I like it.
There are several advantages of doing things this way (such as being able to store the entirety of the website in a repository… no more annoying sql exports), but one of the more interesting ones is that we no longer need any server side scripting. With no dynamic content to handle, the only thing the server has to do is serve web pages. This makes it possible to relocate to cheaper hosting at a later date, and makes the site itself very stable against heavy loads (hey, we can dream).
I also took the time to learn some other new web techniques, such as SASS . SASS is an extension of CSS3 that allows for much more compact code, leveraging ideas from traditional programming such as functions, includes, etc. Thanks to the inclusion of variables, it’s also a lot easier to manage- define some variables at the top of your code for common values, and then you only need to modify one place when things like colors, sizes, etc change.
No screenshot update this week, sadly, as the work I’ve been doing is all under the hood. I ran into a multiplayer bug while working on combat (which is what I wanted to be blogging about today), and ended up having to implement a journaling system for multiplayer. Journaling is a pretty simple concept, at least the way we handle it: whenever Starlight Revolution receives a packet, it stores it to disk. Because our game is deterministic, this means that we can do perfect replays of multiplayer games.
While replays are in themselves cool, it’s their use as a debugging tool that really helps us. Now when we have a bug, it’s possible to just load up the replay to (in theory) instantly reproduce it.
Of course, I’ve had some other ideas to branch from replays. One of these is to take the replay and use it to shape AI, so that you can play against an AI opponent who plays slightly similar to your best friend did in that game last night. We’ll see if that makes it into the game, but it sounds like a promising idea.
Anyways, stay tuned for next week, when hopefully we’ll be back on track to showcase combat.
Another week has gone by while developing Starlight Revolution, my space game. I spent this weekend working on three things: a new sun shader, adding city lights to the planet shader, and my main menu.
The most impressive of these is the main menu, which is now housed around a procedurally generated solar system. Each menu option is a distinct planet, and switching between options moves the camera into orbit around that planet. It’s pretty nice in practice… here’s a screenshot: