Jump to content


Navigating the Minefield & Infinity Battlescape

Posted by Designopotamus , 16 November 2015 · 5,543 views

design weapons proving grounds blueprint
Navigating the Minefield & Infinity Battlescape

Howdy, Descenters,


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.
That's all pretty straightforward. Now we have a bomb that deploys and explodes when you go near it. Done, right? Just need to test it....


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.
Almost there... At least it's testable now, and a few tweaks get the behavior working well pretty quickly. Awesome! Now switch to my laser grids to make sure nothing got broken on those while I was messing around with the base gadgets. Oh, crap - nothing happened. Phase 3....
  • 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.)
Hooray! I can switch gadgets! And they both still work. (Gotta check that, too.) Now I just need to be able to pick them up. Fortunately, there's already a power-up built for the proximity mine, so that should be simple. Just add a few to the test map and pick them up, and it's time to move on to some other feature.


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.)
Now I can pick up gadgets! Lay a few mines, blow them up, pick up some more mines... and I only get 1? But I told it to give me 4.
  • 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.
Now, at last, the gadgets can undergo the full circle of life in Descent: Underground. Although I'd still like to hook up auto-switching on gadgets and make them spawn in groups instead of singly, at least we can get this out there in the Proving Grounds to test how they change the game balance. (And they will...)


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 !


Posted Image


It is worth checking out - for sure.


Thanks for your continued support.



  • 6

Cool, Infinity is back! :)

    • 1
  • Report
Sergeant Thorne
Nov 20 2015 12:47 AM

A revolutionary, impressive space game/sim. :)  Backed! (thanks for the heads-up, Descendant/Wingman!)

    • 0
  • Report

I always enjoy both your design blogs and design underground. It's not only fascinating but presented in a way that I find easily accessible. So, thank you. :)

    • 0
  • Report

Recent Comments