Sunday, December 10, 2006

I'm taking advice from figments of my own imagination.

What's happened since the arse end of November?

Ok, first of all the name of the page has changed, to Mostly Fictional. I now own and and if you click on those, you'll see they point here. That's so shocking I nearly fell off my chair.

Mostly Fictional may or may not be a name I use permanently, but at the time it seemed good. I'm much too lazy now to spell out why so you'll have to take my word for it.

Other things that have been done... well, I've been creating a competition editor because doing it through the editor I coded earlier is a fucking nightmare, thanks to BlitzMax's inability to use multiple columns in its lists. Plus, I'd rather have a half decent graphical representation to guide me through the process instead of just keying in numbers.

Lastly, there's that thing which passes for some sort of evidence that I've been working on things. Granted, I've only got three federations in the game so far, but they're easy to put in. The NF-Board held their first proper tournament last month, the VIVA World Cup, though the name's a bit of a misnomer as it had only four teams, and only one of which came from outside Europe, the Southern Cameroons, a side I question the validity of in my ignorance. Oh, and they never showed up either, leaving the Sámi people (or Laplanders, if you prefer and they do not) to walk the tournament with a 7-0 win over Occitania, 14-0 against Monaco (the principality, not the Ligue 1 side) and, er, 21-1 over Monaco again in the final.

Rather impressive, but then Sápmi is a huge area and the players involved were drawn from the Norwegian, Swedish and Finnish leagues, some in the top flight. By comparison, Monaco's players are all pretty much restricted to Monaco itself.

Still, go Sápmi!
Better than fucking Ireland, anyway.

Wednesday, November 22, 2006

Invitaton for abuse

Ooh, look at that. No, not Celtic's bizarre lead over everyone else in the Scottish Premier League. Look closer.

It's a screenshot.

It's a screenshot of what the GUI engine is capable of. It's green, which is always nice and relaxing, and it's got some football related info on it, organised in a nice way that people can instantly recognise, and that's not just because the top two are the Old Firm.

That league table is a custom gadget in the GUI. The release on Sunday night went fairly well as module releases to a programming language community go, and so on Monday I went to work on more gadgets that I needed. The first was a simple generic table which could take any number of columns and produce output not dissimilar to that screen there. It's a rather good gadget for working with lists of things, but for a league table I needed something more specific, and more powerful.

Hence the customisation. At the minute, it's largely the same except the column headers are predefined, and it's a lot easier to add the data because of it. Underneath the hood, as I might say if I was American and cared about cars, each team has a name, a position in the league, a home record, and an away record. Those last two get combined to show you what's shown here, while the league position is used in case you throw things out by sorting it.

Which you can't do yet because I haven't coded in the column sorting. Or the viewing of home/away records. In good time, I'm sure.

So, work is going quite well at the moment. From now on I'm going to resolve to post a screenshot with every blog post, so if I forget one, use the comments feature to send me abuse. I crave it.

Sunday, November 19, 2006

My First Release

The GUI is finished.

Well, that's not strictly true. It exists, it works, and it has all the basic features I need but basic isn't good enough for the game. Nonetheless, I'll be releasing it tomorrow if I can get off my arse and write some example code, build a few executables and find somewhere decent to host it. None of that should be a problem but I'd like to find a web host now and migrate this blog over, rather than rely on a third party host.

It'll feel great to finally have something out there, even if it isn't a game, is entirely free, and won't keep me in Yazoo. It'll just be nice to have something to offer, get some feedback and hopefully see people using it and liking it.

Following the release, I'll be implementing some things that are specific to my own game. Which is always a lot more fun. It brings me closer to finishing (although "close" really isn't a great adjective to be using at this point) and I get to try things out. First up, a standard list - we all need those and that'll get slapped into the release version of the interface. Then a league table gadget, which I guess people don't need much, and some fixture lists.

Essentially, everything you see on the screen is a gadget. As it should be.

Thursday, November 09, 2006

A nice, relaxing, excruciatingly painful break

The fun met an abrupt pause last week. I had to go to the dentist to fulfill the latest part of my bi-decennial checkup. Unlike the more mundane fillings, this one was a root canal. My first. I was entirely oblivious to the horror stories that surround this process, and as such the entire thing passed without me even noticing the dentist had done it. I was just about to utter a mild "excuse me, is it done" when the very answer came forth.

Off I went about my business. As the anaesthetic wore off, I felt a tinge of pain but nothing to get in the way of the work I had planned - implementing a simple panel as one of the basic building blocks for my new GUI system, and the others to go along with it.

That night, I worked. I had some successes, but was tired and unusually cold. The next day was not so lovely. The pain had built up, and I sat through work, swirling freezing water around my gums in an attempt to numb things. That never worked, and I came home that night with no plans other than to curl up under a blanket and watch some football. I never slept, the pain was too much. I resolved to burst into the dentists office the following morning, which I did, and thankfully got myself some antibiotics. Antibiotics which wouldn't work for three days.

I couldn't stay in work, so I went home, going through a repetitive pattern of sleep, toilet, pain, sleep, toilet, pain. First in the bed (not the toilet part, mind you) and then on the sofa after I resolved to finally play Bully. That never happened. The house was biting cold, but there was no way that heating was going on after last winter's bill. More jumpers.

Finally, my girlfriend arrived with stacks of pills and all manner of drugs which I'm pretty sure I would have injected straight into the offending gum if I only had a needle. Miraculously, they worked anyway. I could sit up, watch TV, talk! Thank fuck for all that.

Still though I wasn't fit to work. It wasn't until Sunday that I finally loaded up BlitzMax to see if I could knock something more out, managing to do half that button I had wanted to get done during the week. Instead of having most of the GUI work done by Sunday, I had barely started.

Which means that's what I've been doing this week. That button has been completed and I've added some labels, images and a nice combo box that surprisingly works exactly as I wanted it to. This is a breakthrough for me, as I hate coding those fucking things. It's even pretty extensible and the same code can be used for those lovely right-click shortcut menu jobs.

I also learned some more about BlitzMax's 2D system, which isn't the best, but rather than mope as I would have done in the not-too-distant past, I've taken it on board as a challenge. If I have to get stuck into the guts of OpenGL, I'll do it.

There's a solution in there somewhere...

Thursday, October 26, 2006

Joyless Soul - meet Mr Big Fuck-off GUI

I wasn't in Madrid that long, was I?

I think I'm going to have to bite the bullet (or chew any other type of ammunition, though that may lead to the swallowing of poison darts) and write my own GUI system.

I've done one before. It didn't work very well, the code was a hideous mess and on some computers it slowed to a crawl. But none of that bothers me this time. First, things are object oriented now - this is good for GUI systems. Secondly, I've picked up a few tricks which I'm interested in trying out along the way.

And thirdly, fuck it. Every time I try a third party solution, it causes me as much hassle as it would be to write my own. There's nothing essentially wrong with these off the shelf GUI engines. For what they're designed to do, they do very well indeed - and they've been excellent to learn from. It's just that what I want to do, and the way I'd like to do it, is not really compatible. I wanted to build a system that would surround a GUI, providing me all the gadgets I need but without the headache inducing method of creating each and every screen through mind-numbing statements littered throughout the code. It needs to be skinnable - incredibly so. It's not enough to change colours, I want a modder to be able to redesign every screen in the game.

The last GUI I've been using was pretty good and I had a working system, but the fourth problem reared its head. Lack of transparency. Things were happening using this GUI that I didn't understand, and they were eating my frame rate - before I'd even so much as started processing any of the game stuff. At this point, that's the last thing I need. I need control, and I'm going to get it.

And the fifth thing? Well, that's the whole reason I started coding in the first place when I was about 10 years old. It's fun. It's fun to achieve things, it's fun to hack things, it's fun to just throw stuff at your computer and learn from the results. Back then I got a buzz from properly generating a random number and recreating Grandstand's Saturday afternoon vidiprinter. Over the last few months I've lost that buzz, and it's making me lose a lot more.

I'm going to have fun again. There will be a game at the end of all this. But if it was just a game I wanted, I'd be playing Football Manager.

Monday, October 09, 2006

Bars and Madrid

Despite the fact that I seem to never update anyway, I thought it wouldn't be a bad idea to let you six (or however many visit these days) know that there'll be no work done over the next four days, because some people who should really know better are sending me off to another country for reasons best known to themselves.

Still, I've almost completed an xml wrapper for the GUI system, and it's working well. It needs a good method of accessing the individual gadgets, and some way of getting the scrollbars to actually do something other than move up and down in a mesmerising but ultimately useless way. I'd kinda like certain things to scroll.

Oh, and properly skinned. I don't really want my game to look like Windows XP. Nobody does.

Tuesday, October 03, 2006

To simplify, treat middleware as your intestinal tract...

Owing to those recent problems that were doing my head in, I've spent the weekend doing my best (my lovely, lazy best) to come up with a viable solution.

Tonight I re-read a reply on the BlitzMax forums regarding the frame rate troubles I've been happen. At first, I had dismissed it as technical details that I wasn't willing to get into, especially when I simply don't have enough knowledge of how BlitzMax is actually working to dare get stuck into its guts and start changing variables.

Nevertheless, at a loss for a solution, I decided to give it a go.

The result was better than I could honestly have hoped.

