Friday, 28 January 2011

No game without cam-pain

I can do terrible blog title puns too.

Adding bits of the campaign code to the current game build (most code functions are written as stand-alone programs then added, this saves compilation time and lets me do some black box software testing on that module.

Now we have the campaign file loading and data structures initialising. This loads names, zones, base information, faction details and current unit deployments. Doesn't do anything else with them yet. Only Apache units are deployed currently. I've got some work to do on presentation. As you fly (walk etc.) into a controlled zone you're supposed to see some text (World of Warcraft style) naming the area and current security status (and like other game elements can be toggled). Needs a nice big outline font which I haven't picked yet, I'm using a flavour of "Boston Traffic" for some elements so I'll try that first.

After loading the campaign you spawn in the game world positioned in the command tent of your currently assigned base. A comms dish is right outside to quickly launch multi-player mode.

Apaches are positioned on the pads with a little added 'jiggle' to randomise position slightly for a more natural appearance. In the screen-shots you can see the floating 'helpers' over the helicopters, these display info on that vehicle, flight name, ID, mission and crew assignment. Now we have the campaign data to look at I'll add more data.

If I have some criticism of the game so far it's some of the z-clipping artefacts you see on foot. Again its something I see in AAA games too and there's not much I can do about it, Dave and I have tried to mitigate it as much as we can. It's going to be one of those things that will get mentioned no doubt. It won't get in the way of the game and a small cosmetic issue, but one that bugs me still.

Things I'd like to add later, clouds (multiple layers) and procedural grass when on or close to the ground. Maybe have one or two terrain texture layers generate some billboard sprites for a grass texture, I don't know if that can be done at shader level, I suspect not so my initial thoughts were a treadmill of 200-300 billboard sprites updated when you move close to the ground.


Command tent spawn

Multiplayer comms tower

Apaches assigned to base pads awaiting assignment

Walk up to one and arm / mount

Spooling up

Take-off over the base

North to Herat

Entering nearest zone, some popup text needed

Yank and bank

Need procedural grass / scrub I think

Fly using HUD alone, don't look at the helo


Might make good wallpaper...


Some of the random 'jiggle' might put the tail end close to the edge of the pad. Need to bring the centre point forward a bit for Apaches. The centre point for the Apache model is just under the rotor mast. We add 0.5 meter random offset and +-25 degree rotation.

Still working on the ground AI spec, it has a 'supergroup' structure meaning a number of vehicles are treated as a single entity but each individual vehicle object in the group is responsible for seeking out its position within that group. Road following has me stumped since it's a bigger problem than you might think, worthy of a whole lengthy blog topic.

The functions for the COIN and event generation are still at prototype stage and changes every time I look at them. Once I add the AI/mobs to the campaign loader I'll add some blobs on sticks to represent insurgents, see where that takes us performance wise. I'm kind of scared a little to go from prototype to in-game, it's harder psychosocially to make changes once that happens.



Last few weeks

There has been so many little things to do, so much it's paralysing to think about, the trick is to hunker down and just do one little thing at a time. When programming output stalls it's been back to editing and refining documentation. I've been scouting the job market again, had a few interviews for various positions, phone interview at Codemasters was a bit strange since they didn't quite know what to do with me and Unity apps were not what I wanted to work on (they would benefit a heck of a lot from my back-end experience). But there's a lot more C# opportunities locally now and my 10 years of web app / database development experience should count for something (lot of interest there).

It used to be that I wrote this blog for the benefit of other team members so they can see what I've been up to. Now I'm mostly using it to reinforce thought processes for my own benefit but I do get some great feedback from some of the regular readers. And I can't thank you enough.



Parting shot

I also got into trouble for suggesting that other sims were not paying attention to general gaming conceits and being player unfriendly.  The resulting attack left me dumbfounded at first, which now just left me angry, angry at myself for being so apologetic but I agree that in context I shouldn't have mentioned those games by name when I was talking about general concepts. Peer review is something integral to software engineering. Game developers commenting on games? Surely not. Gamasutra publish industry opinions blogs and analysis daily and each item is open to critique and feedback. I'm not the most tactful of people but I'm honest to a fault.

State of the game

Well, lots to so still. If we had the budget for full time work we'd be getting a demo ready for Easter by now. As it is we're still pushing forward. The game design is crystal clear in my head, the working code is close to how it should be, there's some front end elements to add and the whole mission cycle is missing. It's quite thrilling to see the campaign loading and things beginning to effect what used to be a static world. So it's getting there one build at a time. Easily another six months work.

Monday, 10 January 2011

COIN dynamics

COIN: counter insurgency

Diagrams are way of communicating complex ideas. You might remember this diagram from around a year ago, it was published in the New York Times and quickly picked up as how complex the problem is.

Diagram of US COIN strategy in Afghanistan
Not intended for general media syndication is really only of interest to analysts skilled at looking at these kinds of complex networks. It was part of a larger document that in context made a lot more sense. It's even colour coded for guidance. Quite often it was ridiculed for being overly complex. How can anyone make sense of this?

Stepping back and embracing complexity can yield better understanding. Douglas Adams embraced these ideas in the 1980's with his Dirk Gently series, the idea that if you pull on a thread you tug on the universe.

OK, nice flamboyant ideas. What does this have to do with our simulation?

In Combat-Helo the "Side A" campaign has the same goal as this digram; "Increase popular support for the Afghan government" via a factional conflict in which you play a singular role. My task has been to examine these kinds of documents, identify game entities and feedback loops. I don't want to take away some of the mystery of how it's going to work in game so I can't talk too much about how this works. The military part of the strategy is only a very small part of the infamous digram which is where we focus our efforts.

For player actions to have a 100% positive outcome three things must happen in the duration of the players assigned mission (in order of practical difficulty):

  • Negative r factions adopt neutral disposition.
  • Neutral r factions adopt supportive disposition.
  • Retain support of existing friendly factions.

r = reputation with faction

All mission events by player and AI factions are processed this way, AI factions influence each other without direct player interaction.

When coding the campaign functions I needed a way to visualise three degrees of separation for the different factions (three pertaining to how populations or battle units are organised). Going with 3D network diagrams seems a logical choice so this week I'll be implementing a function to do that.

Taking a leaf from "Next War" on the ZX Spectrum, the end of phase command options allow earned, rare or one-shot influences over the whole battlefield.  Some of these need to be turned on their head in order to satisfy gaming conceits. Here's an example of some command options (only available to players marked as a commander, which is by default the group leader or host but transferable or jointly held).

  • Request Aid from High Command (schedules resupply of hardware if available)
  • Divert Resources to Local Services
  • Bribe Faction for support (cheaper to pay faction to not shoot at you than exchange fire all day)
  • Train local security force.

Low coalition casualty rates enable increases in coalition funding available each campaign cycle. High casualty rates increase political pressure (decreasing command options). Events which result in factional casualties are processed accordingly and directly influence the board. Factional standings at the end of the campaign cycle will be reflected in any gifted 'specials' or available command options.

Through the command options you can influence the three main processes that contribute to the Side A goal. These metrics weight event outcomes:

  • Development
  • Governance
  • Security
The latter being the focus of our game via your regular sorties on patrol and engagement missions. Hopefully that gives you some insight into what I've been doing this week, turning these ideas into a working design and prototype code before adding them as functions to the command tent terminal.

And also gives you some idea as to how our game within a game works. It has board game potential which is usually a good sign.

Sunday, 2 January 2011

Happy New Year - The Future, some assembly required

Thanks for the messages over December, to say its been a difficult time is an understatement.

Looking backwards to look forwards is a popular sport at the turn of the year. I was recently asked to add my opinion to virtual round table of developers on simulations and guess the future. You can read our collective thoughts and opinions in the article SimHQ The Future of Simulations - 2010.

Some very interesting points came out. The comment from "Fighter Ops" Julian Leonard on how bottlenecks have shifted from hardware to complexity is pretty spot-on, I'll have to steal that.

Everyone agrees how small the market is and like starving Victorian children gazing through the window of a tea-room, see consoles getting big numbers. In console terms, 5000 units is considered a total disaster (and as it happens figures for a recently released console skateboarding title), for us that would be a healthy figure. Console and PC markets are high-risk high reward vs low risk low reward. I don't see that changing in the future but we can borrow ideas from successful genres and experiment in applying them to games like simulations. Which is in part what Combat-Helo is intended to be, an experiment in simple presentation of complexity.

Console games focus on user experience, sometimes they get it right and sometimes mind bogglingly wrong. But mostly they work to adopted practices, anyone playing a $60 game has certain expectations. Such elements can go a long way to bring complex simulations to a wider audience.

And I'll cite perhaps the most successful next-gen game in terms of sales and community involvement with well over one million instances of player made content to date. What's surprising is that it's a point and click game development kit, not unlike several made before but presentation is everything in Little Big Planet. Sadly presentation costs huge amounts of time not available to niche market games.

What does this all mean?

I have no idea. Roll on 2011, the year we finally 'get to da chopper' one way or another. I have a ton of papers to scan and sort out this week then to look at my project planner which is looking very sorry for itself.

Happy New Year everyone.