On DECORATE Reloading
Posted: Thu May 11, 2006 17:57
I just finished blabbering about DECORATE and some of the different ways games do reloading. It strikes me as odd that I haven't seen any of the reloading style where you throw away a partial clip- everyone's been using reloading where it takes away from your total ammo count.
See, the reason I'm pointing it out here is because it's a hell of a lot easier to implement. Check this mock reloading code out:
Notice how there's only one decision in the whole code? And that's even copy and pastable! Bitchin! Sure, it means you can waste up to half the ammo you can carry, but all you have to do is double the amount of clips carryable to balance that issue out and make sure the player always has enough ammo for the job. (adding only a quarter might even be better)
Okay, enough selling the idea- what thoughts do you guys have on it?
See, the reason I'm pointing it out here is because it's a hell of a lot easier to implement. Check this mock reloading code out:
Code: Select all
AltFire:
TNT1 A 0 A_JumpIfInventory("GenericGunClipAmmo",15,1) //assuming that's like half ammo
Goto AltFire + 3
TNT1 A 0
Goto Ready
TNT1 A 0 A_TakeInventory("GenericGunClipAmmo",999)
TNT1 A 3 A_PlaySound("ClipOut")
TNT1 AAA 3
TNT1 A 0 A_TakeInventory("GenericGunClip",1)
TNT1 A 0 A_GiveInventory("GenericGunClipAmmo",999)
TNT1 A 4 A_PlaySound("ClipIn")
TNT1 AA 3
TNT1 A 3 A_PlaySound("CockGun")
TNT1 AA 3
Goto Ready
Okay, enough selling the idea- what thoughts do you guys have on it?