Remember how the problem was this unwanted delay whilst trying to find out if a key or mouse button is being pressed? Well, tracing the path through the code from that simple KeyDown() function led me into the entrails that make up BlitzMax's innards, where I found the function PollSystem.

The offending function PollSystem.

What does it do? Well, allow me to put my whole heart into this biological analogy I've got going here.

Eating food is pretty simple, yeah? You chew, swallow, and it goes into your stomach, where your body does the rest. Your conscious job, unless you've just had a dodgy chip from the local eatery and are thus doomed to spend the next four hours renacting scenes from Platoon on the ceramic, is over.

Imagine, though, if that wasn't it. Imagine that every time your stomach wanted to do something with that disgustingly fatty yet absolutely deliciously greasy burger, it sent it back to your mouth. Asked you to chew again. And again. And again. Heck, never mind the burger, eating a fucking chip would take forever.

That is how PollSystem works. Or at least that's how it works to my admittedly incomplete knowledge. Every time I ask BlitzMax "is L being pressed?", it goes off and tries to read every single key again. This is just how it works.

On Windows, this is very, very fast. Negligible, in fact, unless you really wanted to make the absolute most of your time. We're talking... (I need a calculator for this) ..... one twenty-five-millionth. Is that a real number? 0.00000004 seconds. It's fucking fast.

On OS X, it's slower. I don't know if it's a bug with BlitzMax, a "quirk" (read fucking stupid flaw) of OS X, or anything, but it's one forty-thousandth in silly named numbers, or 0.0002496 if you want accuracy. That's 624 times slower.

So, what did I do? Well, I made BlitzMax chew its damn food before swallowing, that's what I did. By tweaking a single line, I stop it from calling PollSystem every time I check a key. The proviso is that I must do it myself, once per frame, to ensure that everything works. The result? OS X runs very fast indeed. My test came back telling me it ran six times faster than an untweaked Windows, but that's not a fair comparison for various technical reasons.

The thing eating away at the back of my mind, unfortunately, is that I'm no expert on BlitzMax and I'm not sure what the repercussions are of my tweaking. It does seem strange that the system would automatically be slower than is theoretically possible - however BlitzMax, being middleware, has been built with ease of use in mind every bit as much as power.

I'm hoping that this was simply a feature to keep the system more user friendly for new users. Hopefully someone in the know will clue me in. I'm feeling kind of lucky though, after seeing Watford throw away a 2-0 lead, but still steal an equaliser in the dying minutes to seal a 3-3 draw and win me £50.

Thursday, September 28, 2006

Ok, it's been two weeks. What's happened?

Well, the laptop's breathing again but it's not too reliable for doing any work on, so I've gone ahead and got that Mac. And now that's where my current focus lies. See, the system I'm using to create the game, BlitzMax, allows you to compile the same code on a Mac, a PC and on Linux with minimal changes.

In theory.

Unfortunately, things haven't gone smoothly. For a start, my editor won't work at all on the Mac thanks to a painfully slow implementation of listboxes, so any further work on that will have to stick to the PC for the time being.

Elsewhere, the GUI system I've planned on using has been throwing up dodgy frame rates on the Mac as well, the bottleneck being reading from the keyboard. While I can get by fine knowing that my editor will only work on Windows, the game must run as smoothly as possible on every platform.

I got a Mac because if I can release games for both platforms, I'll theoretically improve sales. I'd only need to sell 80 or so Mac copies to have it pay for itself. So it's very important that I get everything running smoothly.

Thankfully, it's entirely possible to code without having to test every 5 minutes. The Mac's in the spare room, a quiet haven where I can work without being distracted. As a result I can still churn out code and then give it a few tests on the PC just to make it perfect.

Also, seeing as I need to learn more about Macs and all that, I'm going to have to write a little something extra, specially for OS X. I'll worry about a PC version when its finished.

Thursday, September 14, 2006

It's dead

Or as good as.

Not the game. My laptop. The hard drive is effectively fucked, quite possibly thanks to the overheating I had earlier. A new hard drive would cost about £50 but for a four year old laptop that's having more problems than I am (and that's a lot of problems), I'm not convinced it's a good idea to keep hacking at it.

Instead, I'm going to buy myself a Mac. Plenty of advantages to be had with that.

What it does mean is that I can't get much work done over the next few days, though weekends are still pretty clear. I'll use this time to finish some of those games other people made.

Sunday, September 10, 2006

It nearly happened again

Damn right it nearly did. I had just sat down to work on how seeding systems are set up in the database, when I started to lose confidence in how I had previously done it and was all set to rework that.

Fuck it. Rework it? Nah. I took an hour or two out and came to the conclusion that it does the job and is very simple, so I'll keep it like that. If I want to rework it at any point, I'll wait until I actually have a game and can then fritter away time on such unproductive tasks.

Elsewhere, with the spare room in the flat having been tidied up in the last week, I've decided to get myself a desk and stop working in the living room so much, distracted by the internet, the telly, the fridge full of food and so on. I'll try to instill a proper work ethic rather than the current slapdash approach. Anything to make progress.

Tuesday, September 05, 2006

An African or a European Vole?

I'm well aware that it's been a week and a half, and there's a very good explanation around here somewhere. I'm going to need three parakeets and a small African vole to find them though.

Are there any voles in Africa?

Anyway, I'm really pissed off these days because I'm still stuck on the editor, which of course I had already finished. But the end is in sight, I guess.

In the meantime I've been biding my time with games of Football Manager 2006, and actually enjoying it again. Makes a change.

Friday, August 25, 2006

Tony's Mate's a Nonce

I'm having a bit of a block at the moment. I've had a cold all week which hasn't helped matters, and when I sit in front of the computer I can't do any fucking work. It's rather irritating.

Still, I did get all the nations entered. The final count is 274, which is rather large. 207 FIFA nations, and then a bunch of oddballs. Should be fun managing the likes of Catalonia.

Saturday, August 19, 2006

It Begins

Saturday. The greatest day of the week. The lie in, the free time and thankfully now the football yet again. Sure, the English season has already kicked off for all those Football League clubs, and even the local clubs here have started their League Cup (Newry won, whooo!). But today marks the return of the full six hour Soccer Saturday, and start of AFC Telford United's league season. And Match of the Day, of course.

It's marvellous, really. So I'm off to enjoy it. And maybe do some work too.

Tuesday, August 15, 2006

FA Cup Is Here Again!

Ah, competitions. Let's hope they all work.

With a bank holiday weekend coming up in a little over ten days, I'm going to work hard to make sure that I can get the data editor working regarding competitions. Already I'm able to create the damn things and tweak various simple values - the number of entrants, when the competition should be reset, that sort of thing.

The actual structure of each competition is like playing with Lego, except without the cool ability to make a large sword and smash it over your friend's skull, showering both of you in sharp plastic blocks. Lego is ace.

Getting a basic competition built is simple, and after that I've to redo all that horribly complex qualification stuff that bled my mind dry earlier in the year. If I can get it all done for that Friday though, I've got a "fun" saturday coming up.

In that one day, I plan to go from having a bunch of raw data to having working competition structures. One day, a huge boost.

But not this Saturday. This Saturday, the season kicks off for those teams at the top, and loads of teams at the very bottom. While the likes of Chelsea and Liverpool battle it out for early leadership of the Premiership, exotic sounding sides like Deeping Rangers and Ramsbottom United will try to make it through the Extra Preliminary Round of the FA Cup.

My tip to go the furthest, based on nothing more than the name of the club alone? The mighty Diss Town, away at Tring Athletic. If the former isn't an entire team full of Ali G lookalikes, I may retract the tip.

Saturday, August 12, 2006

Related Clubs

In football, clubs aren't standalone entities. In addition to many clubs having close ties with companies (such as Philips Sport Vereniging, better known as PSV Eindhoven, or lowly Airbus UK in the League of Wales), there are plenty of clubs that have links with other clubs. Manchester United, as many know, have a relationship with Royal Antwerp, while elsewhere both the Metrostars and Austria Salzburg have been purchased by Red Bull, controversially changing team colours and renaming the sides to Red Bull New York and Red Bull Salzburg respectively.

So what do those relationships mean? Well, Antwerp's case is clear - United regularly send out youngsters on loan to aid their development. For the Red Bull sides, things have yet to fully materialise. It is possible that players could move between the sides, and with a common ownership I wouldn't be too surprised to see that their financial status mirror each other. Regardless, it's a tricky situation.

This becomes pertinent when regarding the game. No simulation of world football would be complete without organising relationships between the clubs, and while each individual case is often complex, there are general factors that I can use.

The first relationships I have in the game are the obvious. Rivalries exist between clubs, of differing strengths and reasons, be they sporting, political or simply based on location alone (a number of rivalries encompass all three, of course). Clubs can be Successors, in that they were formed out of an existing or collapsing club. FC United and AFC Wimbledon are two famous "successor" clubs formed by fans who feel the original side have mistreated them for too long. AFC Telford United or 1.FC Lokomotiv Leipzig are sides borne out of the ashes of clubs who have fallen under financial strain. In these situations there is often great debate as regards the ownership of the history of the original club - AFC Wimbledon and Milton Keynes Dons both claim the history of the old Wimbledon. Personally, I side with AFC Wimbledon (with a little foot in the "Wimbledon are dead and there are two new clubs" camp) but if the game's to be encyclopaedic, I need to find an official answer.

