FicEngine: ARSENAL
Hey all, this is the update I know a lot of people were waiting for. I figure the last few posts have been about relatively boring shit so here’s a fun one. For those that haven’t been keeping up, the FicEngine features a powerful, extendable, data driven, and easy framework for defining guns and ammo.
That framework is called ARSENAL.
Starting with Kill Dr. Cote, I had a fairly good system for guns, but it wasn’t great. Adding a new gun to the game was a pain in the ass- the gun and bullet parameters had to be coded in with the rest of the hardcoded munitions, and defining new bullet types (flames, for instance) was downright aggravating.
Not anymore.
I’ve taken the base work from KDC, and using it and games like it that use a huge number of guns (Earth Defense Force, Jets ‘n’ Guns, etc) as inspiration, I’ve succeeded in creating a system that handles any number of gun and ammo types flawlessly. Here’s a rundown of the features:
- Completely data driven. This was big on my wishlist, and it works wonders. Instead of code, guns and ammo are defined in XML files and can be changed without requiring a recompile. In fact, I can reload the guns on the fly, so I can pick up a gun in game, change some parameters, and the gun will match the new specs! So here’s how you go about making a gun. You have to define two things: the Gun and its Ammo. The Gun will have stats such as rate of fire, spread, its clip type (clips, no clips, or infinite ammo), a semiauto flag (for guns that fire once per button press- think the regular gun in Contra), reloading time (if applicable) and which ammo it uses. The Bullet has stats such as speed, size, damage, graphic, size, range, homing capabilities, detonation, penetration (think railgun) and all manner of effects (fire, flight, detonation, etc.) You can mix and match these parameters to create a huge number of weapons.
- Extendability. The data driven aspect makes it incredibly easy to add new weapons. Tweaking the existing munitions is trivial, and adding a new gun or bullet type altogether is also a simple, copy paste affair. Swapping out ammo types is effortless, allowing for things such as a shotgun that shoots 15 railgun bullets. And it’s stored in XML, so even players can experiment with new guns! In fact, one idea I have is a game designed completely around this concept: letting players create and share their own guns to combat an onslaught of enemies!
- Integration with game logic. This is where things start to get really cool. The guns and bullets are both types of gameobjects, and interact with the game world just like anything else. So you could say shoot the gun, and throw it through the air, and watch it fly through the game world spewing bullets the whole way as it flies and spins in the air. Or have Gun objects stationed around as turrets– they don’t have to belong to the player. Any situation where an object shoots out shitloads of other objects can use ARSENAL.
Stay tuned for more info on ARSENAL. One of my prototyping projects is a quick test bed called Ground Zero that allows testing of guns and ammo on various moving targets.
No comments yet.