In The Shadows
Moderator: Moderator
In The Shadows
Inspired by the old PC game Thief, I'm writing a module called In The Shadows. The objective is to create a "sneaker" type of game - that is, where one normally wants to avoid rushing in to combat - and to create and maintain a feeling of nervousness and fear on the part of the player.
Besides the overall concept, the game details are not finalized, though I have plenty of ideas.
Technically, I have several objectives to help with the overall theme:
- variable ambient light - the ability to see just a little if the player is not holding a light source
- the ability of NPCs to see a light source from farther away than their own light source extends
- NPCs normally moving before they catch sight of the player, including patterns like patrol routes by guards
- a lockpicking and/or puzzle solving pop-up UI
- procedurally generated world(s), and maybe other things, too
The TOME engine is great, it was pretty easy to start on the module and some of the above.
I'm keeping the code here: https://gitorious.org/its
Besides the overall concept, the game details are not finalized, though I have plenty of ideas.
Technically, I have several objectives to help with the overall theme:
- variable ambient light - the ability to see just a little if the player is not holding a light source
- the ability of NPCs to see a light source from farther away than their own light source extends
- NPCs normally moving before they catch sight of the player, including patterns like patrol routes by guards
- a lockpicking and/or puzzle solving pop-up UI
- procedurally generated world(s), and maybe other things, too
The TOME engine is great, it was pretty easy to start on the module and some of the above.
I'm keeping the code here: https://gitorious.org/its
Re: In The Shadows
Sounds pretty cool. I'd be very interested in how you're going to tackle lighting, because.. err .. thats the bit I'm hung up on at the moment 

Re: In The Shadows
So far, I've added an ambient_light variable to zones, and modified the canSee() function to take it into account. I've also modified it so that NPCs can see lighted squares in their FOV.VRBones wrote:Sounds pretty cool. I'd be very interested in how you're going to tackle lighting, because.. err .. thats the bit I'm hung up on at the moment
from my Actor.lua:
Code: Select all
--- Can self see the target actor
-- This does not check LOS or such, only the actual ability to see it.<br/>
-- Check for telepathy, invisibility, stealth, ...
function _M:canSee(actor, def, def_pct)
if not actor then return false, 0 end
-- Check for light / visibility
-- Actor can always see self or
-- Actor is emitting light (we already know he's within sight radius) or
-- We have a lite and he's inside the radius or
-- There is ambient light and self can pick up actor out of the shadows
if ( actor == self ) or
( actor.lite and actor.lite > 0 ) or
( self.lite and ( core.fov.distance(self.x, self.y, actor.x, actor.y) <= self.lite ) ) or
( game.level.data.ambient_light and self.sight_min and ( self.sight_min <= game.level.data.ambient_light ) ) then
-- FIXME - need to check if actor within other emitted light radii, maybe not here
-- Visible unless other effects prevent it, check those now
-- Check for stealth. Checks against the target cunning and level
if actor:attr("stealth") and actor ~= self then
local def = self.level / 2 + self:getCun(25)
local hit, chance = self:checkHit(def, actor:attr("stealth") + (actor:attr("inc_stealth") or 0), 0, 100)
if not hit then
return false, chance
end
end
if def ~= nil then
return def, def_pct
else
return true, 100
end
end
return false, 0
end
Re: In The Shadows
I gave it a run and it's looking pretty good so far. Were your torches (or other static light sources) going to be mapped into the ambient light or treated like unmoving actors?
Re: In The Shadows
Ambient light is intended only for the player to see a small bit if they don't have a light (desirable, as the NPCs can see the lights), or for NPCs to pick up the player "seen in the shadows". It would be really cool to have variable ambient light across a level, but one thing at a time.VRBones wrote:I gave it a run and it's looking pretty good so far. Were your torches (or other static light sources) going to be mapped into the ambient light or treated like unmoving actors?
Torches and static light sources are just going to light up an area, I just need to encode a mechanism into the zone files to denote them I think.
-
- Higher
- Posts: 55
- Joined: Thu Aug 16, 2012 10:52 pm
- Location: Philadelphia, Pennsylvania, USA
- Contact:
Re: In The Shadows
Maan, to do torches I was going to animate different tiles, one for the area right next to the torch, one for the next square out, and so on. Please let me know how you did this so I don't go blind from all the pixelating.
Re: In The Shadows
Flickering lights added to the guards - randomly sets his projected light within his min and max radius
Pulsing lights added to will-o-wisps (in the graveyard) - increases stepwise to max radius, then decreases stepwise to min radius
Pulsing lights added to will-o-wisps (in the graveyard) - increases stepwise to max radius, then decreases stepwise to min radius
Re: In The Shadows
I've read this a bunch of times and still can't parse it - what are you asking?chezzo wrote:Maan, to do torches I was going to animate different tiles, one for the area right next to the torch, one for the next square out, and so on. Please let me know how you did this so I don't go blind from all the pixelating.
The effects in there now are just what comes with TOME - so far I'm only changing the "lite" variable, and the existing display code is doing everything on the display regarding dimmer squares at the edges. Is that what you're asking?
Re: In The Shadows
Flickering torches and braziers added.
Re: In The Shadows
I already told you I like the idea, and we wanted lighting to be an important part of Veins, so I'll be following this one intently.
Speaking of, you said you have ambient light. Does it cause slowdowns in level generation? (we used to have something similar, but it slowed down level gen a lot and we're wondering what's the problem)
Speaking of, you said you have ambient light. Does it cause slowdowns in level generation? (we used to have something similar, but it slowed down level gen a lot and we're wondering what's the problem)
Re: In The Shadows
No, but at this point it's only a static integer in the level struct. There's one extra test in canSee(), and only a small number of npcs per level so far.
I would love to make it dynamic and per-grid, but that's probably going to wait until after more of the actual game arc is fleshed out.
I would love to make it dynamic and per-grid, but that's probably going to wait until after more of the actual game arc is fleshed out.
Re: In The Shadows
Restarting development. (Damn you, Masterwork Dwarf Fortress!!)
Re: In The Shadows
I really enjoyed the original Thief game. This sounds like it will be really cool.
Re: In The Shadows
yay!
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: In The Shadows
Sounds awesome. We need more sneaking!
Will the Stealth work like in the base game?
Will the Stealth work like in the base game?
Stronk is a potent combatant with a terrifying appearance.