February 04, 2012

Go Big or Go Home.

While not necessarily my favorite saying I've always had an attraction to it. The primary concept is that nothing is worth doing only have way you should go all out every time and since you're going that far why not try to go even bigger and better than you'd planned. While you might think 640 player combat sounds insane now I'd like to remind you that it's more than likely that it will be possible in the next 10 years. This could likely mean that either a ps4 which hopefully won't be for at least another 3 to 4 years, or a ps5 (assuming they stick with the name scheme) would likely support such a network. This is primarily because of our estimated rate of expansion in networking tech and availability. Rendering all this would likely be very very easy by the time the networks can handle it assuming it's not already easy to render something like that considering what I've seen in some tech demos. In support of my claim I would like to point to a certain company however I'm not entirely sure their networking system actually supports all the players I'm thinking of in close proximity though I do believe it does I haven't had the opportunity to actually test it therefore I'll refrain from such evidence for now. Instead I'll think about some of the other minor "BIG" things.

For example I'll talk more about persistent world. While I originally set out to make a dynamically fracturing script system for all objects in the game world I found it to computationally strenuous and had to abandon the idea until tech could handle it or I find a more efficient method. I hadn't heard of voxel systems at this point or some of the interesting tech companies propelling it or I might have seriously considered it as an alternative. At this point I'd moved on to instancing which is the process of essentially reusing an object and simply changing it's locational and rotation values which saves tremendous amounts of resources if you can reuse an object enough. The instance generally uses the same info already processed by the system and therefore very little needs to be computed to reuse it. Taking advantage of this I found a method to successfully recycle objects particularly fractured objects that would all be destructible separate from each other so that destroying the original didn't destroy instances of it and vice versa. This is one reason why I can afford a 100% destructible world without worry of frames per second. The real secret to it however is all in the physics system which has been by far the most entertaining and frustrating part of the process. You'll find in a lot of initial systems that things don't like to fall because they have no reason to in a computer world. I've managed to implement a system that will make a building fall if it's not structurally sound anymore. I've also managed to incorporate this with other physics in the game to get a more accurate picture of how this building would collapse and how it's effected by gun fire and explosives. Separate from architectural physics I have an entirely different sub system for gun physics to determine velocity, bullet drop, wind and humidity variables, etc. The primary system used to determine damage dealt to a player is based on bullet velocity in a generally scalar form while most sniper rifles use a vector based system for more accuracy at range, and by that I mean realistic accuracy not processing accuracy. For more information I suggest a wiki page on the subject to understand it more thoroughly. To give you a vague outline you have a given bullet with a given mass that is accelerated to a given point which then begins to decrease over time until it hits an object in which it then is reduced by an amount determined by the impact angle and material accounting for penetration if the speed is not reduced to zero. With a player damage is determined by the force of the impact where as with buildings and environmental objects a special calculation method is required to accurately allow the bullet to pass through a surface if it passes through at all and may adjust the angle of the bullet and its speed though not necessarily if for example you're shooting through a paper door. If not for my system, shooting a paper door would stop the bullet instead of allowing it to pass through. Upon receiving an impact the object is then fractured based on various variables to determine how much of the object chips off or is destroyed. All objects have a given set of fractures already in predetermined shapes and sizes so this is a matter really of figuring out which "chunk" is removed.

The reason things do not reset is the server is kept running as is even if no players are connected and they're simply joining a game in session that only ends when I reset the server. So you'll again start with a clean map and just keep destroying it brick by brick until nothing remains, and among all that rubble you'll fine a lot of great combat and sniping holes and hiding spots in general which will be played almost entirely differently than when you were still able to go in and around buildings and subway systems. Though again until I can really support a large scale number of players this might be isolated to sections with only mid sized groups of players at a time. Even still it will be quite an epic battle every time. Going back to what I mentioned about squads it's time I break down the specific system. Squad 1 is the objective squad responsible for actually doing things. Squad 2 is the support squad which keeps Squad 1 alive and helps them get to the objectives. Squad 3 is the specialist squad including the only sniper on your team, your medic in the first two ranks or a different class I won't yet reveal in the latter two ranks, your heavy vehicle which is a tank in the first rank and a kind of mech in the latter ranks which gets progressively bigger by rank, in rank 4 it's literally the size of a skyscrapper and still controlled by one player, and last but not least you have your artillery man. The artillery generally doesn't see actual combat but is instead kept busy bombing everything as ordered by the leader of Squad 1 or 2 which share a very similar list of commands. Squad 4 is your vehicle squad consisting of an APC driver and gunner, and an aerial vehicle of some kind and its gunner. In the first rank there's either a hind or apache attack helicopter which carries squad 2 around and they man a machine gun or can repel down and provide additional ground support. In the latter ranks squad 2 tends to parachute down from the artillery controlled ac-130 type plane while the normal pilots are now cruising around in fighter jets defending the ac-130 against enemy jets, attacking the enemy ac-130 or providing bombing runs and other aerial support. If the artillery gun ship is destroyed Squad 2 has an alternative spawn which I also won't disclose just yet. The decision to remove the sniper rifle from the average player was for a great and many reasons but it really came down to a matter of scale. This game is so big I can't afford to ever let it turn into a sniping match and therefore each team only gets one sniper which may choose to chill with artillery in the first couple ranks and be a long range support or be a combat sniper providing support in closer range combat which still might be considered long range or at a distance but is much closer than chilling with artillery on the edge of the map.

I'm open to answering some questions if you have any. In the next post I'll describe leader powers and their ability to reward and punish the squad for listening or not to their orders and the squads ability to punish a bad leader.


  1. man sounds epic and complicated shame no ones concentrating on creating a generic physics engine that would in essence wrap around any game you put it into and gave a more realistic gravity feeling than just falling onto the lowest point and wind and whatnot. Your problem with these kind of games is computer power client side one of the reasons APB died was due to the heavy heavy cpu/ram usage with everyones personalised chars and cars and kill sounds etc etc.. alot of ppls comps couldnt handle 30+ totally unique people and cars having a war on a fairly plain map... shudder to think what would hapopen when a tank shell would hit one of your walls with 150+ bricks all flying off in their own direction.. Would look epic tho.

  2. I just realized I should space the text more and do images or something because it's like a giant pile of words, no wonder I'm having a hard time getting more readers...

    and zap, I'll do a special blog post just for you to vaguely explain how I made all this possible without revealing specific techniques other than the instancing which I already mentioned...