And of course, there are mergers. These "successor" clubs are formed out of a merger of existing clubs, or perhaps just absorbing a single club into the existing powerhouse. Kinda like Loco Roco. Rushden & Diamonds are a merger club, formed from the non-league sides Rushden Town and Irthlingborough Diamonds.

The game will not feature any mergers, splits or new clubs itself during the course of play. The technicalities of such features are pretty simple, but club names are hugely complex around the world. What applies in England will not stand in Germany, and is utterly useless in Brazil.

You can, however, form your own clubs in the game, at any point (provided you have the cash).

Feeder Clubs will be in the game, in a greatly simplified format at first. As described above, a feeder club link will allow for the parent side to send their players out on loan to the feeder, adhering to all the transfer rules of the governing bodies involved. The parent side can also have first option on any player in the feeder club. As the intricacies of feeder clubs become more apparent, I'll be expanding on the situation, but a basic implementation is a must. Feeder sides such as Real Madrid Castilla, which are essentially part of the whole Real Madrid club, will be implemented as second or third sides of the main side.

And lastly, clubs can be linked Financially, enabling potential situations like the Red Bull Empire.

And remember from Star Wars - empires are the bad guys.

Thursday, August 10, 2006

Outside the mainstream

Derry City just beat Gretna 5-1, away from home. A lot of people are very happy in Ireland right now. A fair few people in Scotland are probably in shock. And some people in Northern Ireland are a little scared because if Irish league clubs continue to improve, the Northerners are screwed in the Setanta Cup.

Elsewhere, Drogheda United, also of the League of Ireland, slipped to a narrow defeat at Norwegian side IK Start, whilst Welsh side Llanelli were defeated by the same scoreline by Odense BK of Denmark.

Now, this blog isn't a football news website so why am I telling you this? Well, it's because the only game that was actually available to watch on the television tonight was Newcastle United's dour affair with Lithuanian side Ventspils.

TV hates the little guys. The media just don't care. And as a result the average football fan in England's streets remains eternally blinkered about anything that's ever occurred outside the scope of the Premiership or Champions League. When unfashionable clubs finally do get on the box, they're constantly patronised to great lengths by commentators who put in a half arsed research attempt. When Liverpool faced Total Network Solutions in the Champions League first qualifying round - for many people the first time they even knew there was more than one - the folk in the studio just about managed to get the name of the club right. When a part time non-league side faces Premiership opposition, it doesn't matter how much the lowly representatives eulogise about their club's strengths and the appeal of the non-league game. All the papers want to know about is which one's the plumber.

It's about ratings, it's about drawing in the viewers for advertising revenue, and in that respect you can forgive the likes of ITV and five for not going to great lengths to snatch at the opportunity to cover Gretna's charge through Europe (that the game was picked up by Irish channel Setanta Sports is only some consolation, as I don't have it). The BBC, unhindered by commercial restrictions, could well have picked up Llanelli's game against Odense - an away game, it's not exactly going to stop the hordes from flocking to the stadium to catch the action. The travellers will always go.

So what about the game? Well, it's an area I want to pay attention to. Not only do I want to give plenty of exposure to the teams people rarely hear about, I want to bring forth the full experience. Playing a football game, as I've said in the past, can often be a sterile affair. Games rarely seem to note the difference in quality between the competing sides, so when I score a late equaliser with Yeovil against Liverpool in FIFA 2005, I get the same celebration as if the roles were reversed.

There's a lack of emotion. Derry City right now are over the moon. It's their third European win on the trot (the other two coming in the first qualifying round against IFK Goteborg, no mean feat) and only their fourth ever. The travelling fans were ecstatic throughout the second half, there's a party atmosphere throughout.

A game needs this. Football such as this is all about the passion. If it's missing, you've missed the point.

Wednesday, August 09, 2006

Overheating Fun

