Friday, April 02, 2010

A Lack of Control

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.

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.

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.

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.

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.

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.

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.

I tell you, this blog's like a Mac. Pays for itself.


Thursday, February 25, 2010

Year 2010 of development

Oh, how I do love my big long gaps between posts.

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.

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.

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.

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.

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.

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.

Then, I think, I might just get drunk.