Wednesday, December 26, 2007

A Christmas Bug Tale

So here I am on boxing day fixing bugs. It's my own fault, I can't relax knowing there is a bug in the game I haven't tracked down. Luckily it wasn't *that* evil.
The bug symptom was this: If you reduce the number of smokers to zero, you still earn the same amount from tobacco tax!

Why?

Well the way it *should* work is this -> The income from the tax is set by the player moving a slider. This gets multiplied by various values, such as a global 'wealth' modifier for he whole country (USA vs Belgium in terms of size for example). it also gets multiplied by a special 'neuron' called Tobbacotax_income. This 'neuron' (everything in the game is a neuron) had just 1 input, and that input was from another neuron that stores the size of the smokers group. The input is an equation which in this case just simply sets the multiplier to be the same as the size of the group.

Cool.

But it wasn't working. Stepping through the code, everything seemed ok. The voter group each turn worked out how big it was, and would tell its 'percentage' neuron that value. later, the finance code would ask the tax how much it earned, it would look at the slider, and ask the income neuron how much to multiply it by. And here was the weirdness. The income neuron would be set at the right value, but the 'effect' acted as its input was still containing a wrong value. In other words, all my brain cells worked, but the wires had the wrong data in them.

It turns out that in the blanket code that gets every neuron to recalculate itself, that pesky 'percentage' neuron was doing its calculations, and just setting itself to its default (it has no inputs, and gets told directly what value to be). It then told all its outputs this value and forgot about them. The voter group code then trundles along and says "forget all that crap, here is your real value mate!" Which is fine, but the wrong data is still stored in the percentage neuron's outputs. Ironically, the system automatically propagates the right value out next turn, but before that happens, the value will get reset again in the same way...

Anyway................ All I needed to do was change the code that said "ahoy there percentage neuron your value is 0.12" to say "Ahoy there, your value is 0.12, and maketh that your flipping default value as well, so there are no mistakes if you think about recalculating yourself".
And all was well...

I need to do some playtesting before releasing this, because it may have caused balancing nightmares...

Saturday, December 22, 2007

Still here

But been very busy...
There are still some issues in Democracy 2 that need fixing, but I've been working away on improving the game, fixing small niggles, and bugs that nobody spotted yet. Hopefully I get to release an update tomorrow, and that will be the last one till the new year with any luck. I need time off!
I spend a lot of time these days dealing with email, publishers, accounts stuff, artists, advertising and marketing etc etc. I find that less and less of my actual total work time is spent coding. This doesn't mean its taking me longer to develop, because I'm just working more hours.
bah!

Tuesday, December 18, 2007

Advertising Experiments

Partly because Google took forever to set up my new Ads, and still haven't set them active, I have been looking at other ways to promote and market Democracy 2. One thing I did, but I'm not sure it will be much help, is to put together some little advert banners that I think work as forums sigs:

http://positech.co.uk/forums/phpBB3/viewtopic.php?f=10&t=1391

I guess that might help. Another thing I've done is take some time to tweak the settings on my existing google ads, and I also signed up with yahoo search marketing today. I now have accounts at google, MSN and Yahoo, and the vast majority of my monthly company expenses is adverts.
I'm generally paying about 10-12c per click, assuming that I might get a sale in every 50 clicks, that's costing me about $5 to sell a $20 game, so it makes sense.
Some people want to charge frankly hilarious rates for advertising. I saw a webpage wanting £30 CPM today. That's $60.00 for showing an advert banner a thousand times. Assuming 1 in a hundred people clicks it, and assuming a 1 in 50 sale from that, this means I need to display 5000 ads (costing $300) to sell a $20 game. Unless you are selling rolex watches at astonishing markups, who the hell pays that?

This leads on to my pet hate, and that's false advertising rates, or 'negotiable rates'. Don't mess me around. tell me your price. its a free market, don't be shy. If your rates have to vary often, have an RSS feed for them , or whatever, I'm fine with that. But don't set your products price as

"what I think this mug will pay once I speak to him on the phone".

I don't force my customers to haggle. If you sell advertising, don't force YOUR customers to haggle either. Google don't haggle, and they do pretty well.

Friday, December 14, 2007

PHPBB 3

So today phpbb3 came out, the latest upgrade to the free forum software I use. I have been bitten twice in the past by having forums wiped out by ahckers, so i was determined to ALWAYS be up to date with forum releases 9to patch security problems).
I had assumed that it would take a few hours to sort everything out but in fact it took all day and involved copying stuff locally, installing a local php server, yada yada. At one point I had both versions running and neither of them working. Bah!

But yay! in time, all ws good with the world, and there came a magical moment when I realised that I had a new phpbb 3 install with all my old data intact. Twas a glorious moment, even if it basically took all day to get there.
So since then I have been bug fixing. Tragically Democracy 2 STILL has some bugs in it that i *should* have caught before release. I think I've found and fixed them all now, but I need to do a good day or so's play testing at the weekend before I upload the latest (and hopefully last for a while) patch to the game.

Google still can't be bothered to reply to me. What gits.

Thursday, December 13, 2007

Adwords are STUCK

I've been a long time user of adwords, for both text and banner ads, but my attempts to start a new banner ad campaign fro democracy 2 have just failed badly. No matter what I select, what numbers I pick, and what I do, my campaign just sits there and shows zero impressions. I have emailed google twice to ask for help and been ignored. You would think an email from someone spending thousands of dollars a year as a customer would at least get read? Google do a good job generally, but they make it impossible for you to contact them and are very slow to reply. Crap customer service, despite their geeky trendyness...

