ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Fri Jun 22, 2018 10:24 pm

All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: In The Shadows
PostPosted: Thu Feb 28, 2013 5:49 pm 
Offline
Cornac

Joined: Sun Jan 01, 2012 5:57 pm
Posts: 39
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


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Fri Mar 01, 2013 4:39 pm 
Offline
Low Yeek

Joined: Thu Jun 30, 2011 2:58 pm
Posts: 6
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 ;)


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Sat Mar 02, 2013 3:47 pm 
Offline
Cornac

Joined: Sun Jan 01, 2012 5:57 pm
Posts: 39
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 ;)


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.

from my Actor.lua:
Code:
--- 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


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Sat Mar 02, 2013 10:02 pm 
Offline
Low Yeek

Joined: Thu Jun 30, 2011 2:58 pm
Posts: 6
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?


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Sat Mar 02, 2013 11:38 pm 
Offline
Cornac

Joined: Sun Jan 01, 2012 5:57 pm
Posts: 39
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?


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.

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.


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Thu Mar 07, 2013 8:44 pm 
Offline
Higher

Joined: Thu Aug 16, 2012 10:52 pm
Posts: 55
Location: Philadelphia, Pennsylvania, USA
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.


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Sun Apr 14, 2013 3:12 pm 
Offline
Cornac

Joined: Sun Jan 01, 2012 5:57 pm
Posts: 39
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


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Sun Apr 14, 2013 3:17 pm 
Offline
Cornac

Joined: Sun Jan 01, 2012 5:57 pm
Posts: 39
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.


I've read this a bunch of times and still can't parse it - what are you asking?

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?


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Thu Aug 22, 2013 5:55 pm 
Offline
Cornac

Joined: Sun Jan 01, 2012 5:57 pm
Posts: 39
Flickering torches and braziers added.


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Thu Aug 22, 2013 6:01 pm 
Offline
Archmage

Joined: Tue Jun 18, 2013 7:24 pm
Posts: 449
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)

_________________
Working on a T-Engine game
Veins of the Earth

Veins of the Earth ModDB page


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Thu Aug 22, 2013 6:12 pm 
Offline
Cornac

Joined: Sun Jan 01, 2012 5:57 pm
Posts: 39
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.


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Sun Oct 18, 2015 11:46 pm 
Offline
Cornac

Joined: Sun Jan 01, 2012 5:57 pm
Posts: 39
Restarting development. (Damn you, Masterwork Dwarf Fortress!!)


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Sun Oct 18, 2015 11:51 pm 
Offline
Uruivellas

Joined: Fri Oct 10, 2014 4:00 pm
Posts: 848
I really enjoyed the original Thief game. This sounds like it will be really cool.


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Sun Oct 18, 2015 11:54 pm 
Offline
Master of Eyal

Joined: Wed Jul 24, 2002 9:26 pm
Posts: 10228
Location: Angolwen
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 ;)


Top
 Profile  
 
 Post subject: Re: In The Shadows
PostPosted: Mon Oct 19, 2015 5:13 am 
Offline
Sher'Tul

Joined: Wed Jan 07, 2004 5:01 pm
Posts: 1303
Location: Finland
Sounds awesome. We need more sneaking!
Will the Stealth work like in the base game?

_________________
Stronk is a potent combatant with a terrifying appearance.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group