Weapondata.txt

I’ve worked a bit on AI recently.  It’s not in there, but almost!  (Of course, I’m talking about very basic ship movement AI here).  The data structures are in place and initialized, the ship update function is being called, I just need to drop in the computations to actually figure out what direction the player’s ship is facing and change the speed, then change the position according to the new speed.  Should be pretty straightforward.  I already do most of that for projectiles anyway.
But, what’s new:
Projectile properties are now read from weapondata.txt at runtime, as are enemy ship properties from shipdata.txt.
So, modders could open up weapondata.txt and change, say, the main gun’s firing cooldown time down to 5 and damage down to 0.1 and have a machinegun stream of bullets.  Or change the velocity on the shockwave weapon to something super high and lower the firing cooldown and have shockwaves bouncing around all over the place.  I actually did that by accidentally reading it in the data sideways, and it was a fun effect.  Firing weapons insanely fast seems like more fun somehow.
Now that I’ve got the function in place for reading stuff from a file into a data structure I’m comfortable with, I could conceivably do this with most of the magic numbers, like how big and fast the explosions are, how big the enemies are, how big the player’s ship is, how fast it is, that sort of thing.
Also: Enemies now do damage when they collide with you.  Well, they don’t move, so you have to run into them yourself, but the point remains.  Player HP is tracked on the screen.
The other big thing is now there’s an actual damage model for the enemy too.  I’ve intentionally made them pretty strong and the weapons pretty weak, just to make it easy to make sure it’s working.  One downside: The shockwave weapon now works in a kind of weirdish way, which is now obvious that everything doesn’t die immediately.  It does damage every ms to anything inside it.  So things near it’s center will take more damage, but just because they’re in it longer, so they won’t die immediately.  It looks weird to have stuff die after the “shockwave” has already passed them.  If I changed the graphics to look like an “energy field” or something instead of an obvious shockwave, I imagine it would seem less out of place.

Now that I’ve got a basic weapon system in-game, I’ve been contemplating some sort of power pickup system.  I know I want the player to steal powers, or eat powers, or something, from the enemies, but how?  Enemies drop powerups occasionally?  If so, how does the player decide which one of his two weapons he wants it to replace?  I’d like to have a solution that doesn’t involve pressing a key, to keep stuff simple.  I’d like to keep it kind of kirby style- have some short range, low damage weapon, maybe, that you have to kill an enemy with to steal their weapon, to make it more risky, like how it’s more risky to swallow a guy as kirby than use your power to kill him.  Keeping a risk/reward balance is important, and the payoff for having a new weapon to play with is large, getting it should be difficult.

ver12

This entry was posted in Design, State of the Game. Bookmark the permalink.

Comments are closed.