Being a geek, I have two computers at home, a laptop and a desktop. This gives me the ability to work regardless of what my girlfriend wants to do - and as she quite likes Rollercoaster Tycoon 3 at the moment (which she's happily modding and displaying a much greater understanding of 3D modelling than I ever have, though she still refuses to accept a geek label), I'm stuck with the laptop.

Pesky integrated graphics.

The laptop is four years old. It's still quite powerful as far as laptops go, although the memory is a bit of a bottleneck, and as such I can happily make my game on it. Or at least, I used to. For now, my damn laptop overheats far too much and shuts off. A laptop cooler is sitting in the local post office. I have to go out of my way at lunch tomorrow to pick it up. It had better bloody work.

It's irritating because it means I can't work using the laptop without fear of either breaking it or losing my work. And the fecking thing proved far too difficult to open for my puny little hands. That'll have to be fixed.

Still, in other news the editor is mostly working now, and I'm going to spend plenty of time over the next month getting competitions in order. Quite looking forward to that, as it's becoming very boring stuff recently which has led to posts telling you to all bugger off, and overheating laptops.

Saturday, August 05, 2006


As ever, I've got nothing to report on the basis that it's all incredibly boring stuff. Things get fixed, things get broken, things get changed, dropped, and poo-pooed on.

So there really isn't much to say these weeks, which is perhaps a bad thing. Maybe I could be like other bloggers and start reviewing other games for the hell of it, except that I don't have the inclination to go cramming shite into my schedule, what with shit games being infinitely more fun to read about.

So essentially you'll probably have to wait until I'm doing something more interesting before the blog actually becomes worth your time.

Monday, July 31, 2006

Morose what now?

Ok. Been a bit long. I blame.... cabbage.

I've been doing plenty of work on the data editor, and now it's almost refurbished. Well, it looks identical to the old one but uses the new database code, and as such it's infinitely better and using it is like breathing a whole new type of air, with 55% less fart.

I've also fixed a fairly major bug in the database code, so that's equally excellent.

But apart from that lot, I'm getting a bit annoyed that I'm retreading old ground. I expected this to happen, of course, and I'm still not doing too badly with regards to my targets. However, it does sap the energy to spend each night in front of the computer doing repetitive tasks.

So in addition, I'll also fiddle about a bit with random graphical jiggery-pokery (the best kind of pokery) to keep that little spark alive that says "have a bit of fun, you morose fuck!"

Although if it's going to be rude...

Sunday, July 23, 2006

Wahey for Backups

So, there I was, about 90% of the way towards changing the way the system stores the group sizes. I had updated the database structure and found that I made a wonderful saving of 8MB.

Then it hit me - the major memory hits come from any tables that have a lot of records. The biggest table is the People table - 575,000 records. The next biggest weighs in at a mere 16,000, which is section data (each competition being split up into sections, such as a group phase or knockout stage).

Other than the People table, I wasn't losing much memory. And although on an individual basis the speed hit wasn't that big, there's no point in sacrificing speed for 8MB of RAM. Speed lets me do more.

So the backup was useful, to stop me having to spend time changing everything back. I've got to do that more often.

In other areas, I started playing Brothers in Arms: Earned in Blood. The series is easily the best WWII shooter out there. It's atmospheric, looks great, and best of all doesn't treat your character as John Matrix. Invincible supermen don't work for me in a historic setting, so to see myself get ripped apart when in the open is joyous indeed.

Or not, as I'd rather kill them.

The sequel looks ace.

Wednesday, July 19, 2006

Insight into My World

I can use the database code to solve a problem with the database code. Now that's just genius on a par with folk like the guy who invented marmalade, and stuff.

Actually, I hate marmalade. Tangy bunch of crap.

See, my problem is that I'm often forced into using too much memory to store small numbers. I wrote the database code as a means of allowing me to store small numbers in just the right amount of memory. So what I've decided to do is have the system automatically create fields for every "group" in a table, telling you how many entries are in that group.

I had held off this idea in the past because I thought it would be too slow. That's a load of poo, it's perfect. The player table alone shaves nearly 10MB from the file size. Ten arse megabytes that weren't being used at all.

In other news, I purchased a copy of Kudos, obviously on the basis that my own life's down the pan so I may as well lead an alternate one. That went well. Within a year I had lost all my friends, been robbed three times and learned the ancient art of Kung Fu in retaliation. One of the chaps that burgled my home decided that instead of taking the cable telly, he'd swipe my self help book. Such a blow to my confidence, but at least I could still watch the Comedy Channel. Alone.

Hey, it beats staring at the walls with the lights off.

That's an option in the game, by the way. Where I live, I have no walls.

It's getting big

I've slowly been building the database structure. It's all much easier now, as I had hoped. However, it's a little shocking to find the entire database weighs in at 100MB at the moment and has the potential to grow further.

I'm not entirely pleased with that, so I need to get it down. I know where the problem is, and it's best illustrated with a lovely example. The game has room for five World Organisations, such as FIFA or the Island Games Association. You know them well, of course. Now, each organisation has a list of affiliate nations, and it takes two bytes to store how many are in this list.

Which is a tad ridiculous and ought to be avoided if possible. I'd use one byte, except certain lists of this kind use up more than that. Now, if I could get it so that the game used the appropriate storage, I'd save an awful lot of memory.

Six organisations aren't using much. But consider that the same applies to a player's history, and there are 570,000 people in the game. That's over one megabyte, and I'm using two bytes to store a number between 0 and 20. That's just not right. And there are about 15 such lists for each person. 7.5MB at least is just wasted space.

As it is, these values are using up 40% of the total size. Arse.

Of course, if you're running a good computer this is never an issue. And the database has been designed to hold more data than is really necessary so the size will get reduced over time. Yet even so...

Sunday, July 16, 2006


I sat down yesterday to start creating the database structure (a delightfully easy task now). I perched my laptop on my lap, which no doubt made the guy who invented it let out a sigh of satisfaction at another accomplishment, and got to work. A few tables later, black.

The screen went black. The laptop had shut off. It had overheated.

No worries, I thought. This has been known to happen - the fan's a bit clogged with dirt and dust and so if the laptop isn't on a cool surface, it'll overheat. I sat the machine on the little table in front of me and got back to work. A while later, black.

In fury, I leapt up and unleashed a stream of urine towards the toilet. I must point out that I actually went into the bathroom first, as I'm not blessed with such fantastic aim. I let my anger subside, picked up my small plastic guitar and thrashed out a few Guitar Hero tracks, failing miserably at No One Knows and Crossroads yet again. I had decided to let the laptop cool and also let any capacitors (which there probably is inside these things) discharge properly.

Then I would open it up, clean the fan, and everything would be good. Alas, I couldn't open the fucker. Every screw known to man was removed but the thing wouldn't open. Instead, I fixed a room fan and set it beside the machine. Success! The fan's cold air kept the laptop cool, and I worked away. As the day turned into night and other cliches, I turned the fan down a little to keep myself from freezing, and continued working.


Oh for fuck sake. Four times in one day is not fucking good. I unleashed my fury upon Crossroads but once again failed miserably at Queens of the Stone Age's efforts.

If this laptop's buggered I'll be most upset.

Sunday, July 09, 2006

Swift? Ha ha!

In my last post, I mentioned the links system and how it would swiftly clean things up to avoid horrible crashes.

Swift is not the word. Slow is.

Actually, it's reasonably quick but it can't be used in the game at all because it all adds up - delete one player and it might take a second to ensure all traces are removed. Delete the 20,000 people who might retire at the end of the season and I suspect that nobody's going to be happy waiting for five and a half hours while the game makes sure everything's ok.

Instead of automating it, it'll have to be cleaned up in code. It's not a major problem - it had to be done anyhow in places - and still doesn't necessitate too many code changes if I rearrange the tables. I've still got some headaches related to the whole speed thing but not as much as before.

And of course, I don't have to worry about the imminent destruction of the universe.

Friday, July 07, 2006

A whoo-hoo. Yes.

The database has been recoded. And works great, it's clean, and it'll be much easier to use. I've still got to tackle the rather large and annoying problem that is rewriting the data editor in order to use the new code, but it won't take as long as it did to write it in the first place.

At the moment, I'm still adding a system of relationship links to the database. Essentially, these will allow you to link the field of one record to another table or group, the purpose of this being to get the database code to automatically clean things up when you make a big stink. For example, if I delete a player from the database, it will swiftly search through all the teams in the game to make sure that the player is removed from his club, through all the competitions to tell his disciplinary record to sod off and so on, thus avoiding horrible crashes that might have plagued the original system.

It's a wonderful theory, but it also threatens to undo the very universe with its irritating recursiveness. Remove a player and you remove his entry in a club. Remove that... and you might end up deleting something else, like an existing loan arrangement. Delete that, and it might go and mess up something else, which will screw up the upstairs landing and result in a cacophony of squirrels attempting to assault a banjo with creme de menthe. I've confused you, I know, but that's basically how I'm suffering just trying to sort out this ridiculous yet entirely necessary system.

It could, in theory, end up trying to delete the very thing you've deleted in the first place, setting off the entire chain reaction. If that's a record, that's no problem - the system doesn't shift records around when you delete one, so deleting record two won't move record three down. However it does shift entries in a dynamic group. If I remove Player 13 from a club, Player 14 will shift down to save memory. I don't particular want to delete that and end up destroying the universe, particularly as I've yet to visit some nice places in that universe.

It'll be done tomorrow if I don't gibber.

Friday, June 30, 2006

Retreading old ground

I've made the decision to go back and redo the database code. Since writing it in the first place I've got, well, a little better at coding. At the moment, the main problem is that in order to access, say, the date of birth of a player, I've got to read in all of that player's data into a Player type, and then have a gander at his birthday.

Hey, it made sense at the time - by reading and writing whole records, I saved myself a few headaches. But it came at a price - every time I wanted to change the database I had to make numerous changes to the game's code as well, and over the last week it all came to a head when I realised I was putting off work on the next issue because it involved this utterly soul destroying task.

I had had enough. I decided that I needed a way of telling the database system that I just want to look at the "Year Founded" field in "Club" without also getting the youth coach's weekly wage. It does mean a few extra problems need solved but I'm up to that task now. The new system when implemented ought to save me plenty of time, and it also keeps the game easily expandable.

The larger problem with this decision is that the Data Editor pretty much needs rewritten as it is based almost entirely on the old database code. Arse. But it can't be helped, it's going to have to be done.

Keeping this database clean is useful because it means I can create the basic game and then spend most of my time adding leagues and making improvements, rather than fighting with hideous code and ending up churning out crap.

Nobody wants crap.

Not even flies. But flies can't be choosers. Or I shall kill them.

Tuesday, June 27, 2006

It's big...

So I've been doing what I said I would - splitting the code into far more manageable chunks spread across many files. I'm not quite finished yet. Initially there were about 10 files at most, covering the data editor, the competition engine, the game database and so forth. All of them pretty large to the point where they got difficult to manage.

I'm not quite done yet but currently the total stands at 109 files, each one typically containing a single function and a few of the files have more, smaller functions that splitting seems a bit silly.

It's a ridiculously big game that doesn't even have some very important bits. Tsk.

That's my excuse for all this time. It's fucking huge. Live with it.

Saturday, June 24, 2006

Late night problems go away

Frame rate problem solved. Not that there ever was a problem.

Turns out, the IGlass frame rate function was returning the actual frame rate - i.e. how often the screen was being refreshed every second. Whereas I wanted to know how often the screen is capable of being updated every second. End result is that it's actually been running ten times faster than I thought it was, which means there's plenty of time for processing between frames.

Part of the plan for the game is to have it multitask, of sorts. So when you're playing, the game should be working in the background. After all, clicking on an interface is not a particularly intensive piece of work so there's no point forcing the player to wait at the end of every day while petty tasks are carried out.

I plan to implement this multitasking by having the game work out when it should refresh the GUI. It's easy to work out how long it takes to render a single screen. Say it takes 5 milliseconds on a bad day. That still leaves about 15 ms of time if you want the game to run at 50 frames per second, so the little background worker guy can just keep checking his watch to see when he should be showing you an update, or when he can do another quick job. Even if he's getting one job done every frame, that's still 50 every second. Those will add up.

It'll get complex when it comes to larger jobs such as calculating an entire match. I'm aiming for a single match to take about an eighth of a second, based on Football Manager's time of 1 second for an exceedingly complex ninety minute match compared to my game's 8 minute fixture. If I could get it in that time on the same computer, I'd be very happy indeed. But that means a single job would take much longer than one frame, so I'd have to be able to chop it up into little pieces.

Ah, design problems. Much more fun than making an editor anyway.

Thursday, June 22, 2006

I haven't done any work since I've come home. Whilst reading Masters of Doom I decided I really needed to create some sort of work area for myself - for the most part the game coding has been done in the living room. This isn't too bad and has yielded plenty of progress, but it's all to easy to get interrupted by marauding girlfriends and televisions.

So I've to clean up the spare room a bit better. Pity it's tiny and has little room for a desk, but I've got some rather sturdy shelving which will probably be fine to sit the laptop on. It's peaceful, that's a good thing. And I might want to move that laundry basket, but then I luckily can't smell.

Elsewhere, I've got to tidy things up a bit. The living room is a bit shambolic anyway because I bought a 14" telly to sit beside the computer whilst the World Cup is on, so right across from me there's a row of crazy electronic shit of varying ages. I can't work in mess very well, so that has to be sorted.

Speaking of mess, my code is a mess. It's not terribly structured (in my opinion) but it's nowhere near perfect. The problem is many of the files are getting rather large and need splitting up into more manageable chunks, so that's my target for the meantime. That, and see what I can do to sort out the rather jarring problem with the laptop (a 2.2GHz machine that's well above the target spec) running the existing code about 20% of the speed of the PC (an Athlon 3500). That can't be good. Not when it ends up rendering the screen at 60fps before I have it do anything complex. Considering my target spec is probably around the 1GHz range, I have to let out the occasional primal yell.

Hence the need for sanctuary.

Wednesday, June 21, 2006

Return to the blog

I haven't posted because I haven't done any work. I haven't done any work because I haven't been in the country, and because the country I was in was far too hot to do any work. Also, there was a small matter of football.

I did get to see Australia lose to Brazil in a rather indifferent game, but the atmosphere was amazing. I was Jakob Moertl for the day, whoever he is. Good old Jakob.

In other places, I did exciting things like climb an alp, or... no, that's it.

I also read Masters of Doom, by David Kushner. The story of id software, particularly focussing on John's Carmack and Romero, it's inspiring stuff for a guy like me. I even have long hair! Future Rich Person in the making, methinks. Now, if only I had their talent. Oh, and their Ferraris. No, there's plenty in that book that made me want to rush off and get coding long into the night.

There's also this quote from John Carmack I picked up earlier today:

The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.

