Well, we know you are allowed to take certain liberties with how technically accurate these custom firearms are since this will ultimately be for a game. With that in mind, it looks like the goal is finding a simple system in which to alter the attributes of the gun based using those of real-world firearms as a base.
I've actually thought about this problem before while daydreaming of a racing game with a fully customizable auto building system that would (theoretically) be accessible to any level of racing fanatic. (Kinda the same goal as Spore, only marginally more likely to be successful since the systems we are dealing with are much simpler to break down into components.)
The way I would handle it would first build a spreadsheet starting with putting on each row every type of attribute a gun has when firing, that would be relevant to the player as he is using the firearm in the game. (basically anything the user would notice, and therefore care about while building his custom gun) Recoil, ammo capacity, range/accuracy, etc... Then next to each row, using the knowledge of firearms you currently posses, list out every component of a gun that would likely affect that specific attribute of the gun. The point being that once you do this, you won't help but start putting the same parts in multiple rows, and get a general idea of each different type of thing that particular part has an effect on. (You can even take the spreadsheet and flip the data, so you instead have each row listing a gun part, followed by a list of attributes that can be changed based on changing that one part, but I'd suggest building the spreadsheet starting with the attributes first, and then basing any new spreadsheets on that original data.)
Using that spreadsheet, you should be able to get a good idea of how the variables that control's the gun's activity should derive from the component's used to build the gun.
For instance, lets look at Ciox's example more closely. It would stand to reason that larger caliber guns would in general do more damage, and such an assumption works fine for a simplified firearms system we want to emulate. The problem is that the size of the caliber doesn't directly affect the number of shots you can fire, which is totally dependent on the size of your magazine. But we do know that larger caliber bullets are bigger, and therefore does affect how many bullets your magazine can hold. The point being that it is something that shouldn't be ignored when choosing a caliber for the bullets of your gun.
If we are to make a balanced system that gives the player freedom to customize, it stands to reason that the player should be able to take both of these factors into account. So we do it in a logically intuitive manner. Instead of giving each clip a variable that says how many shots fit within it, give it a variable saying how much area fits within the clip. This minor distinction makes all the difference, and works when you use the caliber of the gun to derive the size of each bullet. That way, when the game decides how many shots your custom gun can hold, it builds the number dynamically based on both the size of the caliber and the size of the magazine, instead of one or the other.
Last Edit: August 28, 2009, 01:41:51 pm by EvilDemonCreature