Visibility in a luck-driven tactical adventure: line-of-sight or something else for 3D?

Started by
8 comments, last by valrus 9 years, 7 months ago

(Edit note: the original version of this post didn't sufficiently focus on the topic I've actually wanted to discuss. I hope this one is more to-the-point.)

Hi all,

I'm trying to grow a game from a "tactical adventure with probability manipulation" concept. Right now I'm evaluating various approaches to the player/character viewpoint problem, and I'd be grateful for other developers' insight on this topic.

I expect the game to be part adventure/rpg, part tactics/stealth, which in my case provides the following requirements:

  • Adventure/RPG: hand-crafted set-piece puzzles; the ability to examine almost anything and interact with most of objects; looking for hidden objects (not always the same as pixel hunting). Large enough locations to explore; the ability to freely move within the locations.
  • Tactics: ability to achieve certain goal through the correct timing/positioning/use of the environment. The more degrees of freedom the situation has, the richer are the tactical possibilities. The ability to survey the "game board" at a glance is highly important for tactical gameplay, especially if it's in realtime.
  • Stealth: the incentive to act cautiously and attract minimal attention in general. Usually, the more suspense it provides, the better.

The "luck-driven" aspect in my case means that any random occurrence has a chance of happening -- which, in particular, implies that any corner, shadow and closed door may potentially contain a pleasant/unpleasant surprise, depending on the character's luck modifier. This forces the player to be more cautious and to not rely on a single plan.

Some of these requirements work better or worse with certain kinds of views/perspectives/projections:

  • Fixed views, Side view -- hardly the viable choices here...
  • First person -- good for investigating something in detail and hiding surprises from the player, bad for surveying the play field.
  • Third person (behind-the-shoulders) -- lets us to actually see the protagonist and is still good for examining things. On the downside, it lets the player to look around the corners and still isn't useful enough in the tactical context (however, if the game is turn-based or can be paused, tactical gameplay with it might be quite ok, I guess).
  • Orthographic/far-away view -- perfect for tactical aspects and allows for plausible out-of-frame surprises; as a side bonus, 3D models look more convincing from afar. Bad for examining things up close and searching for hidden objects; the player can see both much more and much less than the character.

The 1st and 3rd person approaches are rather straightforward to implement, but the orthographic one is more complicated. From what I know, there are several distinct ways to deal with its challenges:

  • Examining things in detail: a) switch to a 1st/3rd person view in such situations; b) when the player clicks on an examinable object/area (e.g. a picture/table/shelf/chest), a specialized UI is opened with a close-up view.
  • Making sure that everything the character is supposed to see is clearly presented to the player: a) design all locations with "no overlapping" rule; b) render every important object (or its outline) above everything else; c) make the obstructions (semi)transparent.
  • Preventing the player from seeing more than the character: this one has to employ some sort of line-of-sight calculations in any case, the difference is only in what's getting hidden. Some implementations just hide characters/monsters and items, others hide parts of the level as well.

The 3D line-of-sight effect in theory seems to provide the best of both worlds -- the game can seamlessly transition between close-up investigation and tactical planning views, both indoors and outdoors, without the view getting blocked or surprises being revealed ahead of time.

The obvious way to implement it would be to render a depth cubemap from the character's POV, and during the main pass to discard/make transparent the fragments that are "in shadow". However, after having made a test implementation, I'm not sure I'm happy with the results.

Do you think the see-through building is disorienting and/or looking surreal? The piecewise-visible character certainly is (however, the characters and such might be handled separately).

Also, either this kind of effect is very GPU-hungry, or my OpenGL/GLSL skills are really crappy (or maybe both), but among the 3 computers I've run the simple test scene on, only the relatively modern one (CPU: AMD A10-6700 APU 3.70 GHz; GPU: AMD Radeon HD 8670D) was able to provide decent FPS. If you like, you can try it for yourself (the executable is in MainGame/bin/Debug, requires .NET/Mono and at least OpenGL 2.1) -- I'm rather interested in determining the kind of hardware this effect can be used with.