He speaks a lot of sense. There's a place for patents but it is not in software. By all means make money from your creation but don't try to kid yourself. That pathway was forged with the architecture you're working on - you're just the first to walk down the road. Hilary doesn't claim rent on Everest.

Friday, June 09, 2006


World Cup time again! Happy days!

Although Ireland didn't qualify, thanks in the main to Israel's ability at coming back from defeat, I'll still be enjoying it. And I'm not just saying that because it's about 95% certain I'll be at one of the games.

No, it's a football fest. The good kind of fest.

A month of fun. Can't beat it. Although people organising weddings during the thing need a stern talking to.

Tuesday, June 06, 2006


That's what I did today. Or yesterday if you want to get technical. Monday. I did nothing. Well, I went to work (and did nothing there), and when I came home I was in no mood to do work of an interesting variety. So I had a long overdue day off.

A day off where I completed Simpsons Hit & Run (not a bad game), and then beat the Water Temple in Ocarina of Time. Well done me.

I did have a moment of clarity during the day regarding the best way to deal with all the data that a competition is going to require to get running (you know, storing all the results and league tables), which is a bonus. And last night whilst lying in bed in a frustrated heap (the Sunday Demon struck, you see) I had a nice little breakthrough with regards to those item templates that nagged me during the weekend.

It's good to get away from it all for a day. I'll come back tomorrow refreshed and eager and should hopefully make decent progress. By next Monday I'd like to have competitions basically working - that is to say that any one competition will work perfectly fine regardless of its structure, but all the fancy stuff like qualification will have to wait until a week later or so. If the football doesn't intefere. Pesky real world.

Sunday, June 04, 2006


So, we all have a new nation. Now, I'm sure that's wonderful for 55% of the Montengrins, but I'm not here to discuss politics and stuff. Football is at hand! With a new nation invariably comes a new national side, a new FA and new widdly things to worry about. I've structured the game so all that's fairly easy to enter, but when will it all occur?

We'll no doubt see Serbia & Montenegro at the World Cup as a unified team, and I wouldn't be surprised to see the two nations compete as one in the European Championship qualifiers, for which the fixtures have all been decided amongst the usual quarrelling. Assuming the game is actually finally released by that point then there might just be a problem. We'd see Serbia and Montenegro compete as separate nations at a future date.

That's not easy. I could hard code it but I'm loathe to do that, it's ugly and doesn't help for any future developments. So I'd like to do it in the editor. Some way of unifying two nations as one team for a period of time seems to be the answer, and also seems to be a lot of work.

Pesky politics. Think of the hardworking game developers!

Saturday, June 03, 2006

Revelation #239

I'm shit at graphic design. Really fucking shit.

Modern PCs give you massive resolutions and 32-bit colour. That's far too much for a guy like me to deal with. I used to be ace at creating interface mockups on my Amstrad CPC, with its 400x250, 2-bit colour screen. Four whole colours! Man, I had a screen with black, red, a darker red and white. It looked ace.

And that's it there in those little pictures, that I just took with a crappy camera. It suited the machine perfectly, it was nice, and I never got further than this. It would clearly have been the best game ever. Alas, it wasn't to be because it was 1999 and I finally got myself a PC, and thus all the requirments got expanded into areas that I alone can't possibly meet.

Which is why I'm quite grateful for my XML GUI system. Without that, I'd be stuck right now having to design (or get someone to design) an interface before I could proceed with the guts of the system. That'd be frustrating, and I wouldn't be able to make any changes later without a heck of a lot of work.

But right now, my interface looks like someone's crapped it out after eating fifteen curries laced with laxative, yet it's not holding me back in the slightest. Yes!

Wednesday, May 31, 2006

Damn you, Ecuador!!

One of the things I love, being a bit of a football stats freak, is how the world is full of completely different leagues. Growing up surrounded by coverage of the English and Scottish leagues, it would be very easy for me to have fallen into the trap of believing everyone out there uses the same system. Play each other twice, count up the points, go on holiday for a bit in the rain. Lovely.

No, it's all different, and I've gone into it before. I've looked around the world and thought I'd pretty much got it sussed. Leagues with playoff systems to determine the winner, leagues split into lots of little groups, leagues that split in two (the SPL obviously being a recent example). These weird and wonderfully different competitions became a driving force in making this game. I could easily have taken the easy way out and copied England for everything, changing the number of teams and not much else. Certainly I'd have had far fewer headaches. Maybe even something playable right now. But no. That's not fair. After all, what's the point in having the Filipino Open Championship if it's just the same as playing at home?

So I grabbed all these leagues, totalled them all up and devised a competition and league engine that could simulate them all, and all the other tournaments in existence. Then I found out about Ecuador.

On the surface, the Ecuadoran league looks like any other league in South America. It's played in two distinct halves, the Apertura and Clausura, thus creating two champions each year. Unlike a lot of leagues, it actually relegates and promotes clubs at the end of the Apertura, effectively making each "season" about four or five months in length and getting two in each calendar year, and the teams in the Serie A Apertura differ from the ones in the Clausura as a result. A bit of a niggle.

This only happens at the top level of the system. In Serie B, teams are only relegated at the end of the Clausura, based on the total points gained over the Apertura and Clausura sections. The former Serie A side playing in the Clausura gets all his Clausura points counting double, as if it wasn't bad enough to try and get the game to collect points from another competition entirely.

As a result, it is entirely possible for an Ecuadoran side to start in Serie A in January, get relegated by May, and by the following January be playing in the Segunda Categoría, Ecuador's third level, proving that if they don't follow the simplistic English league system, at least the world's leagues like to give their competitions completely misleading names.

Just when I thought I was finished tweaking those damn league systems.

Monday, May 29, 2006

That'll be quick

Excellent! I've nearly completed the GUI management code. It takes a bunch of xml files from a "skin" folder and uses that data to construct every screen in the game. As a result, it's exceedingly easy to develop the interface and it should hopefully provide the capability for any community (man, I should be so lucky) to create new looks for the game.

On the downside, it's currently very easy to "break" it. A misplaced tag here or an attribute there in an xml file and an entire screen could disappear. While this isn't a problem for me when developing it, I can't have that in any final release and expect new skins to appear. It's got to be pretty fool proof. Perhaps the most important thing is keeping a well defined structure to the screens - always having certain elements in certain places is a start.

A title bar, for example, appears in virtually every screen so I have that down as a single panel (a screen being made up of panels). If I move that panel, it'll move the title bar on every single screen, but obviously moving it can result in parts of other screens being obscured unless they know to take advantage of that.

I'll see about adding some extra types of gadget so I can define areas of the screen. Though I don't want to spend too much time on this right now, as it's not an essential. It's easy to come back to it as well, as it's pretty much independent of the game itself. Provided the GUI manager tells the game what buttons are being clicked, and the game can tell the GUI what to do, what happens under the hood doesn't matter.

Tuesday, May 23, 2006

A time saver. Huzzaj!

Yes, Huzzaj. I spell it how I want!

After undertaking a little research, I took the plunge with a pre-built GUI engine in the shape of IGlass.
It's largely excellent, very customisable. I did have to make a few tweaks to add features that I'd prefer in my game, but none of this was a problem. Huge thumbs up and thanks to Mr Agnisola for this.

As a result, progress has been swifter and there are far less headaches. Had I not purchased it (just last Friday) I'd no doubt still be working on silly stuff. The reason I've chosen to code in BlitzMax over something like C++ is because it gives you a hefty library of code to do routine things - drawing images, memory management etc. It therefore makes a lot of sense to carry the same reasoning over to other aspects.

So as a result, TCFG should have a nice snazzy front end. Now I've got to create that GUI management system I once mentioned, thus making it far easier to create new screens and thus be able to throw a game together a heck of a lot quicker. Seeing tangible results will make it all worthwhile.

Saturday, May 20, 2006

Emotions in Football

One of the good things about writing a football game is that it's a hell of a lot easier to justify purchasing related games, books etc. to your other half. And more importantly, to yourself. All under the guise of "research".

The most recent such purchase was FIFA World Cup 2006. I started my qualifying campaign as the mighty St. Kitt's and Nevis, and found myself doing surprisingly well. In my penultimate game, two points short of guaranteed qualification, I barged my way into the box and stuck the ball past a flailing keeper only to hear Clive Tyldesley positively ejaculate with glee. "That could be the goal!" he screamed. The crowd erupted.

I was astounded. For years, I'd been used to football games that treat each matchday as being played in a vacuum, with the outside world being of little interest until the final whistle. "They've qualified!", the commentator envariably yells in shock despite the team leading 5-0 for the last half hour.

In the end, FIFA let me down a little as the initial raptures subsided and the crowd settled down again. And the goalscorer in question didn't do much different to when he scored in any other game, including a meaningless victory against St. Vincent and the Grenadines. Which instantly sucked me out again.

The way I see it, emotions play a massive part in football's atmosphere. Every goal is unique, not just in the buildup but also in the reaction and aftermath. When I took that lead against Trinidad & Tobago, the crowd should have been singing, dancing and yelling for the rest of the match. My goalscorer should have been uncontrollably excited. Everyone including the keeper should have mobbed him immediately, not just the three who offered a small token of congratulations. And at the final whistle, it should have all kicked off again.

A little recognition of the wider picture and the appropriate response will go some way towards creating a superb atmosphere. The more a game can do that, the more likely I'll shed the same tear of joy as I did when Jason McAteer smashed the ball past the Dutch in 2001 to send Ireland into the finals. FIFA World Cup came close... but it's just not enough.

