Post December 2nd, 2013, 10:05 pm

Dev Blog: Why am I doing more than just fixing bugs?

When testers help the developer to polish the game...

I’ve found that testing a game and getting it bug free for release is harder than I thought it would be. These last few weeks have seen some hard to find bugs and grueling debugging sessions. There’s reports of hardware configurations where the game won’t start, problems restoring from the computer being in a locked state, various crashes, asserts, and a myriad of unexpected behaviors. So far fixing these has been going pretty well. It just takes time.

Beyond the bugs, I’ve been taking suggestions from some of my newer testers – and implementing some of them. While I’m excited to get this game released, I want to have a good user experience beyond just a game that doesn’t crash.

At first I was worried that the suggestions and requests were going to consist of major changes to the game, but in fact most of them are reasonable and good ideas that are mostly about the user interface and interacting with the game. I’ve been working on Banished long enough that I don’t notice the short falls in user experience – I’m just used to them. So getting suggestions like these are great and really help polish up the game.

They tend to be questions like:

– Can the inventory lists be sorted either by name or quantity?
– I pause and unpause time passage quite a bit, can a button be bound to toggle this?
– Can the placement tool remember the previous buildings rotation?
– Can there be an option to lock the mouse to the game window? Edge scrolling doesn’t work with multiple monitors or windowed mode.
– ESC doesn’t back out of certain menus, can you add it to all of them?

Those things are all easy to implement, and I agree they are needed.

Then there are suggestions that are harder to implement like:

– After I have a large population, and at some point there is a food shortage, everyone dies. Is this expected? Shouldn’t some percentage of the population survive?
– In a large city, the citizens sometimes live very far from their workplace and spend more time walking than working. Can this be fixed?

I’ve been working on fixing these types of issues as well, but they are a bit harder to deal with since they involve changing the way the simulation works – this can break balancing and introduce new bugs. But again, I feel the game is better with these types of issues fixed, so I’m fixing them.

That last suggestion about citizens not being productive led me to optimize who is assigned to what job relative to where they live.

When I first started writing Banished I envisioned a simulation where everyone was unique and had a fixed job for their lives. This led to people trying to live near their workplaces, but in the situation where a married couple had two jobs at opposite ends of the map, they’d live somewhere in-between and hardly get any work done since they were always walking back and forth.

As a town gets bigger and bigger, resource production really slows down because of this. But being busy with other things, I never really revisited the way job/house placement worked.

After some suggestions from testers, and realizing that the townsfolk weren’t really tied to any one job, I decided that this sticking to a job once it was assigned wasn’t really needed. In fact, the player can reassign a worker to a different profession any time. Furthermore, testers found if they unassigned everyone’s jobs, then reassigned them, the placement of people relative to their workplaces was much better.

So I wrote some code that tries to optimize the jobs assigned relative to the work places and homes automatically. This increased resource production significantly in most of my test maps. Of course it was hard to know that the code I wrote was actually working properly in a town of 700 people and 200 work sites. So I wrote a quick tool to visually check citizens home locations relative to their workplaces and the paths in-between.

The tool worked really well and gave me a lot of information about areas in the town that could have better layout. This in turn helped me increase resource production even further in my test maps by placing more homes in areas where workers were traveling long distances. This of course turned out much like the Follow Mode addition to the game.

It was so useful that I decided to keep it. It’s a little feature creepy, but I needed it to verify things were working correctly anyway. After an hour more of prettying up the graphics and making the code nice, I had added the Pathing Tool to the game. It will show where all the workers at a work site live, or where all the people in a house go to work, as well as the paths they take when traveling in-between.

Now back to debugging some of those hard to reproduce crashes…


To read this devdiary in French, go here. :)