=======================

For the sake of completeness, here is a rough description of the "luck-driven tactical" gameplay I had in mind:

The main gameplay "shtick" would be the protagonist's ability to cause unlikely things to happen, namely by a specific form of wish-making that uses her luck as a "fuel". In some ways, this resembles WatchDogs' hacking (indirect control of the game world), but since it's based on luck, no wish is guaranteed to happen the way you expected, or to happen at all (hence there must be lots of potential paths to solving any puzzle). This part of the gameplay is supposed to have a "tactical/stealth" feel, as the player would have to devise strategies and control their execution without drawing much suspicion.

Also, since luck governs a lot of things in the game, a lot of things are supposed to be actually undefined until the moment the protagonist "Schrödinger-observes" them (e.g. whether a door/chest is locked, whether there is a guard behind the corner, et cetera).

Of course, the common understanding of wish-making implies being able to wish anything at all -- which is hardly implementable in a computer game -- so I came up with the following system. The "wishes" are made through the use of certain artifacts ("wish pearls"), and each pearl can be "charged" with one of the following:

  • Prime wish – based on a concrete character/object/phenomenon encountered by the protagonist.
  • Constructed/abstract wish – created from other wishes through a process resembling fortunetelling/solitaire (with magical cards).
  • "Blank" wish – a special kind of wish created by "clearing" the pearl.

The protagonist can "wish" for the pearl's "contents" to happen (in general or somewhere specific), and "the Fortune" would start looking for ways to make it happen (I think it can be done via a distributed-over-time search of a causality graph); requesting another wish with this pearl or recharging it would cancel the search.

Each non-blank wish is made up of basic elements that function like words (noun, verb, adjective, etc.) and can be connected into descriptions/statements (and which, in turn, can be dissected into the constituent words or combined into sentences) using the magical cards. Prime wishes contain words that characterize the character/object/phenomenon at the moment the "snapshot" was taken. The "blank" wish is a special kind of wish that asks the Fortune to help the protagonist in any way the Fortune sees fit.

So, in a way, this mechanic is somewhat analogous to the one in Scribblenauts -- and, like in Scribblenauts, it's supposed to encourage or even force the players to get creative and improvise... Which means that the players would expect the game to recognize and acknowledge every solution that might realistically work.

=======================

So, in short, I'm lacking the experience to determine whether the 3D-line-of-sight effect can be polished into a viable approach, or it just isn't possible in principle. What's your opinion? What techniques would you otherwise suggest for such kind of game?

P.S.

Though somewhat beyond the focus of my questions, the general feedback on the "luck-driven gameplay" is also welcome happy.png

Advertisement

I don't think you'd need to anticipate every possible solution. Aim for an achievable goal. For example, have a set of objects which can be affected by luck, e.g. object can fall over, rope can snap, enemy can trip, appliance can spark, etc. Then use some kind of Monte Carlo planner to try to find a way to help the player given the affectable objects nearby. To give a decent chance that luck will help, include some objects with intrinsically high randomness. For example patrolling guard's behaviour, an oddly shaped ball you can throw which can bounce in many directions, etc. For extra impressive effects, maybe put effect hints in particular rooms, e.g. "I suggest you tip THIS, which will roll THAT, which will...". What is important is that you can predict the effects of luck well enough that you won't screw the player over, e.g. tip a large object which bounces and rolls under physics and may sometimes block the only exit.

jefferytitan, thanks for the advices smile.png The physics is indeed too computationally heavy to allow long-term predictions, so I'm thinking to make luck-governed objects largely ignore physics (i.e. they would likely move in unrealistic trajectories, but that might be covered by the artistic license).

It might pay to prevent particularly wacky "unrealistic trajectories", for example for each object set a simple 3D area in the level design that luck is allowed to kick it into, such as a cone for a simple trajectory. In that way you can say give it some latitude for luck to act without requiring objects to completely disobey gravity or other common sense rules. You could also create those cool knock-on effects, e.g. "are there any luck-enabled objects in object A's cone of movement? if yes then explore those as follow-on effects". Luck can then make an object accurately pinpoint another luck object, and so on.