Tuesday, May 16, 2006

Token Update

It's been over a week, so it makes sense. What have I been up to?

Well, most of the time was spent working on a little tool that would restructure the database to my liking. So if I'm halfway through entering team data and suddenly find I'm missing a key field, I won't need to start writing code to load a database of one type and save it as another. Instead, this tool loads an entire database, I do my stuff, and it rejigs everything with no loss of data (unless I want to remove data, of course).

The other key aspect of this is that I can start editing with a very generous limit on the size of the database, and then trim it down when everything's finished to make the best use of memory.

That done, I've then been coding in database code for ranking competitions (such as UEFA's club coefficients) and Belts (such as the Unofficial World Championship, which suddenly reminds me that I need to throw in a field for "unofficial" to stop teams celebrating this clearly meaningless award).

I've a few more aspects to clean up on the data editor before I wander off and start coding GUIs, which are infinite fun. I'm looking to create a good, clean system that can take HTML-style files as input, allowing me to knock up a screen or a panel with ease. A system that supports links to move between pages is ideal for a game that will be absolutely flooded with data.

Another necessary feature of the GUI system is the ability to multitask, so that I can get the game to carry on with some hardcore processing whilst you browse the game world and do your thing. Outside of a match, the actual gameplay barely uses the processor at all. It's the under-the-hood workings that take time, so the more efficient the use of the CPU, the better.

And I haven't abandoned the idea of covering everything about the game. I just don't think it's too sensible to go nattering about things that haven't been done yet. Last thing I need is to turn into Peter Molyneux.

I look shit in turtlenecks.

Monday, May 08, 2006

An Overview

When it comes to football games, there really are only two types. You've got "arcade" titles like PES and FIFA, which let you have control over the team and play the matches, and there are management titles like Football Manager and FIFA Manager, sitting you in charge of the team, making signings and generally trying to earn your sheepskin coat.

Come to think of it, why don't managers wear sheepskin any more? Losing a part of history, we are.

Anyway, either system tends to be somewhat flawed. Arcade games lose their way in single player by not offering sufficient challenge or options. The best way to play PES is undoubtedly competitively, and as good as the Master League is can anyone argue that a convoluted points system is better than the tried and tested transfer market of classic management games? Speaking of which, a management game can often descend into a frustrating affair when the team start losing and you can't fix the problem. The games are still enormous fun, but they're not "perfect".

What would be perfect, really, is a merger of the two. And I know I'm not the first person to think of that, or even in the top million. Videogame Hell is full of failed attempts - Onside Soccer, Kick Off World and more. The closest any game has ever come has been Sensible World of Soccer, so it seems only fair that I dissect it, suck its juices and see what sparkles.

SWOS is an arcade game. Its focus is entirely on its superb matchday experience - the actual management options are, in truth, dire. No clubs make transfers other than you, signing players is about money and nothing else, and there's precious little management. It's game after game, and you can improve your squad. That's it. Which is actually why Sensible World of Soccer is so good. Jon Hare and company knew where the faults lay, and they refused to highlight them.

Combination games have failed because it is extremely difficult to marry the two components together whilst keeping the scales balanced. You don't want to result in a situation where a gamer can be successful by being good at the match portion - otherwise the entire management section is worthless. Similarly, you can't place too much emphasis on management and tactical selection without making the match day a frustrating chore. You've got to be in control... while at the same time being up against the odds as a lower league side in the FA Cup. How do you do that?

That's the problem faced with The Complete Football Game, which I assure you is still a working title and not the name of the real thing. A game that not only presents you with some arcade antics, but lets you get down and dirty with plenty of management aspects, including in-depth tactical options, man management, media handling and more besides. Having your players working together on the training field, you'll want to take that into the match and put your plan into action. You can't just show up on the day in real life, and you can't do it in the game.

Like SWOS, there will be an entire world to be a part of, with leagues as famous as La Liga, or as obscure as the Isle of Man Football Combination. You want to be a part of a living, breathing football world full of ecstasy, pain and chaos. You want to embark on a career as a manager, a player or a chairman, each with your own personal goals. The football world is your personal playground.

Each fortnight I'll expand on these various elements, how they should shape up, why they are as they are, and their impact on the overall game.

Or alternatively, as it has panned out, I won't.

But I can pee all by myself, so it kinda works out well in the end.

Thursday, May 04, 2006

What is it, anyway?

What a great question.

I've just spent about five or ten minutes reading through the blog history, looking for some inspiration to try and spur me on to do a little more work tonight instead of finally flopping out on the couch. Now, I'm fully aware that procrastinating for five minutes in order to do more work is a pretty stupid thing, and that's why I'm not going to do any more work tonight.

However, I was quite startled. I started this blog in January. It dipped a bit in February and March so I've got to get back to regular updates. Especially now that I seem to be getting more visitors... perhaps as many as five more people are reading my blog. Reading it... confused. Nowhere in the blog does it actually say what I'm doing. Or why I'm doing it. Nowhere. Ok, there's a little bit on the left that tells you the name of the game, and it's pretty easy to work out that it's not an artistic piece following the journey of one man through the underworld. But that's it. No other information.

That's pretty fucking stupid.

So, starting next week I'm going to start writing up the whole thing. The theory, the philosophy, the driving force. Everything.

It's about time, too.

Have a teaser.... TCFG is a "football" game. Ooooh.

Now - cheesecake.

Sunday, April 30, 2006

League leaguey leaguey league. League.

Some things are supposed to be easy.

Things like leagues. Leagues are easy, right? Teams go up, teams go down, some simple rules and bongio - you've done it. If only. Leagues in TCFG are fairly complex beasties.

As in real life, an entire league system is split into levels, and each level is further split into a number of divisions. At the top, there's one division. At the bottom, there could be as many as 30. It all depends on the nation. These levels all reorganise themselves each season to maintain some sort of regional distribution of teams, and all is good.

The hard bits come in when you start to think about forced relegations or promoted teams not making the criteria. Then you end up with some levels having too many teams, and others being relatively empty, and then you have to start messing about with relegations and promotions in order to get them in order again. And that's not easy, especially as you can't forcibly relegate a team just to make up the numbers. That's a bit unfair.

And just when you think you've got all that done, a giant monster comes along and stamps on it all, screaming "What about when leagues split into two very separate halves?"

Some league systems are really made up of two or more leagues, that converge as you get higher. If you're in one of these smaller leagues, you can't be moved to the other just to make up the numbers. Oh no, you're stuck there. You know where you are, and you know where promotions and relegations go. It's not too bad until the same problems as before jump in through the window. What if it's not even? It just gets messy.

Meh. It'll work out, I tell myself whilst crying into a pot of soup. And if it doesn't, at least it might generate some spectacular fractal displays on the screen.

Smashed screens are fractal, right?

Thursday, April 27, 2006

Fucked Over

I'm sure in many industries, you'd expect competitors would do whatever they could to get one over on a direct rival. If Cadbury are making a killing marketing Fruit & Nut at mental hospitals, Mars might well start tipping off news reporters about the lack of consideration being shown, knocking Cadbury down a peg whilst they introduce their new Spacer bar.

The games industry is surely no different. However, I am quite utterly baffled that a company who deal mainly in music games have decided they need to get one over me, hindering my progress in a subtle yet horrid way.

I'm talking about those bastards at Harmonix, who have cruelly decided to release Guitar Hero in the last few weeks, sapping any time I actually have had to work. Since getting the game I've done nothing but badly play my way through a selection of riffs and feeling like a true golden god.

Curse you Harmonix, and your evil, Satanic ways. Clearly a collusion with the Dark Lord.

Of WRAWK. The more W the better.

Thursday, April 20, 2006

Kudos on your Gibbage

There are other blogs out there. Blogs with news about kittens dying horrible deaths, blogs with news about kittens being horribly born; I have witnessed this, it's not a pretty sight and it only means that the books I read as a kid have lied to me. Even blogs with news about kittens being raised from the dead for sacrifice. They're out there.

There are also other blogs by games developers looking to chronicle their efforts for historical purposes. Armies of bearded net archaeologists drinking lots of tea might want to know why The Mysterious Sofa Man never got a worldwide release, and how to beat level four where the fat man attempts to sit on you.

One such blog is Dan Marshall's effort, Gibbage. I implore you to read it for a multitude of reasons. It's funny, for a start, and it's actually well written. Presumably because Dan knows how to do that sort of thing without tripping over his own convoluted metaphors. Another reason is the game itself, er, Gibbage.

Gibbage. I was a bit frightened when I first heard about the game. I don't know what Gibbage means so I looked it up in a dictionary. Imagine the horror when I found out that a "gib" is a castrated male cat. I had had enough of blogs about kittens that are sexually active, the last thing I needed was one where Tiddles is without his winky.

Thankfully, it also appears to mean something else, along the lines of horrible desmemberment of spikey haired, cartoon people, which was much more pleasing to my ear after having to put up with a Pokemon obsessed little sister.

Gibbage is, at its heart, a two player single screen action game, the aim of which is almost certain death. You bound around the level, chase your opponent and attempt to produce a kaleidoscopic image of limbs, blood, eyballs and tattered clothing. Also, there's something about collecting power cubes and returning them to base in order to win, like a platform capture-the-flag, but I was too busy dying horribly because I thought that was fun.

