Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: Light...  (Read 3129 times)

Draco18s

  • Bay Watcher
    • View Profile
Re: Light...
« Reply #15 on: April 20, 2008, 05:12:00 pm »

quote:
Originally posted by Dae:
<STRONG>I don't know what to think about it actually.</STRONG>

What if you embark near a polar regoin?  ;)

Logged

MaxVance

  • Bay Watcher
  • Legendary Internet User
    • View Profile
Re: Light...
« Reply #16 on: April 20, 2008, 06:00:00 pm »

As for indoor lighting, I think one of the development pages said something about gem lamps. Whether this meant lamps with gems for windows or magic lamps that produce light using the gems, I'm not sure.

But this question stands: Would cave adapted dwarves get sick from artificial light? Likewise, would such light prevent cave adaptation?

Logged

Nadaka

  • Bay Watcher
    • View Profile
    • http://www.nadaka.us
Re: Light...
« Reply #17 on: April 20, 2008, 11:50:00 pm »

I would actually prefer to model light as something of a flow...

Any outdoor tile would "bright" and causes problems for cave adapted dwarves. This implies a brightness of greater than 7/7.
the paths from outdoors to indoors are treated as a light source.

unlike a normal flow there is no random walk.
This means that light will form a "triangle"
7/7 6/7 5/7 4/7 3/7 2/7 1/7 0/7 ...

Dwarves are fine with anything from 7/7 to 1/7. At 0/7 or less the dwarves would be slowed in much the same way as they are without booze.

Allowing light flows to overlap and interact becomes a little trickier, and how to do it best may require some careful study.

X = wall
O = outdoors
# = amount of light

Example of a simple light source in a 1 wide hallway.

code:

XXXXXXXXXXXXXXXXXXXXX
O76543210000000000000
XXXXXXXXXXXXXXXXXXXXX

Example of a simple light source in a wide indoor area.

code:

X00000000
X11111110
X22222210
X33333210
X44443210
X55543210
X66543210
X76543210
O76543210
XXXX43210
X12333210
X12222210
X11111110
X00000000

Windows and glass block structures should allow light to pass through normally. And additional furniture could be devised to create or transport light for parts of the fortress farther from the surface. Torches, forges, candles, fires, etc would shed light in a similar but weaker manner.

A mirror could be placed that transmits light to a specific tile in line of sight (at -1 light level). Aim it at the wall at the end of a long hall to get a 6/7 light source (and light flowing outwards from there) from a mirror in 7/7 ilumination area. likewise, you could aim it at another mirror to bounce it around a corner.

One question that may arise is how light flowing from multiple light sources interact. If not at all, it would save a lot of CPU usage. If they stack, it wouldn't be to painful, but might lead to indoor areas with more than 7/7 light. and that would have to be addressed somehow.

One option would be to temporarily assign those tiles the same light sickness qualities as outdoor tiles and ignore everything over 7/7 light.

Another option would be that no matter how many sources, you can light sickness except outside as there are only so many light sources a dwarf can look at at the same time.

Yet another option might be that overlapping light zones "overflow" to create a footprint with a radius larger than the standard 7 tiles.

[ April 21, 2008: Message edited by: Nadaka ]

Logged
Take me out to the black, tell them I ain't comin' back...
I don't care cause I'm still free, you can't take the sky from me...

I turned myself into a monster, to fight against the monsters of the world.

Mikademus

  • Bay Watcher
  • Pirate ninja dwarves for great justice
    • View Profile
Re: Light...
« Reply #18 on: April 22, 2008, 02:11:00 pm »

@Nadaka:

You're basically suggesting a BSP/portal-akin lightning engine. These are used in FPS games, and the data structures for real-time management of the lighting data is usually pre-computed and stored in the level information because It is EXTREMELY computationally expensive. DF, being essentially 2D, could manage this on the fly, but a likely estimate of a realistic and dynamic implementation would be at an expensive of 60-80% of the game's CPU cycles.

Logged
You are a pirate!

Quote from: Silverionmox
Quote from: bjlong
If I wanted to recreate the world of one of my favorite stories, I should be able to specify that there is a civilization called Groan, ruled by Earls from a castle called Gormanghast.
You won't have trouble supplying the Countess with cats, or producing the annual idols to be offerred to the castle. Every fortress is a pale reflection of Ghormenghast..

Coke_Can64

  • Bay Watcher
    • View Profile
Re: Light...
« Reply #19 on: April 23, 2008, 05:48:00 am »

One word:

Infravision.   :p

