Navigating the Minefield & Infinity Battlescape
design weapons proving grounds blueprint
You may or may not have noticed that there hasn't been a Design Underground popping up on your favorite YouTube Channel today...
<- I can only blame this little guy for making life so difficult.
"Now, Rob," you may ask, "How hard can it be to put something into the game that just sits there and blows up when you get near it?"
Well, let me tell you: there's a long road between a simple concept and a full in-game implementation. There are a lot of moving parts that go into getting a fairly lightweight object into the game and having it cooperate with all of the other systems. Let's see if I can break down for you the whole story of the proximity mine. (I guess that this is sort of a written version of Design: Underground.)
- We had to assemble a gadget blueprint that combines the explosion, the audio, the in-game behavior, the collision detection sphere, and the actual art. The blueprint also had to provide proper launch behavior so that it didn't hit you - and explode on you - the second you launched it.
- We had to take the splash damage functionality - originally in the missile class - and pull it out into a weapon function library to be accessible to all objects.
But wait - no ships have proximity mines on them. So let's add proximity mine loads to each ship as our new default. (Some ships, based on the original balance calculations, will have mines and laser grids, but some only have proxies.) That led to a lot more steps than you might think...
- We originally had only one gadget - the laser grid - and ships didn't have an idea of a default gadget selected. Add that. To all of the ships.
- Like the laser grid, we don't want your initial loadout of mines to drop when you explode - just the extra ones. So we needed a base count for each gadget type (in addition to the current count and the max count). Get those added to all of the ships as well.
- Once there was a default gadget and a set of mines on each ship, it's testing ti... oh, wait: they don't show up when you launch the game.... Huh?
- It turns out that some of the functionality was coded with the assumption that the starting gadget was always the laser grid. Rip that out and make everything generalized:
- Make functions for getting a ship's stats based on the gadget type passed in. (Count, max, base.) Add this to the gadget component class which is attached to the ships.
- Make a function for setting the current amount of any given gadget, based on the selection passed in.
- Change the initial ship spawn behavior to get a current count of all gadgets and a default gadget and set the correct count and image on the HUD.
- Get key bindings set up for gadget switching. (Note to self to let John know to tweak the launcher to open up that control category behind the scenes on the next launcher.)
- Go into the gadget component class and set up the functions for actually switching based on the key/button press.
- Make sure that the forward and backward buttons work. Forwards and backwards. (Duh!)
- Just for completeness' sake, make switching skip any gadget category for which you have no ammo. If all of your gadgets are gone, don't switch at all.
- Research odd behavior and learn that in Blueprint, returning out of a loop does NOT stop the loop. On purpose. WTF? Fix that. Tell the other programmers. Make them sad.
- Add a sound for switching.
- Hook that up in the flight HUD. And the flight player controller. And the main HUD interface. And the main HUD. (Yes, there are that many parts for making the HUD communicate with the game and you.)
But it doesn't work.
- Go back into the HUD and base ship code and rip out a few more places that assumed that laser grids were all you wanted to know about.
- Make the HUD not change your gadget count if you're not picking up your currently equipped gadget.
- Make sure the power-up Blueprint itself is also using your gadget count, and caps you at the max. (Good thing that I made those functions in the gadget component to quickly get your counts.)
- Actually hook up the correct image on the HUD for the prox mine. (Whoops.... missed that.)
- Make a base gadget pickup class to be the parent of laser grids and prox mine pickups, so I don't ever have to do this again.
- Hook up that class to accept the ammo count from the base pickup class and pass that to the gadget component code that updates the FPC that updates the HUD...
- Check that the count of the prox power-up in the test map is 4, just to be sure.
Back in the game, lay some mines, blow them up, pick up some mines, lay them all down, make a magnificent chain reaction, wait for them to respawn...
Oh, wait. I didn't hook that up yet.
- Teach the power-up manager about respawning different types of gadgets. (So many steps, and my fingers are tired...)
- Teach the power-up manager how to properly drop excess gadgets when you die.
Wait... you can't access the Proving Grounds? But that's only one click away....
If you made it this far, I hope you enjoyed the ride.
See you Underground,
Wait, what a Double BLOG? Yep, this is Wingman dropping by and gravy training on Rob's most excellent blog to say there is a space game that is in need of our support.
Battlescape Infinity is a passion project that will have hundreds of people flying around shooting each other IN SPACE, and it is indie, so heck yes, we backed this.
There are 3 days left, the guys are doing a great job over there, if you are looking to back another TRUE indie space game, this would be one that deserves your attention.
And we need more INDIE Space games - right? RIGHT? HECK YES WE DO !
It is worth checking out - for sure.
Thanks for your continued support.