If I was playing with a friend, I'd possibly have tried to kill him instead. Six quid to kill as many friends as you like, even top professionals cannot match that price. If you like Worms, you'd like Gibbage.

Another such blog is Cliffski's. Cliff's actually got loads of games under his belt, like Democracy, in which you become the elected head of state of a real-world nation and attempt to please everyone at the same time (and fail), and Starship Tycoon 2 where you run a fleet of interstellar transport spaceships. Which is clearly better than a theme park, yet people keep buying theme park games. I believe the two games should really be merged into Capitalist Space Pig-Dog-Monkey 3 With Added Elections, but perhaps its good that Cliff doesn't listen to me. Also, there should be talking quaggas.

His latest game, which isn't finished yet but actually exists (unlike... um... moving on) is Kudos, which he cleverly attempts to describe as "a life sim that's not like The Sims but more like Animal Crossing which I have not played".

I'm sold, at any rate, because Animal Crossing is excellent and The Sims was just boring. In Kudos, you live life - go out drinking with your buddies, make more friends, get a job, realise you hate the people you work with, get a girlfriend, find out that the girlfriend hates all your friends but loves your work colleagues... and so on until an anthropomorphic duck tells you he's a hammer whilst looking whistfully at a phallic constellation in the sky.

Ideally. That's easily the best bit about Animal Crossing.

What I like about both Kudos and Gibbage is that they are indicative of the independent developer's range, variety and imagination, with which the major publishing houses can rarely compete. It reminds me of the early 8-bit days when the hobbyists were at the forefront, when every new game that wasn't a direct clone of an arcade hit was delivering something new.

That's how I see the indie scene, that's where the passion can be. Guys like Dan Marshall and Cliff Harris making games they believe in, and the quality can often shine through into the finished product. It doesn't stop with those two. There's Si Read, creator of New Star Soccer 3, pretty much the only game out there where you get to live the life of a footballer since the days of Gremlin's Footballer of the Year. There's Introversion making games like Darwinia, or the forthcoming Defcon which allows you to attempt a bit of Global Thermonuclear War without the help of WOPR, and has the genius touch of "office mode" so you can finally nuke the guy from accounts and the boss will be none the wiser. Games built by guys and girls
who've thought, "You know what I'd love to play?" and then gone and fucking built it.

You can only be urged to support them if you like their games. Help them make more.

And help me as well, my blog needs traffic.

Wednesday, April 19, 2006

Tons of Lovely Data

Yup, that's a screenshot. Unfortunately for you, it's just of the editor. Remember what I said earlier about funbots (clearly in a moment of drunken madness, may I add)? The editor is currently the main focus of my work, as it's through the editor's creation that the database structure is defined. But look at the snazzy kit colours! Ooooh!

If The Complete Football Game is to successfully simulate the entire football world, it would need a lot of data. Teams, players, competitions, nations, cities, stadia, league systems, regions, ex players, defunct nations and clubs, currencies, spoken languages, injuries, rivalries and more need to be stored to keep the game ticking along, and with over 250 nations in the game you'd be forgiven for thinking it's a struggle to get them all in.

Yet TCFG's database currently weighs in at a relatively paltry 63MB, uncompressed. The structure is not yet complete - leagues still need to be catered for - and when the game's running it needs a lot of space to store all the fixtures and results that don't get stored in the database, but ultimately TCFG is surprisingly space friendly.

The above screenshot shows the main club edit screen. Now, I dunno if Newry City are that rich in real life, and the layout isn't fantastic, but the editor's more about function than style right now. Each club has two kits, three teams (each with their own stadium if necessary), a maximum of 80 players (which ought to be sufficient), and various other titbits of information. Enough for a club.

Players are even more detailed. Each player in TCFG has his date of birth, nationalities, international record, spoken languages, a rating for each of the 16 positions in the game, his career history, which foot he kicks with, how good his weaker foot is at various tasks - enabling a right footed player to have poor accuracy with his left but still be able to give it a hefty whack - forty-eight attributes and information relating to his overall ability. And on top of that, there's his height, skin colour, hair and beard styles and colour, and even an attribute to let the game know that he changes his appearance more often than Djibril Cisse.

All that - and the database is capable of storing 375,000 players.

Now, that ought to give some insight into how complex the game is, and why it's bloody taking so long.

Sunday, April 16, 2006

How many microbots?

I got up early this morning and rushed off to the post office. The reason? FM Handheld, Sports Interactive's new version of Football Manager for the PSP. Good job too, as I've done nothing all day but play this beast. It's rather good. And it got me thinking.

It got me thinking about structure, which highlights what an interesting life I lead. FM is pretty much a database with some funky bits attached. There's no getting away with it. At its core lies information, and every time you hit that continue button some little microbots get to work whipping that information inside the game to make things happen. Little microbots with different jobs like "transfer AI", "match", and "cheating AI", or so we all think. Not to mention the miniscule robots that can see into the real world to make sure you're superstitiously holding your nose with your big toe whilst singing the first three verses of Sweet Child O' Mine, and woe betide you fall below an octave because you just know that the opposition will score. Yes, those microbots are there too.

So I was thinking about all this, and not smoking anything at all, and wondering what bots are in my game. The Complete Football Game's (still that wondrous working title) main feature is the scope of its world - tons of leagues of all shapes and sizes and cliches. Other than the match engine itself, it is the most important part of the game. Teams get results, results power competitions, little compobots run around moving teams around accordingly. I never imagined it would be so fucking hard. Really, if I had known this at the start I'd have given the game six generic leagues and left it at that. But now I'm close, real close.

Close to the funbots. The competition engine, as I've named it in a bout of ingenuity, isn't too far from completion, and when it's done the game will be able to take results and shape them into something not too dissimilar to reality. At that point, I'll be able to look around the gameworld at all the lovely stuff going on. I can almost smell it, it's that close. And it's just information in the end, the problem was getting the right information.

Then the true fun comes. Well, I say fun, when I really mean stuff that produces instantly visible results. The whole competition structure doesn't produce anything until it's finished, yet it's a year long project so you can see how motivation can drop. Working on something you can't even tell will work for twelve months... man. Soon I'll get those results. It'll work, I'm sure about that. Took long enough. Then the funbots. The transfers, the media, the weather system, the tiny little animated bits on the menu. If I have any of that.

Who knows, I may just die if this damn thing doesn't work in the first place.

Saturday, April 15, 2006

Why I'm a bit of an idiot

One thing about trying to develop a very large game is that it's very, very easy to get sidetracked. I could be working away trying to get the interface working when suddenly I find myself thinking about different ways a guy might kick a ball.

This, as you might expect, leads to problems. Leaving one thing to go work on another means nothing gets finished. I had a lovely little target for this Sunday that I was well on course to meet until my little bit of bridge finally met a gaping hole. A gaping hole that I hadn't a clue how to fill.

Normally my musings are carried out anywhere I can be alone. In my bedroom, in the hallway, or in any one of the fifteen trips to the toilet I might take on a regular "working" day to help pass the time a bit quicker. I pace about the room and talk to myself. That's why I'm alone when I do it - it looks fucking stupid but it gets things done. Yet unless I write down everything I say or carry a dictaphone, things get left by the wayside. There's no way of finding out how the hole was supposed to be filled.

About a month ago I decided to take a different approach. I opened up WordPad and started typing, in a style akin to making a presentation but without any unnecessary fluff - explanatory and detailed where necessary. And lots of stupid bold writing, which always comes in useful to make things readable. As it turns out, this was great. No longer did I have to look like Sam Beckett from Quantum Leap when trying to work out the best way to transfer teams between competitions. Nope, I just rattle away. And I can do it at my work desk too. Excellent!

Better still, it meant I could organise my targets a heck of a lot better. Everything I wrote down over those few days has been finished, and works better than any of the other stuff I have. No headaches, no trying to remember what I told myself five days ago - just sitting down and getting on with it. Certainly, I'll be doing this more often as part of my design. I had to learn the hard way, eh?

So that left me today, well short of meeting that target for Sunday (especially given as I can't actually do any work Sunday, meaning I've just got tomorrow to do it) because I've got to fill holes from months ago. Never again. Sweet fuck, never again.

Sunday, April 09, 2006

Back again. Time again to do some bloody work and get things back on track. I've done nothing whilst away, mainly due to a lack of time, so it'll take a short while to get back up to speed. Luckily, I've got slightly better at planning my work, so I know exactly where I am and what I'm doing.

One thing I do from time to time is think about other games I'd like to make. I've had this one idea for quite some time - essentially a puzzle platformer in the style of Flashback or Abe's Oddysee, that I'd really like to develop further. I was lying in bed then on Thursday night when I had one of those flashes of creativity, a whirling rush of things I'd like to include in the game, ideas for a story, a theme and so forth. Pity it was 3am and there was no way I was going to fire up the laptop to make notes, and wake people up fumbling around.

So I turned to Animal Crossing on the DS and sent myself a letter detailing the info. Very useful.

But first, TCFG. Then I can worry about puzzly-platformer game. And any of the other games I have in mind.

Wednesday, March 29, 2006

If you look through the blog history, you'll see I once posted a target for the end of April. That target is unlikely. Hideously unlikely.

In fact, things are going scarily slowly and that needs resolved. Unfortunately, I've to go away again for a week and a half which only serves to disrupt things further, but hopefully I'll get to squeeze in a little work during that time.

