Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411423 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 18, 2024, 11:43:41 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsdot sneak - top-down stealth game (browser-based WebGL)
Pages: 1 2 [3]
Print
Author Topic: dot sneak - top-down stealth game (browser-based WebGL)  (Read 19343 times)
Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #40 on: October 08, 2012, 02:27:20 PM »



Here, a guard has lost track of the player, but convinced that the player must still be in the room somewhere, has plotted a route around the edge of the room.  Once he finishes the patrol route, he'll go back to his regular patrol.

Up for implementing next, guns! ...  And particle effects, which must surely accompany any firing of guns.

This is a good point to talk about what makes dot sneak's guns part of the "thinking while you sneak" oeuvre for which I'm aiming.  They have a fire rate, a number of rounds that can be fired before they must be reloaded, a reload time, and... a set number of misses before each hit, and the option to reset the number of misses if the player goes out of sight.

To explain this, let's talk about player health first.  It starts at 100, and is decreased by guards' attacks.  When it goes to 0, the game is over for the player.  It won't recover until the player has managed to avoid the guards, including their after-action patrol, and the guards are no longer suspicious, and then it recovers to full.  There are no medpacks.  You could think of it as a tension meter.

dot sneak is a deterministic game.  There are no random factors.  If a guard sees you for X amount of time, they can fire (firing rate * X) shots in that time, and will definitely hit you if they rack up at least M misses.

So with that in mind, it comes down to a gamble in the player's mind: if there's a guard in a position to prevent the player from absolutely sneaking across the room in perfect safety, can the player make it across the gap without getting shot?  Can the player manage to tease the guard and force him to exhaust his ammo, by standing up from cover and then getting back down, then make a break for it while he's reloading?

Having deterministic gun variables like this lets me put in, say, sniper rifles that will one-shot kill the player, but always miss once to hint that the player needs to get back into cover before the next shot.

I'm not planning on giving the player a gun at this point, but I could see doing a version of 'dot sneak' where the player could be leading a team of space marines into an aliens-infested spacecraft.
Logged

Currently developing dot sneak - a minimalist stealth game
oyog
Level 7
**



View Profile WWW
« Reply #41 on: October 09, 2012, 03:52:07 PM »

Out of curiosity, will guards eventually communicate with each other? Has it already been mentioned in a post I missed?
Logged
Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #42 on: October 10, 2012, 01:48:59 PM »

It's something I would like to do!  I am basically adding features one at a time, rebuilding the original webgl prototype but better.  So the logic goes:

- add guns, so player is threatened by guards (right now they just stare goggly-eyed at you)
- add health, so when player is hit by gunfire, player loses health visibly, and recovers it when he has successfully escaped
- add sound which is displayed as expanding circles, so players can see the sound they're making as they run
- add guards yelling to alert other guards, which can in turn be displayed as sound waves
- change radar so it only displays guards who are moving or attacking
- add wall-hugging so player can peer around a corner without being seen by guards

And so forth.  Every feature permits more features to be added on top, kind of like a tech tree in an RTS or 4X game.
Logged

Currently developing dot sneak - a minimalist stealth game
DustyDrake
Level 10
*****



View Profile
« Reply #43 on: October 10, 2012, 03:01:02 PM »

I'm guessing guns are hitscan and not projectile based?
Logged

Pixelulsar
Level 3
***



View Profile WWW
« Reply #44 on: October 10, 2012, 03:46:41 PM »

I usually don't like this type of game, but it was fun.  I like how you're adding in more advanced guards, by letting them look around where they thought they saw you.  I'm excited to see how it plays with guns.

Also, I was thinking while writing this and figured out why I thought I dislike this genre, my only experience with it was those flash games where the guards always follow a set pattern no matter what.  In those games you just have to memorize a pattern.  They would be way more fun if they were more like this!
Logged

knightSquared
Level 0
***



View Profile WWW
« Reply #45 on: October 10, 2012, 04:01:00 PM »

