Over the past week, I’ve broken ground on a bunch of new stuff, none of which has actually gone into a build yet. Here’s what I’ve been working on:
- Binary saved games
Saved games are currently saved in a text format, which makes them easy to debug and easy for players to edit to give themselves more money (or anything else they want). Sadly, these text files take a lot of time to read.
I now have a proof of concept for saving/restoring these files from a binary format. For the largest saved game I’ve received from a tester (“Infinity Worlds”), saving using the binary format drops the file size from 129 megabytes to 118 megabytes (still far, far too big), but reduces the time it takes to load the file from 15 seconds to 9 seconds. Or to put it differently, it reduces the time it takes to figure out the contents of the file from 6 seconds to a fraction of a second. (the rest of the time is spent creating the objects specified by the file)
Save files still grow way too big. Even the binary-format file can be shrunk by a factor of ten just by zipping it, so I’m probably going to have to do that for saved games. (We already have zlib in the project, so I’ll probably just use that, I guess?)
Update: With a further optimisation, I now have that loading time down to 3 seconds, from 9. Which is pretty startling, but also awesome! Definitely need to make this all robust enough to put into a real build for people.
“Scenarios” are miniature plots/events which occur while you’re playing the game. Currently, I’m roughing out a scenario which involves an Internet personality streaming your game. In effect, it adds the concept of a “VIP” to the game; that person’s happiness with your game influences your game’s popularity with everyone else. You get alerts to let you know when they’re going to connect and when they’re streaming, and you can interfere or not; up to you.
I’m currently on the second big rewrite of the Scenario system; I think this version is going to work for almost anything we want to do. Crossing my fingers!
I’ve now broken ground on the new pathfinding system, which will replace the current one. The new system should be vastly faster than the current one, when complicated walls and other curving obstructions are present in the world. This is still early-days, but it’s in progress.
- Lots more art stuff.
I’m working with a new artist, now. You’ve already seen a few new models enter the game, and there’ll be more over the coming builds. This is taking a lot of my time right now, as we tweak shaders and discuss the general look of the game.