So, the game's current situation isn't far on. It's hard enough anyway to think of updates for monotonous tasks. A little post saying "Well, now the editor has different screens" is just... shit. A load of crap. Pisses me off, that's what it does. But it's essential to get this working before I get to work on the fun stuff. That's what I keep telling myself. Will it work? It'd be nice.

Thursday, March 23, 2006

I really don't update often enough.

Well, competition qualifications is almost sorted in theory. None of it's coded yet but the coding is the easy part. The design is almost finalised and it's very flexible, able to handle varying numbers of teams and making sure that qualifications don't override each other (stuff like the double winners entering the UEFA Cup instead of the Champions League would be a bit shit).

I've only got to design an exclusion system (so that teams can be excluded from playing in a competition, for example Germany from the World Cup Qualifying just finished) and then start tweaking things and entering them into the code.

Having everything data driven like this is a real godsend. It's taken me a long time but there's no way I'd be able to support 250 nations accurately without it. Once this database has finally been written, the long journey of data entry (and inevitable bug fixing) can begin.

Tuesday, March 14, 2006

Holidays are clearly a disguised evil. Not only do you miss a week of working because you're busy... um, well, in my case standing in 50cm of snow, but you then miss days either side through preparation and then general lethargy. Not good.

I've made precisely null progress on the game since I've got back. Instead I've played some Killzone (it's ok), got my new computer (it's great) and spent some time at home seeing the family.

So I've got to kick myself in the arse tonight and get back into it. And then I can update some more.

Wednesday, March 08, 2006

Just a little note. I wandered off to Munich for a week which was excellent as always. Upon my return I find my new PC has been delivered to my folks' house so I'll have that set up this weekend, meaning a lot more time to work (no nagging girlfriend demanding internet access).

All good.

Sunday, February 26, 2006

Damn lack of updates. Where was I?

Yes. Competitions, quite the annoyance. Structurally I don't see much of a problem, I can create a lot of different competitions and have the teams progress through them as they should. The main problem left before that moment where I can sleep happily is the system for having teams enter the competitions.

I've worked out that a competition will use any number of five different methods. Four of them are straightforward and present no problems, and allow for clubs to enter competitions based on various criteria, membership of a body or league, and even explicitly stated. These get defined in the competition's read-only structure data. The problematic one is Qualification.

Qualification presents two problems. The first is that it's not always straightforward and the World Cup is a perfect example of this. Because the hosts could come from anywhere in the world, the six qualification tournaments qualify differing numbers, otherwise you may be left with something like the North American tournament providing four qualifiers - and having a fifth playoff for another spot. That's a poor representation. Then of course if there are two hosts of the competition, things change further. Effectively, qualification must be dynamic and this presents a further problem.

If qualification is dynamic, then so must competitions. Europe can provide 14 entrants to the World Cup. If they play in 8 groups (as they have just done in 2006 qualifying) then those 14 would be provided by qualifying the group winners, the best four runner up sides, and letting the remaining four playoff to produce the final two. That works. If the hosts are European (as Germany are) then you've got 13 spots, so the competition must change - 8 group winners, two runner up sides and have the other six play off for the remaining three.

Ideally, I'll have the game do this automatically, thus saving memory. The other solution is to store different formats for different numbers of qualifiers, which can use up memory.

Further problems appear when dealing with things such as continental qualification and whatnot, so that's the big headache at the moment. I have faith though.

Wednesday, February 15, 2006

But then you go and find the root of the bugs, and you fix them, and you feel fecking ace.


Of course, as I post an ugly gremlin is probably messing with my work, but I can take that risk.
Not much in the way of updates, mainly due to the behind-the-scenes nature of the work I'm doing. There's really not much to say when you spend half your Tuesday night working on squishing an annoying database bug, and then spend Wednesday doing likewise with a different bug that's surfaced just to annoy me.

But something will crop up. Hopefully before Friday when the distraction comes in the form of Shadow of the Colossus. Can't wait for that game.

Wednesday, February 08, 2006

Tuesday night was a bit of a waste. As I said, there's a Quick Edit system for entering people quickly. However, underneath that there needs to be a good generation algorithm so that the created people are believable. This is crucial not only for the editor, but for the game as a whole - the same algorithm should be used for generating new youngsters over time.

So I had to ditch what I had, as it was neither good enough nor re-usable. Still, I learn from the experience and I can crack on with the competitions, which take priority now.

Aside from that, I'm having a bit of a bad time. A lot of things are getting me down in my general life, mainly work related. It's quite frightening, really. The game must continue!

Monday, February 06, 2006

I've been adding important features to the editor, in the form of Quick Edit modes for clubs and people.

The game can provide for 12,500 clubs. Now, I'll be damned if I'll get accurate research on all of those but I'll get what I can. The Quick Club editing mode allows me to simply input the basic information and it extrapolates the rest. So saying a club with a World Class reputation is rich ought to give them about £100m to play with, while a rich Conference level club might have £10m, maybe less. Entering the Short Name of the club as Man Utd will then go and make the B team "Man Utd Reserves" and the C team "Man Utd Youth". The "Reserve" and "Youth" suffixes are nation-dependent, so Russian sides get the suffix "-2", as in "Spartak-2 Moscow".
Well, more of a middix, if such a word exists.

It's all designed to make inputting the basic data as painless as possible. I'm halfway through the same process for people, which is just perfect if you know the name and age of some obscure team's goalkeeper but nothing more than that.

It works quite well and the results are just standard records that can be edited in the normal way, for fine tuning things.

To be honest though, I can't wait til I've got these bits done and can crack on with competitions themselves. Competitions are entirely data driven which is both brilliant and terrible. It's brilliant because adding a competition is easy. It's terrible because it's an awful lot of work to get the data driven nature working properly and accomodating all the crazy styles. I may have gone over this before, though.

Still, it'll be fun to work with and when it's done, the editor is practically finished. Which means I can move on to the game interface, whilst adding in data as I go along.

Tuesday, January 31, 2006


Or regular... famy.

I've been interviewed by the lovely chaps at GetManaging, which is rather nice. I've never done an interview before. Can't possibly hurt to get a little exposure for the game and blog, can it?

Tonight, back to the grind, sorting out lovely image colour issues.

Sunday, January 29, 2006

A Basque Problem

I'm sure you've heard of the Basque Country, a region of both Spain and France where the people have their own nationalist pride in the area. Now, I've no intention of introducing politics into my games (unless I'm making a political game, of course) but sometimes its unavoidable. There are several clubs in the Spanish leagues - most famously Athletic Bilbao - that are located in the Basque Country. The pride they have has generally led them to shun Spanish non-Basques, or in extreme cases refuse to play any player other than a Basque national.

Such rules are easy to incorporate into the game. I do so through the use of a list of "special" circumstances for clubs, which can be official statutes of the club. The aforementioned Athletic Bilbao will have nobody but Basque people on their playing staff, and likewise Deportivo Saprissa of Costa Rica sign only Costa Rican, both do so out of pride. Other clubs such as Sinchi FC or Albirex Niigata in the Singapore S-League play only Chinese or Japanese players respectively, a league ruling for these foreign clubs.

The special circumstances may also be more general gameworld data - a club may have significant support from a nearby country and so players from that nation may be more open to representing the club - Celtic's relationship with Ireland is a fine example that is not set in stone in any way. Celtic do not have an official policy of signing a certain number of Irish players.

All in all, it's a very data driven solution that means I can keep the code simple and add the features in the data editor. But it's this that can cause a problem. Going back to the Basque people, these people are also Spanish or French nationals.
Joseba Etxeberría is a Basque player for Athletic Bilbao, but he's also got many caps for Spain. Likewise, Bixente Lizerazu played for France.

The problem is obvious - if Basque Country is in the game as one of the "nations" in the game (where "nation" indicates a non-political entity, but rather a footballing one), then how do you ensure that its people are elligible for France or Spain as well? "Second Nationality" is an available field for everybody in the game but it's not mandatory. There's no mechanism for forcing it.

The Basque Country are not alone. TCFG intends to cover as much of the world as possible, not limiting itself to FIFA affiliated nations. There are active national teams for Catalonia, for the Isle of Man, Gibraltar, S
ápmi, Sark, Anglesey, Åland and Monaco. Even the Vatican City have a national football team. And crucially, players representing almost all of the above are also elligible to play for Spain, for Finland, Wales, France, and so forth. Players from the Isle of Man are elligible for any of the Home Nation teams. And conversely, nobody ever has Vatican City as their sole nationality, the team being made up of those who live or work within its walls.

(In real life, a number of people do have Vatican citizenship and only that, but I presume this is because they have renounced their old one).

It's an interesting conundrum. The solution is to ensure that each nation also has optional fields to indicate the available alternate nationalities, forced or otherwise. The Basque and Sami teams are particularly interesting because the lands involved span multiple countries -
Sápmi, or Lapland if you prefer, is located in Northern Scandinavia and spans Norway, Sweden, Finland and Russia. Perhaps the best solution for this is to include in the National data the demographics - the rough percentages for each country. More so, it will be essential for the newly generated players in the game to actually come from the correct country - their place of birth needs almost always to be a city in Russia as well as Sápmi, for example.

Of course, it would be considerably easier if I dropped these countries entirely, instead preferring to go with established nations where ambiguity does not exist. But these relatively obscure details are what I feel will make the game stand out.

I want it to be more than just a game.