Follow TV Tropes

Following

Implementing stealth into a SRPG

Go To

thatother1dude Ready to see true darkness from Land of the Ill, Annoyin' Since: Jan, 2001 Relationship Status: In Lesbians with you
Ready to see true darkness
#1: Sep 6th 2012 at 2:10:06 PM

Specifically, one in the mold of Final Fantasy Tactics, but with larger maps, more variable terrain, slightly larger teams (something like 10 vs. 10), a bigger focus on ranged combat, and the possibility to move, act, and move again in the same turn.

Stealth is something I think is important but I've got some significant problem planning out. I want to keep it from being too complicated (especially with respect to map design and AI) but not so simplified that it becomes stealth in name only (like being "hidden" means being invisible even when right in front of someone).

So far I'm pretty confident in this: The point of using stealth is escaping or so you can attack without your enemies being able to dodge, block, or attack you while you approach them. A unit comes out of hiding when they attack, end a turn in the open, or are seen while out of cover. Chance of being seen is based on distance, direction, time spent in the open, and relative sneak/hide skill.

I've gone through two main options at this point:

  1. Everything is visible except units hiding. Units hide automatically when they go into tiles that provide cover, like bushes. You can attack from cover, but this gives you away and you need to move around more to go back into hiding.
  2. Only the the map is visible. Each side only sees what on it that their units have a clear line of sight too. Hiding is something you start doing while out of light of sight before coming out to attack or sneak to new location also out of sight.

The problem with the first is keeping camping while under cover from being too powerful, and I don't know what to do when both units are close to each other but covered.

The problem with the second is that stealth is important, but I'm not sure I want to implement fog-of-war just for that alone. Seems like something that would make AI programming much more difficulty and lead to sides just failing to see each other entirely.

So does anyone have suggestion on how to alter either of those methods or entirely new ones? If you need some more background on the kind of game, I can provide.

Bisected8 Tief girl with eartude from Her Hackette Cave (Primordial Chaos) Relationship Status: Arm chopping is not a love language!
Tief girl with eartude
#2: Sep 6th 2012 at 3:10:40 PM

Solutions for #1;

  • Just make sure that the AI can account for hidden enemies (I don't know how you intend to implement the AI for your game, so I can't be more specific). Also make sure that once a unit's spotted, they are unable to hide again (in the same way as if they'd attacked).
  • Take proximity into account (either make it so that adjacent units can always spot an enemy in their line of sight or give units with enemies nearby a penaltynote ).

Solutions for #2;

  • Try giving both sides an objective to move towards to apart from one another (maybe a base of some sort) so the AI still has something to do if it can't detect anything.
  • Give certain units a penalty to stealth, so that they're easy to spot. Just to prevent the situation from coming about too often.
  • Have a default "search for the enemy" state for AI when they can't detect any enemy units (just have them move around at random. Or have them look at terrain which makes it easier to hide in or something or even have them "remember" and react to previous sightings and such like if you're feeling brave). Handwave it as them already knowing that someone is about.

If you want to see a good example of a strategy game with a stealth mechanic, I'd recommended looking at how the Nintendo Wars series does it, BTW.

TV Tropes's No. 1 bread themed lesbian. she/her, fae/faer
thatother1dude Ready to see true darkness from Land of the Ill, Annoyin' Since: Jan, 2001 Relationship Status: In Lesbians with you
Ready to see true darkness
#3: Sep 6th 2012 at 11:00:13 PM

Just make sure that the AI can account for hidden enemies

There's a lot to have to plan for there. Having them go to the last spot you were seen gives the basic effectiveness, but could lead to many an A.I. Breaker.

Also make sure that once a unit's spotted, they are unable to hide again (in the same way as if they'd attacked).

You mean not being able to re-hide on the same turn? That might work, or at least help.

Try giving both sides an objective to move towards to apart from one another (maybe a base of some sort) so the AI still has something to do if it can't detect anything.

Now that I think of it, this isn't that big of an issue. I'm planning for the game to be overworld-based instead of mission-based, so encounters will either be you attacking a fixed location (whether to clear it out or get something) or being ambushed. When you beat existing enemies leaving the rest out of view (and vice-versa), the ones still left will either come to where their teammates saw you (or where their allies were) or run away.

Give certain units a penalty to stealth, so that they're easy to spot. Just to prevent the situation from coming about too often.

Sort of what's planned already: bigger units are heavier, and if a unit isn't fast they have to spend longer out of cover going the same distance. Units also have varying size in how many tiles they take up. Although humans are all the same "size" in this respect, it will at least make sneak attacks while riding horses—or elephants—justifiably less viable.

If you know a unit will be found, you're discouraged from having them hide anyway: units that are discovered need to make an observe check to realize they've been discovered. If they don't they'll be as vulnerable to what are basically attacks of opportunity*

as said enemy would be to sneak attacks.

edited 7th Sep '12 2:54:23 PM by thatother1dude

Add Post

Total posts: 3
Top