So, in short, I'm lacking the experience to determine whether the 3D-line-of-sight effect can be polished into a viable approach, or it just isn't possible in principle. What's your opinion? What techniques would you otherwise suggest for such kind of game?

I'm going to only respond to what I think is the basis of your question -- What kind of "camera" would work best? -- and leave the gameplay/wishing for another time (I think it sounds awesomely fantastic, by the way).

I've been struggling with similar issues for close to a year. Over multiple iterations and prototypes of a tactical, squad-oriented, turn-based game, I've learned one big thing: Realism isn't all that much fun.

Using games like Silent Storm and Jagged Alliance 2 as a template, I went about trying to improve the line-of-sight mechanics with everything from giving the player full camera control (zoom, pan, tilt, full movement) to shifting to first-person perspective while aiming (a rip-off of Valkyria Chronicles, to be exact). Everything I tried made my particular game not fun.

I added a system that would put markers on the screen to show an enemy's last know position (See Silent Storm) and incorporated gimmicks from audio cues to "ghost" images to show where an opponent was thought to be.

For my game, it was unnecessary fluff. After locking the camera (but allowing rotation) and simply displaying all of explored areas, including enemies, actual fun started to creep through.

It could very well be that the fun of your wishes, these somewhat uncontrollable, random expressions of will, might be more fun with the added knowledge of everything the character is up against. That somewhat "perfect" knowledge of enemy location/movement (or whatever is in your game) balanced against the imperfect results of some other core mechanics could be what you are looking for.

Indie games are what indie movies were in the early 90s -- half-baked, poorly executed wastes of time that will quickly fall out of fashion. Now go make Minecraft with wizards and watch the dozen or so remakes of Reservior Dogs.

jefferytitan, that should probably work, thanks smile.png

GoCatGo, thanks, this is quite an important point to consider happy.png Actually, now that I think about it, this kind of "omniscience" may even be justified in-game: in the setting of the game, the wish pearls are supposed to partially function as palantirs/fortuneteller's crystal balls, so it might make sense that they'd allow detecting presence of objects/characters not directly visible to the protagonist.

I figure if your characters have wish pearls that can make their will manifest, they likely know some guy is hiding in the bushes! smile.png

Seriously, this is a really interesting and bizarre and wacky idea. I wish you every success in fleshing it out and getting it developed.

Indie games are what indie movies were in the early 90s -- half-baked, poorly executed wastes of time that will quickly fall out of fashion. Now go make Minecraft with wizards and watch the dozen or so remakes of Reservior Dogs.

Maybe you could unify visibility/position and future chances into a unified probability mechanic. So:

