Author Topic: How to Sensor?  (Read 1351 times)

Tiel

  • Archer
  • *
  • Posts: 30
    • View Profile
How to Sensor?
« on: 19 April 2014, 17:48:03 »
I was thinking about interesting ways to handle the RTS game trope of 'fog of war' in way that'd be authentic to my setting and what seemed to be pretty cool is implementing a radar of sorts.

Not anything too tricky, just having units be able to 'spot' enemies in a radius outside their usual view range without having a positive ID on what exactly it is. So, for instance, infantrymen A will be able to convey there are enemies nearby, but the commander will have to either risk units or get something with moar view to figure out just what the threat is. This would add a nice dimension to gameplay, I think.

My inspiration, SC2's sensor tower, handles it like so:


You can see pretty clearly that the red Warning Icons are indicative of zealots converging in on the Terran player's position.

In effect what needs to happen is for warning icons to appear over enemy units within a certain radii of friendly units - basically a secondary view range. In Glest, I'm not really sure how to do something like this. It might not even be possible. Given that, I'd be willing to try to code it in myself but I don't know where to start - my programming knowledge amounts to some basic lua and java at best. Any recommendations as far as that, or finding some Macgyver way to make this work?

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: How to Sensor?
« Reply #1 on: 19 April 2014, 23:58:11 »
SpringRTS has that, and is generally focused on more futuristic RTS games than Glest derivatives. Did you consider making your game in that?

Tiel

  • Archer
  • *
  • Posts: 30
    • View Profile
Re: How to Sensor?
« Reply #2 on: 20 April 2014, 01:36:22 »
Yeah I've messed with it, just really not into the TA style of things it sets as a precedent. Oh, and LUA anims. Those are a pain in the ass, too.

I plan to move to another engine later on (this whole thing is just me rounding out my skillset) but for now I'd like to get the proof of concept done in Glest because it's by far the most intuitive & friendly platform when it comes to rts.

MoLAoS

  • Ornithopter
  • *****
  • Posts: 433
    • View Profile
Re: How to Sensor?
« Reply #3 on: 20 April 2014, 07:05:51 »
Yeah I've messed with it, just really not into the TA style of things it sets as a precedent. Oh, and LUA anims. Those are a pain in the ass, too.

I plan to move to another engine later on (this whole thing is just me rounding out my skillset) but for now I'd like to get the proof of concept done in Glest because it's by far the most intuitive & friendly platform when it comes to rts.

Its intuitive for the tiny number of features it has yes. Also, don't you mean MegaGlest? Glest is a dead project.

I suspect that even just having icons could be nearly as cpu intensive as removing fog of war, depending on how often you run the calculations. I'd think it would be pretty hard to add this, although I don't mess with graphics much. If you're lucky, you might be able to find where it calculates units to show and add a condition stating that at show+x distance, display this default icon.