Ventures of an ex indie game developer

Machine gun dynamics

It's been long since last post, but I haven't been lazy. Networking is working well, at least on low latency, but I suspect it will do fine on lousy connections as well. I'll implement some network queue which just holds on to the packets for some time to test it later on.

Right now I'm working on the machine gun. ODE, the physics engine I use, isn't very good at simulating a bullet, if it goes fast enough it would easily travel straight through a thin object. Also if the bullet was fired by Client1/tank1 at position (x,y,z), Client2/tank1 may well have moved into a position which overlaps (x,y,z) when the bullet arrives to Client2. And if the bullet was physically simulated you'd hit yourself. Even if the bullet was not allowed to hit oneself, it would still require some extra coding as to not be "pushed" out of oneself when it penetrates the hull of Client2/tank1. I don't like that type of special casing anyway, what if I want to add homing bullets?

Anyway, a bullet would require a very long collision detection geometry, as it travels so long between each physical simulation step, so it could easily bump into other bullets during flight, which would also cause it to be pushed out.

Therefore I'll make two distinct and fairly simple implementations: fully synchronized projectiles (suitable for slow grenades) and non-synchronized projectiles (for bullets or fast rockets). I'm soon done, it's going to be nice I think.

Then I've made two weapon types, already have support for two (or more) vehicle types, same goes for simultaneous players. Oh, and I added score board á la CS, just not as nicely designed. Hrm. So when this machine gun stuff is done I'm going to make one more level, which won't be just flat and dull, with some timeout mechanism to switch between them.

What's been lost in level design on multiplayer games today is doors. They've been gone for years! From the time of Spy vs. Spy in 1984 to Doom II a decade later there were plenty doors in multiplayer games. But at that point they suddenly disappeared. Entirely (apart from a few id Software titles, honorable mention of Quake). And I for one sure miss them! So I'll bring the doors and elevators from Doom II into my game, I think they'll be really nice.

My seven-year-old son requested that I add destroyables to the levels, so that I'll do as well. Anything dynamic is good. Let me take an example why. Aliens versus Predator 2 was in many ways a fantastic game. Although more than a decade old by now, it had a flora of advanced features. There were three campaigns included: marine, alien, predator. Each would constitute a pretty good game in it's own right. The marine campaign was scary for real in periodic moments, not a bad feat in those days, with a great story line. The alien could climb on walls and ceiling, jump 30 meters and do the headbite. The predator had it's four different types of visions which could reveal different types of creatures in each.

Even though the environment was very stiff, the story and the AI carried it along just fine. But remove those two elements, as we do in multiplayer death match, and what remained was a bunch of walls and floors with some madmen running around biting and shooting at each other. (It didn't help that the network code was poorly written.) The multiplayer experience was devastatingly boring.

Doom II had doors and elevators, which made all the difference to me. A plentiful supply of pickups and weapons allowed for variation of tactics, but nothing near the variation of game play in AvP2.

So my first multiplayer game will go dynamic in a big way. Vehicles, doors, elevators, dynamic obstacles, traps, revolving bridges, trampolines, jump pads and so forth. It will be ugly and have bad sound, compared to most other similar things available, but I believe it's going to be fun. The hard part is getting the controls fantastic on an iPhone/iPad, but I think I'm on to something. Time will tell. Now I'm off to the machine guns.

About the author

Mitt foto
Gothenburg, Sweden