Logged
I CANNOT HEAR YOU OVER THE SOUND OF ME DRILLING HOLES IN ELVES
+Population Myminicity
+Tra Myminicity
+Ind Myminicity

RadioTrefoil

  • Escaped Lunatic
    • View Profile
Re: Light...
« Reply #20 on: April 16, 2012, 06:38:06 am »

Lighting and lamps should contribute to dwarven thoughts. Sufficient lighting should give a dwarf a happy thought "<dwarf> admired a fine lamp recently", and insufficient lighting will give a bad thought - "<dwarf> complained about a lack of lighting recently". Also lamps cannot be constructed from Wood or other flammables, and will set fuel on fire if it is on an adjacent tile.
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Light...
« Reply #21 on: April 16, 2012, 07:34:34 am »

Well, now here's a blast from the past...  I saw "Light", and was getting ready to remind people that this is already a devgoal. 

Anyway, if we are talking about ways to "enforce" lighting, then happiness thoughts are probably going to be problematic, as we are going to be getting Personality Rewrite soon(ish), and one of the objectives in that is to completely scrap and replace happiness for a more complex system. 

Likewise, lighting is probably going to need a more "serious" set of enforcements, possibly going as far as calculating "Fog of War" based upon lighting, but that might take up too much FPS to calculate real-time. 

Considering the ways that bogeymen work, however, we might see something like Grues appearing if we do not fully light the mines. (Which would of course lead to weaponizing grues.)
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

slothen

  • Bay Watcher
    • View Profile
Re: Light...
« Reply #22 on: April 16, 2012, 08:45:30 am »

unless I'm missing something, light and lamps are on the dev page only as a subsection of adventure mode improvements.  I very much doubt we'll see a comprehensive lighting system implemented for fortress mode.
Logged
While adding magma to anything will make it dwarfy, adding the word "magma" to your post does not necessarily make it funny.
Thoughts on water
MILITARY: squad, uniform, training
"DF doesn't mold players into its image - DF merely selects those who were always ready for DF." -NW_Kohaku

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Light...
« Reply #23 on: April 16, 2012, 10:12:38 am »

unless I'm missing something, light and lamps are on the dev page only as a subsection of adventure mode improvements.  I very much doubt we'll see a comprehensive lighting system implemented for fortress mode.

Have you tried looking at the full dev goals?

Quote
FIRE AND LIGHTING ARC: The lighting in caves is artificial right now. It should be pitch black. This is also true of moonless cloudy nights. Once that's in, your adventurer will want fire. Fire can also come up in dwarf mode in various ways. Related to Core14, Core55, Req96 and PowerGoal150.

Quote
Req96, LIGHTING, (Future): Should be pitch black inside adventure caves and on cloudy moonless nights. Vision state should influence what you can see. Can try to make sunlight shine inside caves a bit by casting light lines on map-gen. Can track light with RGB filters so that things through red gem windows look red, etc. Things seen through glass statues could be distorted from their proper positions. Once fire is in, can do torches and other such light sources. Dwarves could place fires or gem lamps in dark places. Any magical take on alchemy could make extensive use of gems in this fashion, and the different colors of light can please certain nobles etc. Related to Core55.

So, one of the things Toady wants to do is have emerald lamps that cast a green glow over a fortress to please some of the nobles. 

Naturally, we will need to set up fortresses where secret messages are written in red over black walls, and surrounded only by green light, so that the message is only revealed when you bring in red light.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Supersnes

  • Bay Watcher
  • Dabbling Woodcrafter Competant Leatherworker
    • View Profile
Re: Light...
« Reply #24 on: April 16, 2012, 11:09:02 am »

Quote
Naturally, we will need to set up fortresses where secret messages are written in red over black walls, and surrounded only by green light, so that the message is only revealed when you bring in red light.

By then it will be too late.   Your torch will flicker its last flame and the sound and nashing of claws and teeth draw ever closer.....

Spoiler (click to show/hide)



Overall I do agree that this would be a great way to add depth to finding ambushes and sneaking.  Say a sneaking ambushers/adventures comes upon a torch wielding victim.  Ambushers/adventures, depending on their observation/perception skill, will be able to see them more clearly due to being outside the light ring looking in while the torch bearer is restricted to whats in the light ring due to their eyes not being accommodated to the darkness beyond it.  Furthermore it could lead to !!FUN!! if blinding light is added and could lead to some interesting traps.
« Last Edit: April 16, 2012, 11:13:45 am by Supersnes »
Logged
Personally, I like it because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
If murdering parents in front of their kids in the most gruesome manner possible is too much for you, you have not played Dwarf Fortress
You should be drowning babies by now, human.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Light...
« Reply #25 on: April 16, 2012, 11:28:30 am »

