Tuesday, October 29, 2013

Ammunition, Weights, Names and Sounds

We haz ammunition!

I got a basic ammunition system put in today. Each Hull and Wing has a max capacity for ammo and this is combined to give you a max ammo capacity when you finish building the ship and go to fly it.



Now the trick is setting up good scales for figuring the weight of the parts in conjunction with ammo capacities. I figured out some basic numbers but they need to change, I think.

(Base item weight) + (Ammo capacity) = (total weight of part)...... Or.. (Ammo capacity * 2) as currently the i'm assuming you need more mass/volume to support storing more ammunition and I just made them equal to keep things simple for now.

You can also run out of ammo and make the guns upset at you so they quit firing. Thats no bueno dude.

We haz weight!

It was pretty much just as easy as I had hoped, too. I gave all of the parts a weight float and grab that at the build time for the ship. It takes that total weight, divides it down (*0.05) to a magical number near what I want the mass to be and changes the Mass property of the ship's rigidbody component.


What I haven't done is have it update the ship's Mass every frame so you lose mass when consuming ammunition. That would be kinda neato, eh? Slug on over to the baddies, drag your direction into firing vector, unload gratuitous ordinance and feel the weight of a thousand suns lift from your figurative space shoulders while your top speed suddenly grows to 5x its previous amount.

Or, alternatively while trying to dogfight someone it is continuously screwing up your aim by changing the mass and directly affecting your control responsiveness.. Not so cool in that sense...

Names and other stuff

I laid down the basic variables for naming parts and all of the data I think I'll need to take the hangar GUI to the next level but I'm not sure if I want to do it for the free package since I want to use RageSpline for it and the regular GUI wouldn't improve much. I'll probably just leave it alone for now.

It should be gravy when I get it going though... Just mirror the variables into a hover box when you are building the ship or something. Who knows what it'll end up looking like.

There were a bunch of graphical changes on this build, new rocket models, effects, testing some things to see how they look, adjusting point lights on weapon effects, changing material/texture appearances etc...

Sounds... Oh those evil sounds...

Trying to get sounds to cooperate is not fun. Props to anyone making sound games or making games on a physical scale that is not normal. Anyone with tips/links on getting sound customization under control and making it do what you want with falloff, distance, parenting, etc.. please feel free to message me.

You can check out the WebPlayer Link if you want to see the changes.

No comments:

Post a Comment