Taking jefferytitan's idea of the bouncing of irregular objects, have something like the "throw" option show you all the possible outcomes and the probabilities of these options coming true. (So when you're about to throw your gun, you can see ghosts of the gun in various places in the room, plus percentages indicating the likelihood of them.) Then use this same visualization for items in an unknown position, like a distant enemy: ghosts of them in possible positions plus the likelihood of it. (Or, likely positions where they'll be soon.) And the same for line-of-sight; indicate the possible outcomes when you're about to shoot or whatever, along with percentages.

(The benefit of getting the player to think in terms of probabilities is that you can probably get away with more "fudging" in your line-of-sight calculations. They don't have the same grounds to complain when you get the calculation "wrong", because they won't know whether it was a wrong calculation or whether it was a dice roll.)

Maybe what wishpearls do is increase the probability of a chosen option. (Like every wishpearl you spend increases the probability of your preferred situation coming true by 25%.) There might be a crazy sequence of events (gun bounces just the right way and hits the guard's grenade off his belt, which falls down a ventilation shaft into...), but you can make it happen by spending a few wishpearls.

GoCatGo, thanks! Actually, the origin of this game idea is even more wacky wink.png

valrus, the technique you propose is quite interesting. Easily seeing the most likely outcomes and instantly knowing their probabilities allows the player to make informed decisions and to always take the route they consider statistically optimal. I think it would result in a very tactical feel to the gameplay -- maybe even close to tabletop RPGs, since their players deal with random numbers all the time. The "wishpearl spending" you suggest also seems similar to modifiers/bonuses to dice rolls (from DnD and the like).

============================

Hmmm....

I think I should elaborate a bit more on certain aspects of my project, to give everyone a better picture of what I'm trying to create. Currently all this is just a draft, but the general idea should be pretty clear.

The inspiration for this concept (which initially came from the game Zanzarah and a misheard song by Solas) defined the kind of central theme I wanted the game to have. A game about odds, chances, luck, uncertainty, gamble, risk, Fortune, hope, belief (and maybe a bit of quantum mechanics concepts happy.png). Something with a mystical vibe, like tarot cards, divination, prayers and wish-making.

So, quite predictably, I opted for a fantasy/fairytale-like setting, with the main protagonist being a school-age girl. Well, at least the age when children still genuinely believe in fairytale/folklore creatures -- a strong ability to believe is one of the prerequisites to using the "wish pearls" in this setting.

Of course, this means that the game should be rather nonviolent. On the one hand, it makes unavailable a whole category of tactical choices... On the other hand, it makes an interesting design challenge, and I'm not sure how the players would feel about routinely wishing someone injured or even dead wacko.png

Speaking of gameplay, I was designing the wish system to reflect the central themes as well. As I have it now, the wish-making process is intentionally vague about what, how and how likely is going to happen -- the whimsical Fortune may consider granting a politely-asked plea, but it's up to Her to fill in the blanks and decide whether it's worth the trouble or you should be punished for insolence (for example, by deviously turning your wish on its head). So, in my current system, there are the following rules of thumb:

  • The more likely something is to happen on its own, the easier (and less luck-consuming) it is to invoke this occurrence intentionally. However, the more deterministic is the situation, the harder it is for the Fortune to find a loophole (natural or otherwise).
  • The more unlikely something is, the more luck you need to invest to reasonably expect it to come true. Making wishes too frequently (especially if the wishes are very similar) or asking for something too improbable can quickly deplete your luck to dangerously low levels. In short, the more you ask from the Fortune, the more of a risk it is.
  • The risk of a wish is offset by the Fortune's favor towards the wish-maker (a different stat from the luck). The more benevolent the Fortune is towards you, the more She's willing to forgive you (or even cater to you). The protagonist, naturally, starts with a fair amount of Fortune's favor already.
  • However, there is also a factor of "wish power". The stronger you wish for something to happen, the more "powerful" your wish is (and the more your own energy you're ready to supply to make it happen) --> the greater are the chances of the wish coming true, though the cost of the failure increases too. However, after a character's wish power surpasses certain threshold -- namely, the energy required to directly modify the world -- the wish becomes a miracle and its cost no longer depends on its unlikeliness. In particular, teleportation (an event that is 0% likely to happen under normal circumstances) becomes possible.

(Just a note: in this setting, "The Fortune" isn't supposed to be some personal god, rather an impersonal "Will of the Universe", or some collective whole of the omnipresent spirits)

Well, something along these lines smile.png

Of course, this means that the game should be rather nonviolent. On the one hand, it makes unavailable a whole category of tactical choices... On the other hand, it makes an interesting design challenge, and I'm not sure how the players would feel about routinely wishing someone injured or even dead wacko.png

Yeah, that's definitely an interesting challenge. For some time I've wanted to play a tactical RPG where the "default" actions are something other than stab/shoot and the goal is something else than "clear all enemies", where you're more of a trickster, vaulting over enemies, sliding under giants' legs, stealing their keys, stunning/confusing them, etc.

This topic is closed to new replies.

Advertisement