Wednesday, October 31, 2007

Back at work

So... I went to Nottingham to meet some fellow indie devs, then went on holiday around my birthday, now I'm back home but veyr ill, so there has been a delay in working on Democracy 2 lately.
I went to the 'worlds biggest tank museum' whilst on holiday and it was pretty l33t. Those old fashioned WW1 tanks are HUGE and a complete nightmare on the inside (you can climb in them and even play with the guns.)
One bad thing about being back is my DSL connection has gone VERY flaky. bah.
I'm teetering on the verge of doing some playtesting now.

Wednesday, October 24, 2007

Run up to nottingham

So... Friday night I'll be in nottingham for meet-up of UK indies at GameCity. Should be interesting, having never actually met anyone else doing what I do. This means it's a legit business trip, fully on expenses, and tax deductible, which is cool. Because the UK rail system is fucked up, I'll be going by first class train ticket, which was CHEAPER than a standard class ticket. yay for internet rail bookings.

It also means I'll get no work done friday, and then I'm away for two days elsewhere to celebrate? being 38. Wow. still 2 years to become rich before I'm the dreaded 40.

I'm currently working on the tutorial for Democracy 2, although its more a case of hint windows than a fixed tutorial, which i may do separately in some form. I have much play balancing to do, and some artwork to integrate when I get the full stuff, and from then on I can do early screen shots and a very basic website to start building interest.

Friday, October 19, 2007

Todays Fix List

So far:
  • Fixed formatting for the insufficient political control dialog
  • Fixed starting debt being too high for one mission
  • Fixed accidental code typo in the global economy calculations
  • Fixed backwards equation for celebrity endorsement event
  • Fixed Typo in Banning same-sex marriage policy
  • Increased effect of GDP on immigration, and immigration on racial tension
  • Fixed corrupted icon for tourism booms
  • Added a negative effect on patriots when an oil pipeline gets attacked
  • Added new effects to stem cell research so they influence the high and low technology situations, and tweaked their numbers too

I guess it might be cool to add a human cloning policy too? There is so much that *could* be added.

in other news, the postal strike is delaying my artists getting paid, which is delaying the first proper screen-shots. bah.
The game is definitely coming together though. I'm *fairly* sure the bulk of the save game code is ok, although it's always a nightmare with a game this complex. I have lots of play testing to do still, the website to do, plus demo upsell stuff, tutorials etc, and mod support.

Tuesday, October 16, 2007

hideous code hell

Today has been no fun. pouring over tons of numbers trying to work out why the loaded in data differs from the pre-saved data. its been pretty grim. tracked down a number of bugs though, one where the values were not displayed correctly because they didn't allow for ministerial competence, another where the initial values of policies effects were not being set up correctly. Slow but sure progress anyway. at least you can happily save and load games and the game you load looks vaguely like the one you saved. that's a start anyway!

Monday, October 15, 2007

C++ Optimizing

Been speeding up the loading and processing code for Democracy 2 today.
Here's some tips.

this:


std::list::iterator it;
for(it = list.begin(); it != list.end(); ++it)
{
}

Is way slower than

std::list::iterator it = list.begin();
std::list::iterator endit = list.end();
for(; it != endit; ++it)
{
}


mainly because end() is very slow. if you know the list itself won't change during iteration, its well worth doing.

Also, this stuff is mega slow:

ftell()
fseek()
fgetc()

Much better to laod the whole save game file (2.5 meg) into a buffer and handle the extraction of each byte yourself. its 50% faster so far, and that's without getting geekier and inlining stuff.
Hopefully the game will start up, process and laod really fast, even for old PCs. That's not because its simple, but because I enjoy optimising the cr*p out of my code :D.

Saturday, October 13, 2007

Heavy Metal Clothing

I'm about to leave the house to go see Dream Theater and the only thing warm enough to wear thats not dirty is a blue marks and spencer's wooly pullover.
I just got back from holiday, hence the lack of clothes ready to wear.
But still.... I'm going to see a heavy metal band dressed like gyles brandreth.
Bah.
I'm middle aged I think.

Thursday, October 11, 2007

Politics without product placement

So it seems that sim city societies (don't forget this isn't so much maxis now as EA) is now going to include climate change in the design of the game, but for some reason it does so with the help of a real world oil company. here's some blurb:

"Alternatively, players can strive to create a greener environment and avoid hazards caused by excessive carbon emissions by choosing from a variety of BP Alternative Energy low-carbon power options."

WTF? This sounds like some TV-advert that oil companies produce to make themselves appear green. Is BP the one who actually changed their logo to be green?

Amazingly Democracy 2 will feature climate change, carbon taxes and emissions, hybrid fuel cars, bio-fuels and renewable energy, all without needing to take a big suitcase full of cash from an oil company.
Ho hum.

Friday, October 05, 2007

Music and holidays

So I just got the practically finished music for Democracy 2 delivered. Pretty darn good. feels like movie music, like epic lord-of-the-rings meets the west wing style. Way better and much more appropriate than the very short music for the original game. It's going to give everything a far nicer, polished feel.
I've been doing a fair bit of balancing. the game can beat me now, often when I make the mistake of being too focused on just beating the budget deficit at the expense of actually having voters like me.
A big mistake you can make (which is new), is not defining your 'base' voters.
Every successful politician has his base. George Bush has his base, they are the Christian right. Clinton has his base, they are the left and liberals. Gordon brown has big business and trade unionists (clever double act). The conservatives have conservatives (typically), patriots and to some extent, the middle class.
The base are important in Democracy 2 because they make up your party membership. You have to get *some* people VERY happy, or they will not join the party. A small party means a low turnout at election time, and you can be 55/45 in the polls and lose badly if the other guys get their vote and you don't :D.

Anyway, I'm off on holiday to Venice for 5 days, by train no less. No airport queues or gestapo security idiots checking me for water bottles. Yee-hah.