After working on consoles for a long while, you get to know the all the systems in a game engine - even ones you don't actively work on. You talk over algorithms with other programmers, make sure your systems work well with others, and help fix all sorts of bugs near ship time. Given that, there's very few systems that I needed to write for Banished that I hadn't had any exposure to at all. These past few weeks I've found two. Tutorials and Achievements. Implementing them has been a typical round of designing something, getting halfway through it, and realizing there is a better way I could be doing it.
There is a hard issue to deal with tutorials in a city builder or RTS. If you tell the player to do something, you have to make sure they can actually do it, and do it without error. Whatever they do, the next tutorial step has to be valid as well. In addition, anything the player is allowed to do that isn't part of the tutorial shouldn't invalidate anything in the tutorial.
There are way to many things that can go wrong if the tutorial gives the player freedom. If you say, 'Place a Log House' and let the player pick the location, they could place in a location where the townsfolk can't get to it. They could try to build a stone house instead when there isn't any stone available.
The first issue I dealt with in trying to do this is that Banished has so much user interface. There are lot of buttons and widgets that the player can fiddle with. In most tutorial steps the player should only be allowed to only press one button, or place one object. I didn't want to inject any tutorial code into the main UI code - that's just messy coding and bug prone. So instead I built the tutorial system to just disable all UI widgets with a special flag that only the tutorial uses.
This allowed all UI code to proceed normally without knowledge that the tutorial is occurring. Once that system was in place, the tutorial can disable all widgets except for a few buttons per step. I also added the ability to add an overlay dialog to highlight any widget so the user would know on screen where things are.
Each tutorial step also has a goal - what should the user have to do for the tutorial to proceed? Press a button? Place a house? Set a certain number of workers? The tutorial system has a bunch of different goals it can wait for - they all just monitor the state of the game. Again this was done without adding code to any real game system - everything is limited to the tutorial system. Once the goal is met the tutorial moves onto the next step. A typical goal looks like this:
The only other major thing I had to add was a way to show the user where to place things, and not allow them to place them in any other location or orientation. Unfortunately this did require some code added to the system that allows the user to place something - it has to know if it's in a 'restricted' mode where the current item has to be placed in a specific location. It also resulted in nicer placement footprints that show building orientations and where roads can overlap the building area.
The process of building the tutorial is slow - mostly in testing and deciding what things to cover and in what order. I've got the first 'Getting Started' tutorial finished - it shows the basics of survival, building things, and basic resource production. I'm planning on doing a few more tutorials on the different methods of food production as well as long term survival. These tutorials show how to play, but really won't give away any best way to play. There's more than one, and that's for the player to twiddle with.
Whether you love them, hate them, or use them to show off your gaming prowess with your friends, Achievements seem to be an integral part of games now. In some ways they've always been there - just not formalized. For me, finding a room full of goodies and then and seeing only 34% of secrets found at the end of a level made me play Wolfenstein3D levels over and over and over. I generally only try to get 100% of achievements in games I really like - where the extra gameplay time isn't a grind.
Like the tutorial, the achievements are setup so that they don't interfere with any actual game code, they just monitor the state of the game and keep their own state.
I've tried to keep the achievements for Banished reasonable, but also make them things that aren't likely to happen except when you build big cities and do a good job while doing so.
Here's what the setup for the achievement looks like - very similar to tutorials, but with different goal types. This particular achievement requires a certain amount of food be produced in a single year by every type of food production building.
The second worst part about all these achievements is making an icon that goes with each achievement and somehow represents what it is. It took at least an entire work day to make 36 icons that I was pleased with. The actual worst part of achievements is testing them.
A lot of the achievements have population requirements or time requirements. For example, one achievement is to maintain high health for a population of more than 200 people over 10 years. For most people this is somewhat likely to happen as you play, but getting there is tough. You can build a town of 200 people in maybe 5 hours (if no disasters occur and you're familiar with the game already.) Then maintaining the health of those people for ten years takes at least another hour if the game is running at fastest speed. Now do this for all the achievements....
My guess is that to truly test all the achievements would take me more than two weeks of nonstop play. Instead I've been testing them using cheats. Being the developer, I can build things with no resource cost, disable health and warmth concerns, and get people to survive without homes. I can add resources and unlock things you normally have to trade for. This really speeds things along and makes the goals for the achievements attainable in a reasonable time. However when I do use the cheats, I try to cheat in a way that makes sure to validate the attainability of the achievement. Even with the cheats, getting 100% of the achievements took about 11 hours. With cheats! Phew!
For those of you that noticed it in the image above, no I'm not planning on having that 'Debug' dialog available in the final version of the game, and yes you can switch the temperature display to Celsius. And if the overhead map area looks small, that's because I'm playing on a small map. ?
Hey, been a silent watcher for several weeks now and I must say I am impressed, I posted about the game over at a forum I'm an admin on and I know some people there are interested in the game. So looking forward to the game when it comes out. Keep up the amazing work!
I've been lurking around for some time and just wanted to say: "Keep up the good work and don't be afraid to ask a fair price for this game! I'm sure most of us will pay a fair amount for it. Maybe you should contact some expert to see which price margin renders the most profit.
As a person who loves to tinker, I'd love it if you'd leave debug in as an option - maybe you'd have to enable it in a config file, or use it as a launch flag - but being able to dig around in the guts of a game actually prolongs its life for me. (Think "Infinity Machine" TSR in the DOS days that let you edit values in RAM in a running game - that prolonged the life of Star Control 3 a great deal for me!)
Horray for getting closer to launch! I don't know about other people, but I usually blaze through the tutorial to get my hands dirty and enjoy the trial and error of real gameplay. This with the apparent complexity of creating tutorials, maybe just make video walkthroughs for people and keep tutorials to a minimum. But do what you think is best -- it's your game!
Yes, as Wisse stated, a fair price is important. While, of course, you will sell thousands of copies and will be paid well at a $15 to $20 price, I would be more than happy to pay $40 or so for your game. It would give me great pleasure and happiness to support you with a larger sum of cash.
Your work is just awesome! You've to charge us a fair price, that cover your work and costs, letting yet a profit margin to you, and certainly no one will complain about it. Also, if you need translators, I offer me to translate the game to Portuguese BR.
Would die to play the game now, but failing that, please do keep those blog posts coming, preferably with AMPLE screenshots and videos -- I find myself repeating them quite a few times, just to satiate my burning desire to play this game!
I too would like to see the debug menu in game, just for the option of tooling around with it. As Overand said, even if it's something that has to be enabled in a config menu it would be cool to access.
I second the idea of keeping the debug in. Definitely have it turned off by default, but having it there to play with, would be great. A friend of mine mentioned that he was planning to make videos using in-game content, and having the debug system would be incredibly useful to him.
Have you begun researching artists the soundtrack yet?
For me, music makes or breaks the gaming experience.
I can imagine a score similar to Actraiser.
something soothing but with undertones of hard labor.
I've a question: Will the UI stay the same? Even though it looks very practical, this black,gray,shadow-scheme also looks very artificial in my eyes and therefore as if it doesn't really fit into such a game. Will there be something else (e.g., wood)?
Any way I hope you take all the time (and rest!) you need because it looks so awesome! There aren't much games around that actually have a relaxation factor like you made available as play option (maybe (Open)Outcast does something like that).
Well, "cheat happens," so are you planning on leaving the classic feature of allowing cheat codes (that disable achievements for the period) to the excitement/thrill of some of us (sore loser) gamers?
3a8082e126