Looks good!  Just tried out the demo.  Other than the slowness, I would also suggest to move the centering of the screen at a lower position as the dialogs occupy a good chunk of the top screen space.  Other than that, good progress.
Logged

Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #46 on: October 16, 2012, 11:01:33 PM »



Guns are indeed instant, no projectiles to evade.  Not that I couldn't add a projectile weapon later but this isn't the kind of game where you strafe around.

This is all just window-dressing, but you can see here the guard's missed shots are grey, where his successful shot is white, and blood splatters come out the back of the player, and he's leaving blood puddles as he runs.  But what really drives the point home of taking damage is flashing the entire screen red briefly.  Sound normally does the job of letting the player feel the visceral impact of being hit for an action game, but people frequently dislike it if a browser game makes noise.

Glad you liked it, Pixelulsar, knightSquared!  I don't think I'm familiar with those Flash games.  Closest one I can think of is Dynamite Jack, where you're escaping from the mines and have to avoid the notice of guards.  In that one, the guards do come if they hear something, but it's also "you're dead if you're noticed", so it omits the "you're being hunted, try to escape" gameplay.

That's a fair point about the dialogue box taking too much space.  I'll keep that in mind for the next iteration!
Logged

Currently developing dot sneak - a minimalist stealth game
DustyDrake
Level 10
*****



View Profile
« Reply #47 on: October 17, 2012, 12:27:21 AM »

Now, once you've been noticed by the guards, and you successfully lose them, what happens?
Do they do the generic "Oh, I can't find him, that means that he left the facility" type of thing?
Or do they remain on high alert?
Logged

Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #48 on: October 21, 2012, 11:38:43 PM »

These are the "baseline" AI behaviors:

1. If the guard only suspected your presence but didn't confirm it, he returns to his patrol.
2. If the guard confirmed your presence and began shooting at you, then in the Canvas prototype, he patrols around the edge of the room, then returns to his patrol if he doesn't find you.

In addition, the plot script allows for more possibilities.  That is, I can have a 'guard detected intruder' plot node that triggers anything attached to it, which can include:

- Activate some guards that were previously asleep (and off the map).  They begin following their programming.
- Change the level state to 'all guards on alert'.  Guards now follow the 'alert' branch of the route nodes, whenever there is one.  This means their routes will still be basically the same, but may include side trips to check out areas that used to be safe for the player.

Another few days, another tiny incremental update:



Here's the first look at "pings" generated by running around with a guard in pursuit.  It looks convincing enough.  The idea is that you have to run in order to get away from a guard that has detected your presence, but your running may attract the attention of other guards; in addition, the guard should be alerting other guards nearby.

You don't generate pings while standing (if you tap shift) but you do cause your characterto stand up; if a guard is looking where you are, then that may be a way to get his attention and force him out of his patrol route.  This is now depicted by having your dot be brighter when standing or running, darker when crouched and sneaking around.

Combined, they make running around feel really dangerous.
Logged

Currently developing dot sneak - a minimalist stealth game
Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #49 on: October 22, 2012, 10:19:54 PM »



Guards can now hear players running, or other guards that are in hot pursuit of the player!  This puts them into tracking mode, and they may update their idea of where the player is if they get fresh information from another guard or the player herself running.

This does make things harder.  (which is good, it was very easy as it stood)  However, an emerging problem is that if you have several guards in pursuit, they can wind up all gathered at the same location, following the same route searching for you.

I'd rather have them spread out if they're searching for you, so I need to have them recognize that other guards are nearby, and divide up the search problem.  Yay, AI.
Logged

Currently developing dot sneak - a minimalist stealth game
Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #50 on: October 31, 2012, 01:43:54 PM »

Not dead, but I fear this project is in the dreadful slog stage.

I took a bit of time to work on a slightly different proof of concept, pictured below:



This is a simple ship hull texture with a radial gradient blended onto it using HTML5's canvas "global composite operations"; the gradient moves with the cursor.  It looks reasonably like moving a light over a textured metal plane of some kind.