I released version 1.02 of Democracy 2 today. fixes are:
  • Fixed bug where election was seen as imminent on reports just after an election was won.
  • Changed election text to not say 'years' in case 1 year term was selected.
  • Changed the description of violent crime.
  • Fixed bug where save and resume buttons dissappeared if you had started by loading in a saved game.
  • Fixed crash bug when banning tobacco adverts.
  • Changed load game screen to use last modified time rather than creation time.
  • Fixed bug where some simulation values could go below 0 when they were supposed to have a 0 minimum.
  • Fixed bug where the values of some taxes could be scaled wrong the first turn after loading a game.
  • Added new option to browse potential ministers without firing someone first.
  • Fixed bug where slider values could be wrong with sliders that have discrete notches in them. (also loading in invalid values)
  • Added support for new names files, and added russian and spanish names to existing missions

Tuesday, December 11, 2007

You don't believe the government?

Sometimes, amazingly cynicism will take root among voters. And lo! this is modelled in Democracy 2. It means I came across something that looked like ab bug but wasn't.
I had a player whose entire party membership deserted him overnight. it turned out that they were all planning on voting for him, but NONE of them wanted to be party members. why?
Cynicism.
Raise taxes just after an election, or cut them just before and the game rumbles you. The level of cynicism among the voters had grown so high that the amount it cut off from their approval was just enough to put them all under the threshold of joining the party. Hence everyone left!
I plan to change the game in the future so that each voter has a slight tendency to gullibility or cynicism, so that you get more fuzzy and less clear-cut results in such cases. Still... it was fun tracking it down.
Sales are quite good, but that doesn't mean you shouldn't get everyone you know to buy a copy!

Monday, December 10, 2007

Democracy 2 patch under way

No sooner do you release a game than you need to patch it. My games historically have had a few bugs on release, but I tried extra hard this time, and think I did pretty well. There are a a few niggles, but tbh, the patch will be mostly new features rather than bug fixes.

Sales have started well, considering I haven't told anyone about it yet. that starts today, when i send out my emails the minute the patch is up and running. So it will then be time to do emails to editors etc etc.
I already submitted the game to 60 download sites, only takes an hour or so to do it. And some of them take forever to list stuff. Tucows is delusional if it thinks I'm paying for a faster listing. I'm sure its not vaguely worth it. Take your time tucows... all you are doing is ensuring your site is known as the best download site for last years products...

Of course all this hard work means I'm not getting enough time to advance my Call Of Duty 4 Rank (currently 40). Bah!

Friday, December 07, 2007

Democracy 2 is ON SALE

Only just put it up there for sale. I'm so knackered. i hope some people buy it...
http://www.positech.co.uk/democracy2

Wednesday, December 05, 2007

Vote for Kudos: Rock Legend!

Hey! Do me a favor and take 2 minutes to vote for Kudos:Rock Legend at the game tunnel awards here:

http://gametunnel.com/phpBB/viewtopic.php?t=1137

(You need a free forum account to vote)
One year I'll actually win! (maybe).

Labour Laws

I just did a play-through of the game in the religious country, and it was pretty cool. I managed to turn the economy around (on my second try) and win with 61 million votes vs 60 million, so it was darned close :D.

I thing I did notice is that productivity is not affected by union laws. My gut feeling is that it should be. If your legal set-up is pro-union, that probably includes strict de-markation and making it hard to fire people. This, (my opinion) is bad for productivity, although great for the union workers with cushy jobs :D.
I think I'll add a slight negative effect to productivity, scaling to a positive effect as you go from pro-union to pro employer.

The game does a pretty good job of automatically simulating real world phenomena. Trade Unionists may be upset by the anti-union policy, but if it increases productivity and boosts GDP, that will raise more tax and enable the govt to lower tax rates and improve public services, which will please that same person :D. The problem (as in real life), is preventing those same union members from going on strike in the interval between crushing the unions (Thatcher) and reaping the rewards of an economic boom (Blair). You could say that in the UK, the conservatives (Thatcher) did the legwork of breaking strong unions, but couldn't keep things together long enough for the positive effects to trickle through to the economy. Or you could disagree and say it was sleaze, or the poll tax. ho hum.

I'm actually fairly pro-union in many ways, and anti-union in others. I think that workers have rights which need to be strongly protected and enforced by an organisation not related to the employers, but I think if someone is a crap worker it should be easy to sack them. Discuss :D

Tuesday, December 04, 2007

Polishing and Fixing

I'm rubbish at polishing and bug fixing. Many of my previous games have suffered from a few bugs on the day they get released, and I'm determined for that not to be the case this time. I would normally have released it last week, but I've been taking extra time to triple check all that stuff I normally don't even double check!

So I'm doing stuff like grammar and spell checking everything, checking it runs on a limited Vista account, checking for laptop and XP support etc.

It's getting there. No game is ever really finished ever, people just run out of budget and stop working on them. I have no delusion that the games code is now final forever and ever, and this is the first game of mine where people can click a button in a menu and check the version number against a web server check, so it's even easier to push updates out to people.


I'm already mulling over in my head which game to do next. There are 2 serious contenders. One is really commercial. One is really niche, but i think it's a cool niche. Can't decide...