July 2007

Working towards release and littel name-change

The closer you get towards releasing your game the more small things surface that have to be taken care off before going public, and so over the last days/weeks I have been busy mostly taking care of small bugs and annoyances that needed fixing. Actually I already could have released it but everyone of you working on a game/application knows the feeling when you’re close to release. On the one hand you want to release it (in order to take the weight off your shoulders) but on the other hand you want to release something that’s as smooth and polished as possible. But I still think that a release somewhere next month is still realistic.

First the “important” thing : I decided on a little name-change to make it clearer that the first release is not just a demo but much more. The first release will now be labeled with “Phase 1” (Full name is Projekt “W” – Phase 1) and the final game (2008) will be labled with “Phase 2”. This sounds a bit odd compared to usual game name schemes but I think this is much better than calling the first release a demo and then having to tell anyone that it’s not a demo in the sense of the usual game demos with limited content and gameplay.

Next on the list is an overhaul of the research window. After changing the unit- and building-construction windows to look more like windows from a game and not an application I decided to do the same with the research window. The old one with all it’s listboxes, memos and other text elements looked like a window from some kind of office application and not like a part of a game. So now there is a much nicer representation of the available technologies in 3D instead of a boring listbox. You get them sorted in a circle with nice reflections and upon selecting a technology it’s rotated to the front and information on it will be shown the usual way. This looks nice and makes you actually feel like doing research in a game.

Projekt Projekt
(Left : old research window. Right : new research window)

And as you can see on the shots I also created images for all technologies. Somehow I forgot to put this on my todo-list for the first release but since there are only 25 technologies doing the icons for them (all are prerendered) wasn’t that much of work. So except for checking the spelling and maybe tweaking some research times for the technologies this part of the game is now completly finished, and while redoing the window I even fixed some small display bugs and annoyances.

Artificial intelligence

Project Some postings ago I already told you that the AI for Project “W” is the first more complex AI that I did (and still do) so I’m gonna post a bit about it this time. My initial goal was to create an artificial intelligence that’s giving the player a challenge without cheating but that’s also behaving different from game-to-game. The first point is pretty clear, if an AI is cheating the player will start to notice it after some matches and it makes the player feel betrayed, which is a real no-go. The second point should also be clear as having the AI do the same things over and over in each game would make replaying the game pretty boring.

Basically my AI is a finite state-machine with a lot of randomness and though that sounds like something very simple it’s actually not. The AI has to do all the things that the player does like constructing buildings, creating and moving armies, researching and managing staff and (one of the more diffucult things to implement) balancing ressources. It’s constructing buildings depending on a priority-list and now even replaces old buildings with better (or newly researched) ones. It creates and assigns divisions and also moves them around to overtake enemy regions, for that it also needs to calculate risk and expanding-factors for it’s region that are the base of a lot of it’s decissions.

It also has different available personality that are randomly assigned with each personality having different parameters and preferences. So a military personalty for example will spend more money on units than a civil one and the possibility that it attacks enemy regions is also a lot higher. And most of the preferences and parameters are also at least marginally randomized so that a military personality is also a bit different each time within it’s own personality.
So currently it’s doing everything a player does and it also seems to do it’s job very good. And in order to be able to see what the AI does (or what not) I’ve implemented several “aids” like an extensive log where the AI clearly states what it’s doing and what it tries to do, and also the possibility to automatically calculate turns, either turn after turn controlled by a timer or 100 turns at once. Together with the territorial map I can quickly see the AI’s actions and it’s also easy to see that every match turns out different, which in the end means that my implementation of the AI isn’t that bad at all.

Above you’ll see a “screenshot” that in the center shows the initial territorial map (after starting a fresh new game) and above and below you see different territorial standings after 100 turns. As can easily be seen each one looks different, which is due to the dozens of random parameters and preferences and the main different personalitites. So this variance in the AI’s behaviour should give each game a different feeling and make replaying the game a lot more interesting.