On the dot sneak side, I started trying to implement wall-hugging.  This will trigger only if you're running mostly into the wall, as opposed to going diagonal, so hopefully it will not trigger accidentally.  The idea is that when you're hugging a wall, you'll be slightly harder to see.  Right now if the enemy sees any part of your dot around a corner, you're spotted; if you're wall-hugging, they'll have to see your dot's center, which gives you a bigger margin of safety.

In addition, while wall-hugging, if you come up against a corner, it should allow you to look around the corner, and prevent you from running straight out into the open.  I haven't implemented this yet.  This will be more useful when I make it so you can only see guards if they're moving or you can see them.

I discovered a vision bug that allows a guard's vision cone to slightly clip through a wall.  This is undesirable.

Fortunately, I think I have a fix for the vision bug.  It's happening because I'm grouping edges into longer line segments, but when an edge crosses another edge, funny things can happen.  I just need to split the edge at the intersection.
Logged

Currently developing dot sneak - a minimalist stealth game
eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #51 on: November 01, 2012, 05:31:14 PM »

all this sounds great, keep it up! the slog stage sucks but whaddyagunnado?! Smiley
Logged

Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #52 on: November 05, 2012, 12:53:16 AM »

Yes, there's nothing to do but stare at the screen until an idea pops out.  Wall-hugging turned out to be a bit more complicated than I'd expected; briefly I have it search for the nearby part of the wall the player is hugging, and detect the start and end of the wall, then I set constraints on how far the player is allowed to move.  When the player reaches the end of the wall, his dot stops there, as illustrated below.



I've chosen to visually represent wall-hugging by squishing the player's dot a bit against the wall.  In practical terms, the player also becomes significantly harder to see, which protects against the guard seeing a bit of the player's dot as he approaches the corner.

After this, I need to clean up some problems with how the AI guards alert other guards, then hide guards on sonar if they aren't making noises and the player doesn't see them, and then finally, start re-implementing the plot engine.  The end is still quite a way away, but it's there.
Logged

Currently developing dot sneak - a minimalist stealth game
Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #53 on: November 05, 2012, 11:56:03 PM »



Okay, now wall-hugging is done.  I changed it so that when you're hugging a wall and pressed up against a corner, your vision cone emanates from the side of your dot, so you can actually see around the corner, instead of having it block your vision.
Logged

Currently developing dot sneak - a minimalist stealth game
Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #54 on: November 07, 2012, 12:20:06 AM »



This map is a lot scarier when you know there are actually five guards in there, you just can't see them all because your radar only shows them when they're moving or if you can see them.  The guards' dots fade out when they hit one of their patrol points and pause to look around.

There's one guard in this map that reaches his patrol point and doesn't move at all after that, he just scans both approaches to the room he's guarding.  It's possible to sneak in when his attention is on the other corridor, but he'll still respond to other guards' alerts, so he can be pulled out of position like any other guard.

Now what will be interesting is when I add quiet guards, that are invisible while patrolling as well, and can only be seen when you see them.

This is level configurable; you can set levels so that all guards are visible at all times.  Stealthy guards will be configurable on a per-guard-type basis.
Logged

Currently developing dot sneak - a minimalist stealth game
Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #55 on: November 27, 2012, 05:43:00 PM »

I r slacker kitteh!

While I have some tiny, tiny progress, it's not enough to be worth taking another screenshot.  Instead, I'll talk about some 2D games that I've played lately, and where I want to go with my games.

FTL is a rogue-like game where you command the crew of a small starship trying to keep one jump ahead of a vast armada of rebels, bringing crucial information to Federation command.  What's interesting to me is how it manages to get so much gameplay and urgency out of a relatively limited palette.  You're only ever moving your crew between different stations, and arming and targeting your weapons on your enemy's ship systems, and yet everything fits together so well you can feel anguish as your shots miss, or the enemy scores a direct hit that sends you scurrying to repair the damage before fires spread, and...