Quote
Naturally, we will need to set up fortresses where secret messages are written in red over black walls, and surrounded only by green light, so that the message is only revealed when you bring in red light.

By then it will be too late.   Your torch will flicker its last flame and the sound and nashing of claws and teeth draw ever closer.....

Spoiler (click to show/hide)



Overall I do agree that this would be a great way to add depth to finding ambushes and sneaking.  Say a sneaking ambushers/adventures comes upon a torch wielding victim.  Ambushers/adventures, depending on their observation/perception skill, will be able to see them more clearly due to being outside the light ring looking in while the torch bearer is restricted to whats in the light ring due to their eyes not being accommodated to the darkness beyond it.  Furthermore it could lead to !!FUN!! if blinding light is added and could lead to some interesting traps.

No, worse than that, you were eaten by the Rumia that ate the Grue.  Her talisman is off, she has now gone EX.



The power goal on the old devpages mentions how an adventurer could block the light of the sun, then shift to the side to blind a target with the sun, then strike while they were temporarily dazed. 

Having something like a "shutter" system on a large scale from a fortress, so that you could block the (accursed) Sun before suddenly making it shine down upon your (accursed) enemies to blind them right before the crossbow bolts and mine carts came flying in to stun them and stop dodging might be amusing as a mega defense contract.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

slothen

  • Bay Watcher
    • View Profile
Re: Light...
« Reply #26 on: April 16, 2012, 01:20:06 pm »

unless I'm missing something, light and lamps are on the dev page only as a subsection of adventure mode improvements.  I very much doubt we'll see a comprehensive lighting system implemented for fortress mode.

Have you tried looking at the full dev goals?


Now how was I supposed to find that page?

Hmm, here's a thought for light putting a big burden on FPS in fort mode.  Could light calculations basically be ignored and only invoked when needed?  ie, ambushing enemies, (unrevealed) caverns, etc.  The idea being that static light sources could be calculated once and then only checked when needed, and that dynamic/moving light sources wouldn't be checked at all except in certain circumstances.  Perhaps if a dwarf with a torch was moving through previously revealed spaces, there would be a yes/no check for lighting in a limited radius similar to adventure mode.

Also, would every dwarf carry a torch lantern, or only when going to certain areas, and in that case will the dwarf need to grab a lantern from the lantern stockpile before going into the mining tunnels?
Logged
While adding magma to anything will make it dwarfy, adding the word "magma" to your post does not necessarily make it funny.
Thoughts on water
MILITARY: squad, uniform, training
"DF doesn't mold players into its image - DF merely selects those who were always ready for DF." -NW_Kohaku

Draco18s

  • Bay Watcher
    • View Profile
Re: Light...
« Reply #27 on: April 16, 2012, 01:23:24 pm »

unless I'm missing something, light and lamps are on the dev page only as a subsection of adventure mode improvements.  I very much doubt we'll see a comprehensive lighting system implemented for fortress mode.

Have you tried looking at the full dev goals?


Now how was I supposed to find that page?

Top of the forum:

Quote
Check our development pages. You can find everything in one place at this link.
Logged

kaenneth

  • Bay Watcher
  • Catching fish
    • View Profile
    • Terrible Web Site
Re: Light...
« Reply #28 on: April 16, 2012, 05:12:12 pm »

My take of dwarves and light:
Dwarves have a symbiotic bioluminescent fungus growing in their beards that feeds on their 'filth'. Taking care of the needs for sewage treatment and light sources at the same time.
Logged
Quote from: Karnewarrior
Jeeze. Any time I want to be sigged I may as well just post in this thread.
Quote from: Darvi
That is an application of trigonometry that never occurred to me.
Quote from: PTTG??
I'm getting cake.
Don't tell anyone that you can see their shadows. If they hear you telling anyone, if you let them know that you know of them, they will get you.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Light...
« Reply #29 on: April 16, 2012, 06:08:47 pm »

My take of dwarves and light:
Dwarves have a symbiotic bioluminescent fungus growing in their beards that feeds on their 'filth'. Taking care of the needs for sewage treatment and light sources at the same time.

Minus the "filth" part and the "growing in their beards", that's also a powergoal. 

I'd much rather that any bioluminescent fungus be a cavern feature, anyway.  If some of those species of fungus grew on a diet of "filth", that would be an amusing way to sculpt a fortress.

"Urist, pass more of the chamber pots, I need to "seed" the fungus to help light up my masterwork engraving on this wall."
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare
Pages: 1 [2] 3