tag:blogger.com,1999:blog-206235022024-03-19T03:00:39.845+00:00Mostly FictionalLiam McGuigan chronicles the development of The Complete Football Game using a combination of sloth-like behaviour and totally inadequate writing.
TCFG is, um, a football game.Unknownnoreply@blogger.comBlogger97125tag:blogger.com,1999:blog-20623502.post-38092480247207574722014-05-30T21:47:00.000+01:002014-05-30T21:47:48.554+01:00What happened?<span style="font-family: Verdana, sans-serif;">People are still looking at this? Oh boy. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Er, I haven't just been replaced by Sam Beckett there, although that would have been a tremendous excuse. Seven PhDs, he claims to have, but I bet none of them involve ridiculously ambitious football games. Just physics and stuff. Anyone can do that.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Anyway, I got an email because someone posted a comment on the last post wondering what happened. It's been over four years since I posted anything here, which is frightening because it means I'm four years older than I was without having made any real progress. Oh well, I've got an excuse now. Even better, I've got a <i>reason</i>...</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">The reason is... I kinda gave up. More specifically, I lost confidence that I could actually pull it off, given what I knew at the time. I'd been battering up against a brick wall for ages and although the underlying competition stuff was working, I was no closer to having a decent game of football. I'd managed to get people half-heartedly running around a pitch, a spaghetti codebase littered with bugs, and sometimes you could kick the ball out of play and never see it again.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Which is quite realistic, if my regular Friday games are anything to go by.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">So I shelved it, and decided that if I actually wanted to make <i>any</i> games, they had to be smaller, more sensible, and hopefully more doable. My well of infinite wisdom having not yet run dry, I decided to make a platform game. Because sure, <i>that's </i>not complicated.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">The curious thing is, I finished it. And released it, as both an Xbox Live Indie title, and an even better PC version. It's called Rasternauts and it's got lots of running, jumping and shooting in it, with glowing vectors and the very best pixel art that I've ever been able to do. I set up a little website, also named <a href="http://www.mostlyfictional.com/">Mostly Fictional</a>, and from there you can head off to Desura and both try and (if I'm lucky) buy it. It's pretty good, but I'm biased as hell.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Since finishing that up, I've been preoccupied with studying and things like that, but I still like the idea of a football game, and it's one of the things I'm toying with at the minute while I decide what to do next. What I do know is that if I opt to return to that world, it'll be pared down from the behemoth it used to be, focusing on the core gameplay and forgetting everything about cramming in this amazingly expansive world around it.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">For now at least. If the experience of making Rasternauts and a burgeoning addiction to clichés have taught me anything, there's not much point in trying to run before you can walk. Any game is worthless if it's not fun and it took a long time for Rasternauts to get anywhere near there. I do still believe it would be rather an amazing game, and I do still have an inordinate amount of love for the genre and its inner workings. The passion is still there, I've just got older and and wiser.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">I'll be posting stuff every now and then to that new site, so it'll be the best place to find out if I do start to make real progress. For now though, I'm gonna just enjoy the World Cup, fiddle about with some AI, and try not to commit to anything too drastic. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Cheers for the interest, Anonymous Person, I hope your own projects bear fruit, and I hope one day I can deliver something you'll enjoy.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">If you don't like Rasternauts, that is... :P</span>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-20623502.post-21627074063940563672010-04-02T20:44:00.004+01:002010-04-02T21:03:06.088+01:00A Lack of Control<span style="font-family:verdana;">The past month has been spent building up the moveset of players, and then tearing the whole thing down again. That was intentional though, I swear.<br /><br />Having earlier given players a physical presence, the next task was to get them to interact with the ball. I stuck with a sticky ball system, as it's easiest to get up and running in game-form, so when a player is in possession the ball is pretty much locked to his feet until he releases it, or he's tackled. Passes were added, with some nifty code that allowed a player to weight a pass just perfectly, and then I topped it off with shots capable of breaking the net.<br /><br />Well, ignoring the net. One of the things I had yet to do with the collision detection system is deal with objects that move faster in one frame than their own size, allowing them to easily pass through thin objects like goal nets. Oh well, that was fairly easy to solve, simply splitting the motion in a single frame into several smaller chunks to ensure everything's caught.<br /><br />That left first-touch football as the only thing that still needed doing, and thanks to the aforementioned tearing down, that's still largely the case.<br /><br />The game deals with everything using an Action system. Everything a player can do is ultimately an action. Some are continuous, like running, where as along as the action is set the player will run in the given direction. Others are timed, and an example of that might be a volley - it takes time to swing your leg, with only the point where the swing connects with the ball being of any concern.<br /><br />Naturally, because of this the game needs to work out exactly where and when you should start swinging, which depends on the ball's trajectory, your position, and so on. Unfortunately, what I've managed so far is first to have the player move to position then stand like a goober because he can't work out the timing, presumably because of the archaic intercept timing system I have which wasn't designed for this purpose. I've also managed to tweak a few values and have a player run to the ball and then encircle it forever, which I think might be a good model for some footballers, but doesn't exactly lead to a fun game.<br /><br />Looks to me like I'll have to tackle the interception system. Which sounds obvious, and that's probably because it is and I didn't think of it until now.<br /><br />I tell you, this blog's like a Mac. Pays for itself.<br /><br /><br /></span>Unknownnoreply@blogger.com7tag:blogger.com,1999:blog-20623502.post-36416936276884042492010-02-25T23:00:00.002+00:002010-02-25T23:12:28.636+00:00Year 2010 of development<span style="font-family: verdana;">Oh, how I do love my big long gaps between posts.<br /><br />Picking up where I left off, I expanded the match engine to include some rudimentary set pieces, then trotted off to work on FryGUI2 for some time, even though I said I wouldn't. Eventually though I was lured back to the match engine.<br /><br />My next task was to inject a bit of physical presence. Players were ghosts at this point, freely floating through one another in their pursuit of the ball. Of course, some existing games work like that, even the mighty Sensi, but there's a lack of satisfaction when you can't use your ample frame to block an opponent's attempts to dispossess you, and the likes of NSS3 show it can even be done in the classic top-down viewpoint.<br /><br />Added to that, I wanted some momentum. I had players reaching top speed instantly, and equally quickly they'd grind to a halt when the stick was released - good enough to get things moving, but again it just wasn't satisfying. Players need to feel weighty.<br /><br />After some experimentation, I quickly decided in that familar way of mine to start writing another engine, this time featuring the basic physics and collision detection along with the graphics display. Using the old graphics engine as a base, I added some bounding volumes for collision detection, got immensely frustrated a number of times that possibly entered three figures, got drunk a lot, and eventually landed with a working system. Again, it was one of those things that was quite pleasing to finally have working, and again it was one of those things that didn't really bring me any closer to having an actual game.<br /><br />No matter! Back to the match engine, rebuilt now using the newly named FryWorld, back to largely working order but with the added bonus of collision detection. It only took about six months. I'm so proud.<br /><br />In the coming weeks I'll be building up the move set and expanding on the basic AI, hopefully getting myself a playable match for the first time ever.<br /><br />Then, I think, I might just get drunk.<br /></span>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-20623502.post-61231330049718604412009-08-02T14:19:00.002+01:002009-08-02T14:31:02.840+01:00Playing in a box<span style="font-family: verdana;">Well, two weeks later and that's what I've got. 22 poorly drawn and animated men running around playing something approaching football in a big enclosed space. There are no set pieces (not even kick off), the defenders don't do anything and every player is exceedingly single minded when he finally gets on the ball, but at least it's all a start.<br /><br />There's no kick off - the ball just floats in from the sideline and all 22 men start right on the centre spot, inhabiting each others bodies in ways that I didn't intend. There are no goals to be scored, not just because there are no goalposts but because there's an invisible forcefield surrounding the entire pitch that's deflecting the ball should it dare venture in that direction. Even if there were goals, there's no ref to allow them.<br /><br />So there's still a lot to be done on this basic version before I can start building upon things. I'd have liked at this point to say "well, I've got a start, let's go tackle the GUI" but that's the sort of lazy thinking that got me here in the first place - several years on without a football match.<br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-85987977158619021932009-07-18T19:19:00.004+01:002009-07-26T18:08:47.979+01:00Football, football, football.<span style="font-family:verdana;">About two years ago I posted <span style="font-family:verdana;">about my frustrations with creating a good match engine. I got severely pissed off about it all and went off to do other parts of the game. Those done, I recently went back to the match and am feeling no different, unfortunately.<br /><br />I spent a short while mucking about with 3D engines and in the end decided that it would probably be too much effort right now fretting about that. I created a 2D engine based on the same principles as Blitz3D's system (a world full of entities, basically) as a kind of stepping stone, and also so it's easy enough to update and draw each frame. That's working brilliantly, so as you can guess, it isn't the problem.<br /><br />Getting the perspective right is the issue. I'm wondering if it's worth pushing on until I've got it sorted. Now, the right attitude should be to press on - I'm using placeholder art anyway - and then correct things when the basic game is up and running and tweaks can be made. The match engine's inner workings are separate from the graphics, so it should be pretty simple to do so. I'll just have to ignore some graphical quirks - currently the actual pitch is being viewed from directly overhead, whilst the players are from an angle, lending the whole thing a rather odd feel.<br /><br />Still, pushing ahead I did manage to create a control abstraction system. This lets me poll what I call a virtual joypad for input. The actual input could come from key, joypad or even the mouse, but as far as the game's concerned it all comes from this one joypad. It works quite well, though it still needs a few things tidied up.<br /><br />I'm going to make a big push over the next few weeks to get somewhere with the match engine and see if I can have it play an utterly terrible, but thankfully complete game of football. From there, I can start tweaking the perspective, improving the AI and expanding the controls and options.<br /></span></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-81924479348547118852009-03-07T20:17:00.002+00:002009-03-07T20:39:14.466+00:00Platini said my game rocks. Allegedly.<span style="font-family: verdana;">Today, I started work on a new GUI system. As much as I like the original FryGUI, there are a few features that I'd like to support that, whilst possible to implement in the existing code, would require enough rewrites and redesigns that I'd be as well starting afresh.<br /><br />I'm sticking with the Screens and Panels system which works well, and adding support for things that I think really ought to be there. Chief among these is multiple resolution support. Instead of sticking rigidly to an intial res, the interface will scale appropriately when altered by resizing the panels and gadgets appropriately. Fonts might get bigger, tables might get more info visible on-screen at once, and so forth.<br /><br />The other major inclusion is joypad control. I'm making a football game, the joypad will be the primary method of control during a match, so it's pretty important that I can navigate screens using it rather than have to reach for the mouse every time I fancy making a substitution. Navigation using Tab or the cursor keys will also be supported.<br /><br />Other additions include allowing individual screens to reposition panels, more flexibility regarding skins (previously, skin border details etc. were hard coded, I never did get around to making them editable), positioning gadgets using reference points rather than hard coordinates (e.g. BOTTOM_RIGHT for the bottom right of a panel, regardless of size), animated gadgets, improved tables and better text input (with clipboard support, or at least that's the plan).<br /><br />Meanwhile, Michel Platini was in the stands as Newry City (my home town team) lost to Portadown last weekend. The footballing world is certainly a strange place.<br /></span>Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-20623502.post-39565451343814483272009-02-22T19:49:00.003+00:002009-02-22T20:26:03.094+00:00Leagues forever<span style="font-family: verdana;">Leagues have taken up a fair bit of my time recently. More specifically, promotions and relegations.<br /><br />I didn't want to have a simple system where teams go up and down willy nilly, I wanted to match some of the complexity of the various leagues from around the world. There should be restrictions on teams climbing the leagues, ground requirements to be met and limits on the progress of B teams, blocking promotions or even forcibly relegating them to accomodate relegated first squads. It was tough, but I've a working system.<br /><br />I've had one of my frequent worries recently about whether or not things would hold together. Individual competitions and leagues are working, as are the connections between them, but I've never been able to test it properly over a long period of time, to see how the game copes with the data being thrown around, to make sure little oversights here or there don't conspire to bring things crumbling down ten or twenty seasons later.<br /><br />That's what I've just been doing today. There's only a small selection of competitions forming a league system and a cup, but it's a good test for now.<br /><br />Happily, 32 seasons later the game's still blasting away. That's about half of what I really need, as careers can start with the player as young as 14, so we really need to keep him going until he's about 70. 55 seasons at the very least. Looking at the test competitions I've been using, they've been working every season, no crashes, and the league is still structured as expected.<br /><br />And happily, something that's difficult to fully test for but brilliantly came out anyhow - a team won the second division of the league in 2036, and their B team won the same division in 2037, showing that B teams will still be promoted if their A team is promoted ahead of them. Sweet!<br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-21253456150836367822009-01-28T21:19:00.002+00:002009-01-28T21:29:39.990+00:00Round and Round<span style="font-family: verdana;">Knockout competitions are fun things, aren't they? Full of excitement and drama, and because they're so simple, you'd think they'd be easier than a league to put into a game. And in thinking that, you'd be wrong - at least as far as this game goes.<br /><br />The biggest concern is in coping whenever you've got fewer entrants than you expected. A league can simply adjust the number of fixtures everyone plays in order to compensate but in a knockout, playing fewer games in one round will affect those that come later. This is worth considering, because with so many competitions and possibilities, it's next to impossible to guarantee that something won't go wrong somewhere and render a knockout short on teams. It won't necessarily be a bug or an oversight either - the Europa League has differing numbers of entrants depending on whether or not the holders are participating in this season's Champions League, whilst in the English League Cup, teams playing in Europe get byes to later in the competition.<br /><br />The game needs to be able to react to this. One possible solution would be to cater for every possibility by creating several formats and choosing the one that works, but that's awfully wasteful. Instead, I decided that knockout stages should be able to take control of their own destiny.<br /><br />By telling the game how many teams are supposed to reach the final, the rounds that some teams get seeded into automatically, and how many teams are expected to join midway (think the CL failures dropping into the Europa League), any knockout competition can adjust its format. All I need to do is tell the game what rounds might possibly be played - the League Cup actually has a preliminary round that has only been played once, but if nine English sides are in Europe in a given season, it'll turn up.<br /><br />Seeing this work has been hugely satisfying because it was a major cause of headaches over the last while. Knowing that a competition will be react to changes takes a lot of pressure off, as the whole thing is less likely to break down because things didn't work out entirely as expected, and in football, you just can't expect anything.<br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-36005750393809403772008-12-22T05:06:00.003+00:002008-12-22T05:44:36.584+00:00And some other stuff<span style="font-family: verdana;">I didn't really want to put this in the other post, because it's not related to my game. Much.<br /><br />Since the last post, I've played some new football games, and I figure I ought to give some impressions. So, let's get down to it.<br /><br /><span style="font-weight: bold;">Euro 2008 and FIFA 09<br /><span style="font-weight: bold;"><span style="font-weight: bold;"></span></span></span>EA really pulled something out of the bag with these ones. I've actually enjoyed the FIFA series since 2005, but it wasn't until 08 that I saw it get better than Konami's efforts. The game now is an excellent tactical football game, tremendous multiplayer fodder, and with a solid single player experience to help it along.<br /><br />Euro 2008's major draw was the international minnows, so it's a huge shame to yet again see EA ditch the work that's already been done and go back to having about 40 national sides from around the world. Every year I cry for more to be done with the FIFA license, especially following games that back up major tournaments, and every year they fail to deliver.<br /><br />Still, Euro 2008 had another trick up its sleeve with the Captain Your Country mode. A fleshed out version of 08's Be A Pro, it gave you a new way to play the game and a 20-odd match campaign in which to do it. It had its problems and oddities - player stats decreasing over the two year period like they've just been shot in the legs, and the bizarre need to select three other players whether you've got that many friends or not, but it took over my football gaming time. Sod the team game, I wanted to be me.<br /><br />FIFA 09 topped it. A better game all round, but the Be A Pro Seasons mode is terrific. It's an arcadey bent in terms of presentation, and as such suffers from some of the same flaws that beset the Career mode in the game, but has a tremendous sense of playing through four years of a player's on-pitch life. Scoring a goal in FIFA has been satisfying for some time. Scoring it thanks to your off the ball movements and link up play is even better.<br /><br />However, FIFA fell by the wayside when something else arrived...<br /><br /><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"></span>New Star Soccer 4</span></span><br />Hooray, it arrived!<br /><br />Now, I'm not suggesting NSS4 is better than FIFA. It's an unfair comparison for a start, like comparing Mario Kart to Gran Turismo, as both have different takes on how football should be played. FIFA is a pure simulation, whilst NSS4 harks back to the arcadey football games of old, where <span style="font-style: italic;">your </span>skill as a player is all that really matters.<br /><br />No, what made me drop FIFA for NSS4 (in addition to not having to wait for the telly to be free) was the prospect of playing an entire career, across a host of real life leagues. The game lets you start as a 15 year old in any position on the pitch, and play out over 20 or more years as you try to take the world by storm, which provides an interesting comparison - FIFA's the football simulation that takes an arcade approach to playing a career, and NSS4 is almost a polar opposite. It does have arcade-like systems for relationship management and skill improvement through mini-game training sessions, but basing it in a world of real competitions gives it a strong appeal.<br /><br />I loved NSS3, so was always looking forward to this. Then one day it was revealed that NSS4 would be in 3D, and I think I probably bit my tongue hard. The previous game's 2D mode had only just been introduced and made for an excellent game, and I was skeptical that the same gameplay could be carried over to an extra dimension.<br /><br />It managed it. In fact, it more than managed it, as I rate the new game even higher than its predecessor. The fully analogue controls certainly help matters, and everything here feels right. Players have a very satisfying weight, which is very evident in-game with stronger players pushing others off the ball and using their bodies to hold possession. After sufficient training, I was able to dribble between gaps in the defence and rely on my player being able to hold off the jostles.<br /><br />Graphically, it's an interesting one. Up close, the angular players look robotic and blank, and you pine for the pixel art of NSS3. Yet at a playable distance, the bold colours and minimal textures give the game an almost stylised look.<br /><br />It's not without its faults. Although you can play as a goalkeeper, it's a virtual afterthought with the CPU taking control of everything bar your own positioning, and no training challenges are available. Thankfully, this is already being looked at for a future update. If the controls are as simple and effective as the outfield play, this could be a tremendous feature.<br /><br />Regardless, it has me hooked, with the same addictive feel that saw me pump so many hours into the last game. And, I guess, it's nice to see FryGUI holding up well in an actual release!<br /><span style="font-weight: bold;"></span></span>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-20623502.post-65287572451858027062008-12-22T04:19:00.002+00:002008-12-22T05:06:00.399+00:00<span style="font-family: verdana;"><span style="font-family: verdana;">Yes, I'm still alive.<br /><br />And so is the game.<br /><br />The refactoring kept on going through that delicious blogging hiatus. As I had said before, everything is so much smoother with the competitions and although there are still things to go, I'm pretty confident that it was worth all the effort. I was setting myself up for major headaches further down the line with the old system, so the streamlined one is a great improvement.<br /><br />I've been thinking recently about what the game consists of, and I think I've got it broken down into five key areas.<br /><br /><span style="font-weight: bold;">Competition Engine<br /><span style="font-weight: bold;"></span></span>If football games were a car (and oh, how people seem to love treating them as as metaphorical automobiles), the competition engine would actually be the network of roads on which they drive. Except, er, inside the car. So a satnav perhaps. Oh, I dunno.<br /><br />Anyway, the competition engine's job is naturally to manage the competitions in the game. It has the structures, generates the fixtures, deals with the results, and so on. This is the area of the game that's most complete at the moment, with only a little bit more tidying really required. It could have been so much easier, but I wanted competitions to be accurate, so the complexity ramped up.<br /><br /><span style="font-weight: bold;">Navigation<span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><br /></span></span></span></span>The steering wheel, I guess. And maybe your pedals, handbrake and gear knob. Heh, knob.<br /><br />Off the pitch, this is your interface with the game. You need to be able to view competitions, clubs, players, and a host of other information in a clean and accessible way. It's underdeveloped at the moment, as it's just a testing area for the competitions. Thus, it's pig ugly, has a host of bugs, and doesn't actually allow for anything other than viewing competitions one stage at a time. Luckily, FryGUI's decent enough in my view to allow all this to be fixed.<br /><br /><span style="font-weight: bold;">Game Engine</span><br />This is your engine. Your car engine, that is. It drives the game forward, progressing through time. Actually, this is more like an entire car - electricals and all - than just the engine, because the game engine is split into myriad different parts that all do something important. It controls the game clock, generates news events, deals with off-pitch AI concerns, picks teams, selects squads, and anything else. If you click on a button that does more than just move you to another screen, the game engine is beavering away and carrying that out.<br /><br />Like the navigation, this is basic right now and serves only to test the competitions. The clock advances properly (hooray), daily fixtures are passed to the fledgling match engine, results are returned, and not much else. The core is there, but it needs a lot more to it - they will come as the features require them.<br /><br /><span style="font-weight: bold;">Match Engine<br /><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"></span></span></span></span></span>Every football game needs one. I dunno what part of a car it is though, so we'll just pretend it's the wipers. If you don't know what it does, you probably don't care much for the sport.<br /><br />This is virtually non-existant at the moment. I've got an old formation editor, a 2D graphics engine that works but might get chucked, and a bunch of notes on how I plan to approach the AI. It's simultaneously depressing and exciting - the most important part of the game hasn't even been worked on properly, but on the other hand, I get to make a football game and experiment with a host of control options and things that might work and might not.<br /><br />At the minute, fixtures are passed to this and random results are returned. It's all the competition testing needs.<span style="font-weight: bold;"><br /><br /><span style="font-weight: bold;">Data</span></span><br />Without data, you've got nothing. A football match cannot be played without players, is disorganised without teams, and has no meaning without competitions in which to play them.<br /><br />What's actually great about data entry though is that it's so passive. You research, you fill in spreadsheets or data editor forms, and it requires next to no thought. As such, on one of the many days when I've sat around bored, this is what I do.<br /><br />Right now, around half of the FIFA affiliated nations in the game have clubs, essential for any league to be created. Europe and South America have been created in their entirety, whilst Africa, North America, Asia and Oceania have work remaining - and this is before I get into creating the competitions and getting to work on players.<br /><br /><br />Reading that all back, it does seem like so little has been done and to a certain extent that is true, but as ever a lot is in the planning. The database structure is complete. The competition structure is complete. The game engine's core is complete. What's left is to bolt on the little segments here and there that make the game come alive, the internal details that turn a sterile world into something almost real.<br /><br />And also, I guess, to get some men playing football.<br /><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"><span style="font-weight: bold;"></span></span></span></span></span></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-58249445450023826832008-04-26T12:11:00.002+01:002008-04-26T12:49:28.489+01:00Warum hast Du nichts getan?<span style="font-family: verdana;">Well I wouldn't say that! I've done <span style="font-style: italic;">something</span>, it just hasn't been that major in the grand scheme of things.<br /><br />Ok, first up. The big three and a half month gap, what's with that? Well, various things happened in my actual life which slowed down development somewhat. I guess shit like that happens, but everyone's all the better for it. In a topsy-turvy period of potential house moves (I didn't in the end) and television purchasing (I did), it was pretty hard to find the time to sit down and really get stuck into the meat of the game. My mind, sadly, was elsewhere.<br /><br />As seems to be the case, when I finally got back into the swing of things I've been refactoring. This game's been in development for longer than some national football teams have existed (I'm looking at you, Saarland) and so some parts are much older than others, coded using methods that have long since been bettered, and there comes a time when trying to extend the old code to provide new functionality becomes so tiresome that it would be more beneficial to rewrite it. I've said this before. Maybe this is why the game hasn't been finished...<br /><br />So where once I had working competitions and league systems, now I have nothing but shells. Thankfully, pace has picked up a fair bit over the last few weeks and things are really thundering on, so I've made plenty more progress and I'm far happier working with the new code. Improvements have been made to a few areas and everything's so much cleaner.<br /><br />I've got some targets now, targets I'd like to hit. However, I know for a fact that if I mention them here I'll never hit them, so I'll just keep them to myself. Needless to say the next one needs to be hit by Monday night or GTA is going to delay everything.<br /><br />At least I still have Simon Read to keep me working on my GUI system, FryGUI. He has taken that module and done some great things with it in the latest in the <a href="http://www.newstargames.com">New Star Soccer series</a>, and he's been ever vigilant in finding bugs and recommending new features. NSS3 is certainly one of my favourite football games, NSS4 is coming along as a leap forward that's every bit as large as the leap from the second game, so get over there and take a look.<br /></span>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-20623502.post-73284981709523635412008-01-07T21:43:00.000+00:002008-01-08T19:22:35.047+00:00City 17<span style="font-family:verdana;">I've just been playing a lot of Half-Life 2 recently.<br /><br />Cities, though. They're fiddly things. Ask a guy in Manchester where Arsenal are from, and he'll tell you "London". Ask a guy in London, and he'll probably tell you North London. Or, if he's really specific, Holloway.<br /><br />Arsenal are a big club, known the world over, so it's fair to say they're from London, just as Everton are known to be from Liverpool, Rosenborg from Trondheim, and so on. They're big clubs in their areas, it's also fair to say that they can take their fans from across the entire city, although of course that's not always true (try finding a Cliftonville fan in Sandy Row in Belfast).<br /><br />Anyhow, as you go lower in these major cities, especially in countries where the game has many levels, you can often end up with many teams in one league professing to be from one city. This came up yesterday when I was researching the Victorian Premier League in Australia - every team bar the Australian Institute of Sport come from Melbourne.<br /><br />Melbourne has many parts, and each of the teams represents a particular part. Preston Lions, Oakleigh Cannons, Heidelberg United and so on all represent the areas they're named after. I could split Melbourne up into these constituent parts, but then if I searched for teams from Melbourne, I'd get Victory and Knights, and no-one else. So I figured they'd all be from Melbourne.<br /><br />That's fairly good, although it does mean that the game would need extra code to stop treating every game as a derby, when they really aren't. It's also at odds with the situation in London.<br /><br />The English leagues in the game are modelled down to the tenth level. As you drop down as low as level seven in the pyramid, teams from London tend to play in different regional leagues to each other, and the lower you get the more this can be apparent. Obviously, stating that they're all from London means that the clubs would be placed in the wrong divisions, not to mention creating several thousand London derbies each season.<br /><br />So London is effectively split up in to its constituent areas and everyone's happy until you try to search for London clubs and none show up. Bah. I could try adding the major city to each place name, such as "Fulham, London" but it's not the cleanest of solutions.<br /><br />I don't know why it took me this long, but I figured if I just add another field to each location in the game that allows me to say it's part of a larger city, it'd solve all problems. Search for teams from London, you get them all. Search for those from Holloway, and you get Arsenal, and if Arsenal turn to poo after Wenger leaves and drop down six divisions, they'll still be in the right place.<br /><br />This doesn't make you as happy as it makes me, but I don't care.<br /><br /></span>Unknownnoreply@blogger.com2tag:blogger.com,1999:blog-20623502.post-11247587417047172182007-12-30T20:36:00.000+00:002007-12-30T20:40:47.238+00:00I'm still hereThree and a half months, eh? Blimey.<br /><br />The reason for that unsightly delay is pretty much that I managed to land myself a job, and as such haven't quite had so much time to work on the game in recent times. Most of the work I have been doing is data entry, which isn't really that exciting.<br /><br />I'm currently in the process of getting a match engine up and working, which is coming along reasonably well but without players it's all a bit pointless. I keep hitting a hump when I approach it and end up running off to fill in Korean football teams, but unfortunately no amount of teams are going to make an adequate substitute for the actual football so I've got to push through that.<br /><br />When I get a match engine in, however basic, I can then get a working alpha ready. Pick a team, play games, have fun, and little else but it's a good platform to build upon.<br /><br />Next update: March 2013. Well, hopefully not.Unknownnoreply@blogger.com3tag:blogger.com,1999:blog-20623502.post-84595766257686503002007-09-13T18:24:00.000+01:002007-09-13T19:03:16.830+01:00Content!<span style="font-family:verdana;">Over the last few weeks I've started putting some real content into the game. With lots of the competition engine in place and working, the game can now support the leagues and cups that form the backbone of the entire football world, and it's actually quite exciting to see this take shape.<br /><br /></span><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEmJzQ4L61BnzTM4GOHFfHnLkVU51pOsZhuWX1A1MzjwpCpKkI2YNP1GI0LzKtpjbvdYoc5iDQ7cii3RNFZUX4o0yi1mdv3NtltNyrtQL7d1vmPM3eLNNjTSTxM_x6zqb_2YME4w/s1600-h/Picture+2.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEmJzQ4L61BnzTM4GOHFfHnLkVU51pOsZhuWX1A1MzjwpCpKkI2YNP1GI0LzKtpjbvdYoc5iDQ7cii3RNFZUX4o0yi1mdv3NtltNyrtQL7d1vmPM3eLNNjTSTxM_x6zqb_2YME4w/s320/Picture+2.png" alt="" id="BLOGGER_PHOTO_ID_5109744287697525666" border="0" /></a><br /><span style="font-family: verdana;"><span style="font-size:78%;">Wahey! Work in progress pyramids! Eat that, Pharoah!<br /><br /></span></span></div><span style="font-family: verdana;">Thus far, as I've decided to now indicate on the right hand side of the blog, the game contains the team data for three countries. Only England has competitions as yet, as the more I add at this point the slower the game gets to set up, but adding new ones can be done nice and quick these days. For England, I've got all the leagues down to Step 6 of the National League System, which is level 10 overall. 47 divisions in total, which took me bloody ages so people had better be grateful and start playing as Sport London e Benfica or something instead of Manchester United all the time.<br /><br />Cup wise, it currently has the FA Cup, League Cup, League Trophy, FA Trophy, Conference Shield and FA Vase. The League Cup hasn't been fully modelled as the game still doesn't have the ability to reseed teams to keep everything neat, so the differing numbers of sides in European competition can't be done until then. In Scotland, I've got the teams for all senior and junior sides, so that's quite a few teams to choose from and was done purely to placate any Bankies fans. Wales is proving more difficult as club information is scarce. The Welsh Football League, which covers the south of the country below the Welsh Premiership, is pretty good on this front as their website gives me all the information I require, but the three leagues feeding the Cymru Alliance have only scattered information. I'm endeavouring to include them though, because last season Barry Town got relegated from the WFL Division One, and the ability to return them to their former glory would be nice.<br /><br />For each league, I have a spreadsheet - we all love speadsheets. As well as the club name and some abbreviations, I have the year they were formed (adds a nice enyclopaedic feel, I think), their rough ability, their home kit, home town and stadium. When deciding whether or not a level will be included in the game, and assuming the level is strong enough to be worth while, I have a look to see what data I can collect. The absolute required info for every club is their name, strength and home town, and these are all fairly easy to come by. The strength is added so that when I generate fake players for the majority of clubs, the game will ensure that things feel right - no superstars plying their trade with Cefn United. The larger sides also get strengths but these will be altered later when more accurate player details are entered.<br /><br />The real difficulty comes with finding kit details. When creating clubs, I'm only concerned with the home kits, and generally a great majority of accurate kits is required for any given level. Away kits are ignored mainly because they slow me down for detail that changes far too often anyway. Like players, I can go add accurate away kit data for the bigger clubs, and have the game generate suitable away colours for the other sides. It's really just a time issue.<br /><br />So far there's over 1,250 teams in the game. Now if I can get them to play football, that would indeed be brilliant.<br /></span>Unknownnoreply@blogger.com5tag:blogger.com,1999:blog-20623502.post-32955613315915028272007-08-16T23:23:00.000+01:002007-08-16T23:36:44.254+01:00Tiny little bug<span style="font-family: verdana;">It's always the little ones.<br /><br />Today I was developing the league ranking system, essentially a way for the game to record the finishing positions of all the teams in a league, and also for the teams to be ordered correctly. This can then be used by competitions to determine seedings, or collecting only the top 8 teams to play.<br /><br />While testing this out I was frustrated for several hours by a bizarre error. At the end of the season, all the teams' rank information are updated accordingly. This is then followed by promotions and relegations, which involves updating the current level each team are playing at. Irritatingly, doing so tended to set the "rank level" - the level the team were playing at last season - to 0, the highest level available. As far as the game was then concerned, if Cardiff City won the Championship, they're ranked as high as Manchester United.<br /><br />After a while I had traced it down to the exact function that sets the current level. A function that simply should not fail. I feared the worst - if a part of my database storage and retrieval code was broken, the entire database could be compromised. Sure, I have backups but I'd still need to find out the error, and if it's damaging I'd need to code an entire routine to reorganise the data and ensure it's fine.<br /><br />Eventually, and naturally, I traced it to simply using the wrong variable at a crucial moment. My database works by only using the required storage for any given maximum data value in a field - if the field holds the numbers 0 to 15, it will use four bits. The next four bits in the byte will be used by something else. This enables me to store a great deal of data in a much smaller space. In order to store two values in a single byte, I need to be able to "mask out" the irrelevant data at any given point. This was the broken bit, with the code therefore ignoring the masking and wiping the entire bite before storing my data.<br /><br />I think, but currently have no proof, that this error was the cause of a few other issues dotted here and there with some competitions "forgetting" what league they were part of if I edited them after setting the league up. All it would take is one editing of a preceding value and that data goes out the window.<br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-77578527234611537062007-08-12T21:12:00.000+01:002007-08-12T21:47:50.981+01:00Ups and Downs<span style="font-family:verdana;">Individual competitions are almost complete. The engine is fully capable of coping with differing numbers of entrants, so there are only a few things left. Chief among these is the existence of what I've been terming the "half group" structures. The most prominent of these is the MLS - two groups, but with matches not restricted to those in your own group. Yesterday I discovered that it's not just the Americans using this system, and that any Englishmen still bitter at those "damn Yanks" for calling the sport soccer need to have a few words with some of the powers in their own garden. At the non-league level, at least<br /><br />The Northern Premier League's first division was restructured this season in accordance with the FA's plans on sorting out a clear league pyramid. Unlike the other leagues at this level, the two created leagues (North and South) only have 18 teams, instead of 22. This caused a bit of a fuss among the clubs because 34 game seasons aren't really helpful, and the NPL duly responded not by increasing the league size or another cup competition to make up the deficit, but by splitting each league in two - sort of.<br /><br />Each league is split into two groups of nine, on a regional basis. Each team will play those sides in their own group three times, and those in the other group once, thus giving an extra eight games each. Unlike the MLS, performance relative to the other teams in your group counts for nothing - it's the overall league table that matters. Whilst to the casual observer they don't seem to share structural DNA, the generation of fixtures and general workings are practically the same from my point of view.<br /><br />The English league itself has been created in the game now, down to Step Four of the National League System, or the eighth level overall if you prefer. Whilst doing this, I helped myself out by introducing a few handy functions and changing the way clubs get added to the database. I can now duplicate an entire competition, which is handy given that most share similar characteristics with few changes. The club spreadsheets I'm using, one per division, contain club info as well as their city and stadium. I've ditched seating information, largely because the information simply isn't conveniently available and to use it would slow the input process down. I reckon now I can add an entire division in about a half hour, including creating the structure in the game and adding it to the league structure.<br /><br />I make that about... oooh... 390 hours of work to get the world in there.<br /><br />The regionalisation of lower levels is working brilliantly, although a few hiccups earlier did give me a bit of concern. The first was the bizarre omission of Newcastle Blue Star from the NPL First Division North in the second season. As the northenmost club at that level (by some distance), they definitely should have been there. They weren't in the First Division South either. Well, not the right one, they were in the Isthmian League First Division South. It turns out that I'd added the team with the city "Newcastle-upon-Tyne", and omitted the coordinates because I knew the city to be in the database. It was, sans hyphens, and the game thought that Newcastle Blue Star play in the heart of the world, in the Atlantic Ocean off the coast of Africa. I can't be arsed coding in severely flooded pitches, so I just set them to the right place.<br /><br />I later got concerned that the game wasn't properly dividing teams up into Isthmian and Southern leagues, but I quickly discovered that I'd placed Bury St Edmunds in the West, not the East. Oh well. Everything else was positioned rather lovely, so I did a little dance.<br /><br />Promotion and relegation isn't yet done. I've worked out the process and in theory it's fine. Promotion is dealt with first, with teams promoted provided they meet the criteria, and provision is there for other teams to take their place if necessary. Relegation is then dealt with, and repreives are available if the number of teams coming up isn't enough.<br /><br />I then read about the Italian Coppa Dilettanti, a competition played in Italy between sides in the Eccellenza and Promozione, the sixth and seventh levels of the Italian league system. The quirk of this competition is that the winners are promoted to Serie D. I like quirks, so I instantly wanted to make the Eccellenza available, and thus this cup competition playable.<br /><br />Unfortunately, my league system doesn't cope with teams potentially being promoted more than one level. In fact, it freaks out completely and doesn't know what's going on, leading usually to the level in between the two having far too many teams. I could spend time devising a new system, but I've decided that for now it just isn't worth devoting time to a non-essential. Not when there's so much else to do.<br /><br />At the moment I'm looking at ways to make inputting the promotion data as stress free as possible. Currently I have to set up the data in the competition itself, and then let the league know where to expect the promotions/relegations to come from and what priorities to assign to them. I should be able to get some of that done quicker. Once that's done, I'll get the English system finished up and tested, and use that as a basis for working on the focus system and other details.<br /><br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-42399474809825622052007-06-20T16:12:00.000+01:002007-06-20T16:32:42.701+01:00<span style="font-family: verdana;">The circus that is the development of a unified competition system for the game continues unabated. The latest problem to rear its ugly head yet again is the concept of qualification.<br /><br />Currently, competitions in the game are static structures - a set number of teams from each rigid stage progress to the next stage, and the parade continues until the competition ends. Such stoic behaviour won't work for qualification, unfortunately. The problem arises when a team achieves a qualification place that it is incapable of accepting because it does not meet the criteria (for example, a B team winning a place in a cup competition).<br /><br />The qualification system in the game goes into specific detail about which positions qualify teams for other contests - instead of simply saying "the winners of the FA Cup will play in the Community Shield", it's "The team who win the final of the FA Cup". It's a subtle difference, the accuracy allowing for any position at any stage of the competition to have an associated qualification, one that can't be done by simply taking the "top six" teams.<br /><br />If a B team, or another undesirable side finish in one of these positions, the system also can specify a number of backup positions to consider. For the most part, this should cover the loss.<br /><br />However, I can't possibly guarantee that enough teams will qualify. It is possible that the backup list will be exhausted (perhaps they're all B teams?) before the places are filled. Rather than grudgingly accept the teams into the competition, the alternative solution is to allow the competition to continue with a dearth of teams.<br /><br />So, the formerly rigid competitions need new functions and rules to ensure that they work adequately in any scenario. Knockouts are easiest, as the system reduces the number of teams in the early rounds and creates more byes in order to ensure the final rounds are fully populated. Leagues are fairly simple, requiring the game to work out how many rounds need to be played given the new number of teams. Group stages may prove more complex in the face of the varying ways of distributing the teams but I'm sure an adequate solution will be found.<br /><br />All of which has been rather annoying for me, as I was hoping to start creating European leagues and cups starting tomorrow. That will have to wait until I'm happy the system can cope adequately with the changing data. It'll be worth it in the end.<br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-90658393716213322572007-06-03T18:28:00.000+01:002007-06-03T18:45:32.413+01:00The hassle of Extra Tables<span style="font-family: verdana;">Some competitions, in the far flung corners of the world, aren't as straightforward as they bloody well ought to be.<br /><br />In Belgian's Second Division, for example, the eighteen sides play each other twice in a regular round-robin format. The top team at the end of the season will get promoted, and there's a playoff to determine which team will follow them. All very good so far, it's something that anyone in the UK can instantly recognise.<br /><br />Unfortunately for me, the Belgians didn't quite run with the same system that I'm used to. Instead of taking the teams who finish second through fourth and sending them into the playoff that also features a side from the top flight, they use a system of "periods". The 34 games are split into three periods of ten, twelve and twelve matches respectively, and the teams who "win" each of these periods will enter the playoffs. Only in the event of extra places needing to be filled, such as whenever a team wins more than one period, will the full league table be used.<br /><br />Ok, I can do that. I have the fixtures, so surely I can just tell the game to create a table that consists only of fixtures played in rounds 1-10, then 11-22, then finally 23-34. Three additional tables that I can use to determine winners. Easy!<br /><br />Belgium aren't alone. In the USA's Major League Soccer, the teams are split into two conferences and the top two sides in each conference advance to the playoffs, together with the next four teams with the best record. Again, this requires the creation of a table which effectively merges the two conferences together, producing a 13-team table from which the required sides can be plucked. I can do that too, right? Just collect all the fixtures and create a single table out of them.<br /><br />It's all quite easy to create new tables whenever you're using all the teams and all the fixtures. Sadly, there are times when that won't be possible. UEFA's World Cup qualifiers involve a playoff featuring whichever sides finished second in their group, and to complicate matters, certain results against the lowest sides are discarded when creating the table.<br /><br />Let me get this straight then. I need a system that will take a set of fixtures and create a new league table, discriminating against teams and results based on their position within a group, which round the match is a part of and who the opposition are? Bugger.<br /><br />I didn't really want to do that. Damn you, UEFA! It caused me no end of headaches trying to come up with a system which I considered fast enough to be worthwhile, but in the end I think I got there and I now have a working Extra Table system that can conjure up a single league table of no more than 30 sides, based on whatever criteria I specify. It works perfectly well so far - the only remaining test is to see if it successfully merges data from matches played across multiple stages - rather than listing Germany twice in the table, all results should collected together. I'd have tested that by now but I'm far too lazy to create a new competition to do it. Something for later.<br /><br />The next task is to create a working draw system for competitions, based on seedings, geography or downright prejudice. Well, maybe not that.<br /></span>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-20623502.post-53279318844469282832007-05-17T18:43:00.000+01:002007-05-17T18:53:02.245+01:00I'm not dead. Physically.<span style="font-family: verdana;">It's been a month. Probably a good idea to update, although I'm not entirely sure what to write. I'll have to actually go and read previous posts so I don't repeat myself, and so I can see how much I've failed. In the meantime, have a picture of a beard:</span><br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsZUM_-VAqURUSCgNdOykd69cFztJJ_qDkpmfk0xVWJkVg3l57V3KM7acJdZR86m-0Cep45LiJBHldnFFveUSq-cR0hyU3AVtKQKriL1Rt6ZP012jM7DXb8a1T5qKjrMExhtkXLg/s1600-h/Photo+17.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsZUM_-VAqURUSCgNdOykd69cFztJJ_qDkpmfk0xVWJkVg3l57V3KM7acJdZR86m-0Cep45LiJBHldnFFveUSq-cR0hyU3AVtKQKriL1Rt6ZP012jM7DXb8a1T5qKjrMExhtkXLg/s320/Photo+17.jpg" alt="" id="BLOGGER_PHOTO_ID_5065587191314055138" border="0" /></a><br /><span style="font-family:verdana;">I hope you've enjoyed that as much as I have. Perhaps more! Now then. Back at the start of the year I was working on competitions, and everything was going quite well. Then I shifted focus to the data editor, changed an awful lot, and had to redo most of the competition work.<br /><br />Thankfully, that has taken about two days (the rest of the time may have been spent scratching various parts of my body). Things are working again and are much tidier than before, so I feel a tad more confident that it will all hang together well enough to fool people into thinking I know what I'm doing. I've still got to add a bit of code that will sort a league table for me. The existing routine just assumes that you're using the same system as the Premiership - Points, Goal Difference, Goals Scored. That's fine but other leagues aren't quite so simple, with the number of flying mice having an affect on whether or not throw ins are worth an extra place or two in the table and all sorts of nonsense. I have a vague idea of <span style="font-style: italic;">how</span> I intend to do that, but actually doing it is another thing.<br /><br /><br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-75456841251971060402007-04-19T14:14:00.000+01:002007-04-19T14:15:56.606+01:00Viva Ecuador!<span style="font-family: verdana;">Viva indeed, as they've finally seen sense over there and stopped their habit of promoting teams halfway through the season. Now, whilst that made things very interesting, especially from a gamer point of view, it was always going to be difficult to cater for.<br /><br />Thankfully, that's no longer the case and as I'm not presently aware of any other nations doing the same, I can ignore it happily.<br /><br />Whoo!<br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-25667564779345419442007-04-06T18:58:00.000+01:002007-04-06T19:15:28.206+01:00Focus<span style="font-family:verdana;">Most of the time spent in the last few days has concerned teams. I've got a simple import function in the editor that will read data from a csv file, so I've filled it out with 189 clubs from the UK and Ireland. Not much in the way of data, just names, formation years and club colours, but also a team rating.<br /><br />One thing that irritates me about some games is that if the developers can't get the player data, they leave the team out altogether. Sometimes the team exists but cannot be controlled, they're there in order that certain competitions work accurately (for example, having a number of Andorran clubs in the game so that they compete in UEFA competitions), but in more extreme cases they just cease to exist.<br /><br />This strikes me as a mistake. Surely, when it comes to accuracy, the hierarchy is Real Players -> Fake Players -> Non Existence?<br /><br />I'm a one-man band at the moment. I may well be able to draft in some volunteers to help me out with player data, but there's no chance whatsoever of every team in the game having real players. Restricting the number of playable teams has a greater negative impact than having having them slightly inaccurate.<br /><br />Clubs in the game have ratings for more than just random player generation in the event of missing data. For a start, in testing the game I need as many players in there as possible, and working on real data just isn't quick enough. A quick routine in the code to flesh out every side and I'm ready to test.<br /><br />The second reason is due to the game's focus system. The less important the competition from your perspective, the less time you want the game to spend on it. By giving each club a rating that changes as players move and develop, I can generate reasonably accurate results for distant leagues based on club ratings instead of calculating individually. Speed is vitally important, it is a <span style="font-style: italic;">game</span> after all. More playing, less waiting.<br /><br />I've also tweaked FryGUI some more, and now it's possible to add new gadgets to the system without altering the module itself. This is perfect for game-specific features such as a league table in a football game - why do I need that in a graphic adventure? Gadgets are easily added, and the XML system has been revamped to allow for the new gadgets to be added so that the parser can recognise them.<br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-20280184652555335232007-04-03T17:43:00.000+01:002007-04-03T18:23:36.879+01:00<span style="font-family:verdana;">The match engine has been put on hold for now, every time I approached it I just got some sort of block. I think the problem is that the animation is utterly woeful, yet in order for the game to <span style="font-style: italic;">feel</span> right it needs to have these frames of animation in place. Things like dragging the ball when turning, swinging to connect with shots and so forth. Given that the rest of the game still has plenty of work to do, it makes no sense to keep running up against a brick wall and I certainly can't afford to draft in someone else to get those animation frames done for me. I'll focus efforts elsewhere and return later with a clearer head.<br /><br />The first thing I've done is refactor the game's interface to an effective resolution of 800x600. As mentioned in earlier posts, I went with a larger resolution so that I had more room, more detail, and so that in windowed mode it didn't look like playing on a postage stamp. However, a few things since then have made me rethink the decision. The main one is my laptop, which has an SiS graphics card that has caused me a few headaches. Higher resolutions put more strain on the damn thing, producing frame rates that were satisfactory today but not something I could guarantee would be the case further down the line. For as long as these things exist, it makes sense to cater for them.<br /><br />But why do I need more room in the first place? I'm not looking to create a stat-heavy game on the outside, I want things to be clean and attractive without looking like a spreadsheet. 800x600 gives more than enough space to produce the game - in the past I developed a management title on a 320x200 resolution CPC6128 and it still included everything I needed. By restricting the space I just need to come up with better ways of conveying the data than throwing text around the screen, which is precisely what I want to do anyway.<br /><br />Leading me to the second problem - detail. I'm no artist, and with the match engine I already made the decision that higher resolutions will simply show more of the pitch rather than the existing viewpoint with more clarity. The same principles can largely be applied here - less resolution means a greater margin of error. That's not to say I'll be making a half-hearted effort or even relying on my own dodgy art if I can't get it up to scratch - absolutely not. I'll be striving to make the game look good. Lower resolutions keep the download size down as well, which might be nice given the database size.<br /><br />As for the windowed mode, well, my GUI is fairly powerful as it is, but more tweaking should allow me to display it in any screen resolution simply by adjusting the OpenGL or DirectX properties accordingly. As a result, you could play in a 1024x768 window if you like. It won't even have to be all scaled if I've got my numbers right, as it should be possible to get the GUI system to adjust the locations of gadgets if you choose any other resolution. All the different resolutions will be supported in order to get the game looking right on LCD monitors, but the only difference will be some things look sharper.<br /><br /><br />In slightly related news I've spent a lot of time in the last week (when I wasn't lying around in frustration with the match engine) playing LMA Manager 2006 for the Xbox, which I managed to get for about six quid. I'd be lying if I didn't say that the game's attractive appearance on my telly wasn't a major motivating factor in the switch down to 800x600, they've done a wonderful job there. But there are other aspects which, whilst traditionalists may scorn upon them, have an awful lot to say in how much I'm enjoying the game. The stadium building aspect is like toying with Lego, and that's always fun. You can browse every team in the game and have a look at their stadium, most of which appear to be reasonably authentic. Sure, they're not the incredibly detailed representations that surround the pitches of FIFA 07, but where EA's effort has 51, LMA's number in the thousands, especially when you include your own concoctions.<br /><br />It adds nothing whatsoever to the management aspect itself (where the game does reveal itself to be very shallow in comparison to the main PC efforts), but does an awful lot for atmosphere, and personally I find it a motivator. I'm managing East Stirlingshire, there's no North Stand, just a brick wall behind the goal and every match day I can plainly see that there aren't many fans there. We averaged about 430 in our first season where we nabbed promotion against all the odds but with a capacity of 1,880 there's no need to take any of the investors up on their offer, we're good for another while. Eventually though, we'll need to expand. When Firs Park has a 60,000 capacity stadium and every game it's packed to its fullest with drunken Falkirkians, I'll know we've made the big time. As big as time gets in Scotland anyway.<br /><br />Stuff like that interests me in a game, because it stops your mind from wandering. There's no questioning the accuracy and depth of Football Manager's simulation but text screen after text screen can grind a man down, and blobs engaging in an entertaining game of football makes it all feel somewhat sterile. It's a game that needs a technological advance or two to really start getting the blood pumping from day one, rather than requiring several game-seasons of play to really sink in. Playability is most certainly everything, but every now and then you need the visuals. You need to treat yourself.<br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-47578256625648338092007-03-23T17:35:00.000+00:002007-03-23T18:38:41.223+00:00Dribbling<span style="font-family:verdana;">Things have been going in a certain way that immediately brings such non-words as "poocrapular" to mind. The last three weeks have been focused on getting some people playing football, and this has revolved around several areas of frustration.<br /><br />The first is the fact that I can't have little people playing football until I have little people. I'm not a terrible artist but nor am I particularly adept with the human form, so after much frustration I finally got this lot done.<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3jFxPR-cxiboVT5QrWUzEdniT2G_wxRyKDPguCQlswlDOhdn851XLv0y8GqCrmElHpApfPwORBOfRs4qFpf4AgRr6ISh7qbmbabMAoXrtNi4ojGjQmiD9Ae-6mSlRp-gQh7e8qg/s1600-h/Player.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3jFxPR-cxiboVT5QrWUzEdniT2G_wxRyKDPguCQlswlDOhdn851XLv0y8GqCrmElHpApfPwORBOfRs4qFpf4AgRr6ISh7qbmbabMAoXrtNi4ojGjQmiD9Ae-6mSlRp-gQh7e8qg/s320/Player.png" alt="" id="BLOGGER_PHOTO_ID_5045179383424486946" border="0" /></a><span style="font-family:arial;"><span style="font-family:verdana;">As you can see, they aren't the best looking animation frames in the world. For a start, they're far too exaggerated so I've got some freakish loon waving his arms all over the place when he so much as attempts a light jog. And I'm pretty sure he'd actually break his legs if he ever tried to run with that. But still, they're functional so it gives me something half decent to work from.<br /><br />Once I got the little chaps done, my next task was to get him running about. I've created a rather simplistic animation system, which I'll no doubt build upon as I go along (the same can also be said for the tilemap system, which will be updated with animation and transparency features as time goes on). I did a little bit of research and found that professional runners tend to run at about 180 steps per minute, essentially meaning three steps per second. So each frame lasts for a ninth of a second, and this was pretty easy to do. The game's physics engine (rudimentary though it may be) already had code to ensure it updates every 60th of a second, so the same code was used in the animation system to keep things ticking along.<br /><br />A running man, and not an Austrian in sight. Now what he needs is a football, and the ability to run with it.<br /><br />I've played a fair amount of football games in my time, and having recently upgraded my PSP to a PS1-emulation supporting firmware, I indulged in yet more online spending to grab myself another six. Across all the games, it seems that the representation of dribbling ability falls into one of four camps.<br /><br /></span></span><ol><li><span style="font-family:verdana;">The ball sticks to the player's feet. All the time. In other words, I can't actually see what the difference is between a good dribbler and a bad dribbler. <span style="font-style: italic;">Sample games: Actua Soccer, FIFA 98, Viva Football</span><br /></span></li><li><span style="font-family:verdana;">The ball sticks to the player's feet for a period of time. During this period the player has full control over movement, however when the time elapses he can no longer change the ball's direction. Thus, a better dribbler can keep control for longer. <span style="font-style: italic;">Sample game: Sensible World of Soccer</span></span></li><li><span style="font-family:verdana;">The ball sticks to the player's feet, but he moves much slower than his normal running rate. The better his dribbling ability, the faster he can move whilst maintaining this level of control. <span style="font-style: italic;">Sample game: New Star Soccer 3</span><br /></span></li><li><span style="font-family:verdana;"><span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"></span></span></span></span></span><span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"><span style="font-style: italic;"></span></span></span></span></span>The player nudges the ball along as he moves, just as you would in real life. The player can therefore only change direction when he's close enough to the ball to alter its direction accordingly. Better dribblers don't knock the ball as far as the poorer ones. <span style="font-style: italic;">Sample games: FIFA 07, Kick Off, Pro Evolution Soccer 6<br /></span></span></li></ol><span style="font-family:verdana;">I've never seen anything different. Seeing as this game is supposed put a lot of weight on the player's abilities, the first one can't be considered. A shame, as it's by far the easiest to actually do, but frankly I'm not sure I'd want a game where something as vital as a dribbling ability is entirely irrelevant. The second system, used by the official <span style="font-style: italic;">Best Football Game Of All Time </span>as voted by me, just now, places a large importance on ability but at the expense of realism - I dunno about you, but when I run the length of a pitch I'm still able to change direction and take the ball with me.<br /><br />The last two have their good and bad points, and it's hard to split them. It can be argued that they're both differing implementations of the same basic idea - where Pro Evolution Soccer's players knock the ball further so that they don't trip over their own feet, NSS3's little guys just take their time to achieve the same thing. Of course, if you delve deeper into Pro Evo's control system you'll find that you can slow yourself right down and maintain tighter control of the ball, while with NSS3 you can nudge the ball out from under your own feet to run at a quicker pace.<br /><br />For now, I've gone with the fourth system. In addition to being a fairly fine representation of how dribbling is, it also plays a part in goalkeeping - my own position in the field. When an opponent is bearing down on your goal and you feel like rushing off your line to smother at his feet, you need to time your advance with his own dribbling. When he nudges the ball further still, you need to be quick off the blocks to close down the angle before he can do anything else. This also applies to defenders, who will be looking to nick the ball away from a player when it's vulnerable. When the ball is stuck to a dribbler's foot, you lose these facets of the game.<br /><br />Whether or not this lasts depends on how it holds up in gameplay. There's no swanky 3D engine to get a closer look, and the players are sprite based which greatly limits the animations available. Yesterday I finally got a player to run with the ball in a manner that satisfies me, but until opposition stand in the way it'll be impossible to know for sure. One irksome problem is the game's perspective - when you're running towards the goal at the top of the screen, the ball is often obscured by your player. If you can't see the ball too well, how will it affect gameplay?<br /></span>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-20623502.post-1172877099818268182007-03-02T22:48:00.000+00:002007-03-14T12:38:34.483+00:00Deceptive<span style="font-family:verdana;">The central midfielder picks the ball up just inside his own half. He rolls a simple ball out to the wing where it's picked up and dribbled, unchallenged, towards the corner flag. Cutting onto his left foot, the winger lays the ball off to the unmarked and now arriving central midfielder who meets the ball beautifully and deftly slots it home through the obvious gap. All so simple.<br /><br /><span style="font-style: italic;">It's not fucking simple! It's fucking terrifying! There's nothing fucking simple about getting </span><span style="font-style: italic;"><span style="font-weight: bold;">any </span><span style="font-style: italic;">of that to work, not without tearing huge chunks of your own brain out and devouring them in the process in the hope that you might get taken away and never have to do any of this cunting shite ever again!<br /><br /></span></span>As you can tell, I'm not particularly happy at the moment. The little things that, when you're out on the pitch playing with even the more clueless folk out there, are so easy to do, become cunting tough whenever you actually need to put it into code. Let's take an example - there's a ball rolling in a direction, and you want it. So what do you do? You take note of where it's going and you get in the way of it. Easy.<br /><br />I spent the best part of a week trying to come up with the quickest possible way of getting my tiny little blobs to do that. I have pages and pages of worthless trigonometry, now. Worthless because those theories never panned out. Maybe I never coded them correctly, maybe they were wrong in the first place, none of that matters because it's a heck of a lot of wasted time - in thirty minutes I coded in what was initially a temporary fix that actually does a better job than any of my mathematical tricknickery.<br /><br />With that done, I turned my head to the rest of the physics. Balls should bounce off players, right? This would be easy if it wasn't for two things - first, I can't rely on the actual graphics engine for collision detection because I want the game to be able to process more than just the match you're viewing. The second irritance is that I never know what the hell a player is doing. Is he running? Where are his arms?<br /><br />"Where are my arms" is a question I may well have found myself asking random people if this had frustrated me any more, as I can think of little more immediately satisfying than blowing away the object of your anger whilst cackling like a 1920's Chicago mob boss. I would even have bought a cigar for the occasion, it would be that important.<br /><br />But it never came to that. I decided that as much fun as playing with little circles is, there's no real match for getting proper visual feedback. Instead of working with an abstract engine and Football Manager style blobs on a single-screen, overhead pitch before introducing the snazzier display, I've decided to go the other way. A pitch, a ball, a man (although I'm not fussy, so as long as it's bipedal I couldn't give a shit), and they'll fucking stay there until they've worked out how they're supposed to interact. Actually, I did get the ball interacting with the pitch correctly, but with an overhead view it's harder to see the bounce.<br /><br />So, over the last two days I've created a basic tiling system for the game. Tiling, if you don't already know, is simply the way the background graphics of the game get built - the pitch consists of several tiles which are laid together, and that's about it. In order to do this I knocked together a half-decent TileMap editor, and I made sure the drawing code could cope with flipping the tiles on the horizontal and vertical axes, to save me having to have four versions of similar tiles. It all seems to be working well, and about a half hour ago I managed to have a scrolling football pitch. Couldn't even get jumpers for goalposts though, I'm very poor.<br /><br />I've set myself a little personal goal for the end of March. If I can get something that resembles a playable football match done, I'm going to treat myself. As I have no money, it will have to be something small.<br /><br />And with Sensible World of Soccer on the way for the Xbox 360, I think I also need to have a major goal for around June 2007, get that done, and treat myself to one of those.<br /></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-20623502.post-1171577740094752792007-02-15T21:31:00.000+00:002007-02-22T20:40:32.310+00:00<span style="font-family:verdana;">Ok, a little later than I had hoped but today I started working on match engine elements. More specifically, the problem of devising the basic formations, and with that the positions a player will take up depending on the situation.</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/5444/2074/1600/929046/Picture%2011.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger/5444/2074/320/659139/Picture%2011.png" alt="" border="0" /></a><br /><span style="font-family:verdana;"><br /></span> <span style="font-family:verdana;">I built this editor today. The basic system is the same as that of Sensible Soccer, Championship Manager, New Star Soccer 3, Football Manager, and probably countless other management games out there. The pitch is split into twelve segments in a 3x4 grid, and players are given rough positions on the pitch for when the ball is in each grid. This is duplicated for possession (the Wibble in the combo box above referring to "With Ball", which any CM players might be familiar with).<br /><br />It's a starting point, and nothing more. The first big hurdle of football AI is getting a player to have an idea of where he's supposed to be, and you've basically got two choices. You can build a hugely complex module which factors in every known factor, from the number of players on either team to the length of every blade of grass, and results in a perfect position for the given situation at the cost of several billion clock cycles... or you can just use your intuition and do it manually, once. (Don't take the screenshot as an example of my intuition.... those are woeful positions for a left wing ball)<br /><br />Then you tweak. You tweak for all the little things - where's the ball, exactly? Is it safe to move? Will I have an advantage if I go over here? Why can't I get enough alcohol home from the shop in one trip?<br /><br />Tweaking, when we're worried about clock cycles because you want to process as many matches as possible, is cheap. Stick a bag of grass in front of a sniffer dog and he's going to find it much quicker than when you shove it up your... chimney. Mainly because a dog isn't a burrowing animal. No, not burrowing.... chimney sweep. Yes... that will do.<br /><br />I've decided upon 38 unique positions a player could possibly have, and they're on the right. The guys who play in the centre each have five different values because there are always differences depending on how many are playing at the back. A flat back four doesn't want to have any of its players assuming the same role as a the middle guy in a back five, so I've tweaked accordingly. I've also thrown in three sweeper positions just so you can too.<br /><br />What I haven't done is take into account how positions change depending on the other guys on the pitch - having a central defender might well change where the "ideal" positions are for your centre backs. But to throw that into the mix would mean my list of positions would be a lot greater, and worse it would be more complex to actually devise the individual formations.<br /><br />The theory, at present, is that these are created simply by using the defaults. Two strikers in a 4-4-2 will always begin their position-finding routine at the same place as two strikers in a 4-2-4, where the other guys are the "advanced wingers" as I've put it. The routine ought to change those positions accordingly to best use the space available.<br /><br />If this theory falls down, then I'll run with the ability to change the positions for all the formations, but these defaults created will serve as a simple method for giving me a base from which to build each formation.<br /><br />Elsewhere, I've been working on player generation, which I'm mostly happy with but clearly there are a few things that need ironed out.<br /><br /></span><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/x/blogger/5444/2074/1600/677162/Picture%2012.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/x/blogger/5444/2074/320/965942/Picture%2012.png" alt="" border="0" /></a><br /><span style="font-family: verdana;">The first, most obvious one if you check that screenshot is that player names are a little on the poor side. These guys were all randomly generated (and I've added a flag to them so I can remove them with ease), but the existence of chaps like Sabatino Greenwood means I need to work on a much better method for creating player names. At the minute, all the English names are kept together, which is lovely when you get William Carr, but not so nice when Ciaran El-Salahi rears his ugly head </span><span style="font-family: verdana;">(he's not there on the screen before you look for him, but he did come up once).<br /><br />The flaws don't end there - the physical characteristics haven't panned out too well yet either but then I knew they would be borked from day one. It's entirely random at the moment so when you get several seven-footers with light blue dreadlocks and bum-fluff moustaches roaming the midfield, you can't really say you're surprised. I'll work in a normal distribution there to the generator to ensure more <span style="font-style: italic;">n<span style="font-style: italic;">ormal</span></span> people.<br /><br />What are working well are the routines that deal with player attributes. Positions are linked, so if the game sees fit to throw up a centre back, there's a chance he could work well in a defensive midfield role, or even as a full back. Attributes are then linked to positions, depending on competence in that role - a natural striker is throwing up strong finishing and movement, whilst a reasonable defender might not be a great tackler, but he won't be shit at it either.<br /><br />This early random generation means I can knock up a number of teams for use during the development for the match engine, which should hopefully prove invaluable. Better still (can something be better than invaluable?), when the match engine has reached a solid, playable point, I can swiftly create and populate enough teams to turn a collection of reasonable looking screens with no real purpose into an actual working game. At this point I will stroke my beard and proclaim victory over the elements, chiefly boron. I have issues with boron. Don't ask.<br /><br />Finally in a lengthy blog post, work continues on FryGUI and I'm hoping to get the latest release out this weekend. A lot has been added since the last version, the most spiffing of which being the inclusion of a canvas gadget, but there's also a few image buttons (of the rectangular and circular kind, too) and some other smaller stuff. Oh, and I wrote a new data editor for the game (that'll be it there in the second screenshot), which started off annoying because I think it's the fifteenth so far, but it works cross platform and is significantly more attractive than the drab, grey look. One problem with it is that I can't cut and paste, and more annoyingly I don't think I will be able to on anything other than Windows, but I'll see if I can build a character map or some other form of adding the rarer characters </span><span style="font-family: verdana;">into FryGUI.</span><span style="font-family:verdana;"> </span> <span style="font-family:verdana;"> </span>Unknownnoreply@blogger.com2