Well, it just works so well because everything you do is meaningful.  The experience doesn't come from full motion video or characters reeling off voiced lines, it comes from your own actions, and the way the game creates the 'narrative' based on that.  It's a really tight loop.  The game experience is the story.

Then there's Waking Mars.  This one is much more realistic in graphics (though still quite cartoonish) and includes voiced cutscenes and 'codec'-style conversation.  This one worked well for me because of the strong story and atypical gameplay.  You're not shooting anything here, and stuff mostly doesn't shoot at you; instead, you're exploring the mechanics of the game's life forms.  In general it's quite forgiving so you have room to experiment.

The characters are somewhat wooden, but that's okay, it's the story, the experiential feeling of being in an alien world ("what, no shooting?  That's so alien!") that makes Waking Mars a must-play for me.

And finally closest to the stealth motif is Mark of the Ninja, also a 2D stealth game...  But it's a side-on stealth game and relies a lot more on action, speed, and various gadgets that you can deploy to get around the guards.  It includes voiceover codec and cut scenes, like Waking Mars does.

It's a lot more action-packed and quick-moving than I want dot sneak to be.  But dang, it sets some really high bars on polish and look-and-feel.  It is full of ninja style!

I definitely need to do some thinking on this.  This was always going to be a prototype, something I make to develop tools for making real games, but I still wanted to get one full-length playable game out of this.  But to make that happens...

Well.  Just looking at the prototype screenshots I've posted, there's a huge gap in style alone.  I don't have a real story in mind.  Once I do, I need to change the game engine to support that.  I'd get rid of the static green grid background, introduce background pictures to set the scene, maybe add a cutscene component.

One thing at a time though!  There's a reason it takes people years to develop games on their own.
Logged

Currently developing dot sneak - a minimalist stealth game
eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #56 on: November 27, 2012, 05:53:09 PM »

Yeah, I hate that realisation that games take a looong time to make. Especially when the first 2 months of development you can get a whole tonne of stuff done, then the next 6 months is reworking/tuning/blah, then the game changes direction or whatever ... Wink
Logged

Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #57 on: July 17, 2013, 11:06:35 PM »

It has been a while, hasn't it?



I've re-implemented the bare minimum of 'plot nodes' -- these are nodes that fire under certain circumstances, i.e. when you enter a room or get seen by guards.  In this case, the player is in the start zone and this triggers a level introduction conversation (six dialogue nodes) which get played over the codec, one at a time.

I don't know how far I'm going to push this, but until a better idea comes along, I'll likely keep poking at this when I find some spare time and motivation.

In the meantime, Microsoft recently announced that they were going to start supporting WebGL in Internet Explorer 11...  About half a year after I decided to develop a Canvas version of the dot sneak code, because IE didn't support WebGL at the time.  Sigh!  Though the work I've done hasn't really been wasted, there were a lot of improvements over the webgl prototype.  And it will probably take time for IE11 to get out there.
Logged

Currently developing dot sneak - a minimalist stealth game
eigenbom
Level 10
*****


@eigenbom


View Profile WWW
« Reply #58 on: July 21, 2013, 03:31:08 PM »

Woah its been 8 months, man my life is just flying by. Since then, MonacoIsMine has come out, have you played it yet? And if so, has it changed how you're thinking about your game?
Logged

Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #59 on: July 31, 2013, 10:36:26 PM »

Haven't played Monaco yet!

*peers at a Let's Play*

I like the way it shows the level as just the map when you can't see it, and only lights up the parts you can see.  I could probably do that with a lot of fiddling around with HTML5 canvas global composite operations.  That's something I'd save for the polish/game style phase.

Implemented chat fading out after a while so your codec won't stay full of text, thus obscuring your view of the map.

I need to implement a bunch more plot nodes types and objective markers, then start working on a real campaign.
Logged

Currently developing dot sneak - a minimalist stealth game
Pages: 1 2 [3]
Print
Jump to:  

Theme orange-lt created by panic