Bay 12 Games Forum

Please login or register.

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

Author Topic: DF lighting system (I wrote a c++ code) + video  (Read 11257 times)

Cool Guy

  • Bay Watcher
  • inlcude <iostream>
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #45 on: November 26, 2012, 06:51:43 pm »

Fireflies in Jars can be set around the fortress. The Jars being made at a Glass Furnace and you catch fireflies with a 'Capture Live Land Animal Order'
Logged

sockless

  • Bay Watcher
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #46 on: November 26, 2012, 10:24:15 pm »

Can we have some more details, how it runs, more performance details, and so on?
Logged
Iv seen people who haven't had a redheaded person in their family for quite a while, and then out of nowhere two out of three of their children have red hair.
What color was the mailman's hair?

Gaybarowner

  • Bay Watcher
  • [SLOW_LEARNER] [VERMIN_HATEABLE]
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #47 on: November 27, 2012, 08:15:41 am »

Hm what if you took the bonfires from the genesis mod and made it part of it? Also good job looks sexy!
Logged

Starver

  • Bay Watcher
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #48 on: November 27, 2012, 09:59:11 am »

I am aware of how it works Starver. I was just using that as an example people are familiar with.
Sorry!  It's a common misconception(non-conception), that's all.  And then I started blathering.  Probably as a displacement activity for RL. ;)

(Whoops, menat to PM that.... N/m.)
Logged

Talvieno

  • Bay Watcher
  • Hello, Death. How's life?
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #49 on: November 27, 2012, 10:55:43 am »

On one hand, I like the way this looks. On the other hand... Toady One only uses 16 colors, and this doesn't necessarily add anything to fortress mode, as you can see everything to start out with. Not being able to see everything would be a pain, as all miners would have to carry around torches, which would slow down framerate considerably. If the torches were static, then your miners wouldn't be able to mine very far without having to put up a new torch.

That said, a lot of machines that players create (specifically ones involving magma/water) would be almost impossible to build and manage if you couldn't see their insides at all time.

Don't get me wrong, though. I love how those images look. I just don't think implementing it is a good idea.
« Last Edit: November 27, 2012, 10:58:16 am by Talvieno »
Logged
Quote from: Mr Frog
Talvieno ... seems to be able to smash out novella-length tales on demand

Starver

  • Bay Watcher
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #50 on: November 27, 2012, 12:12:54 pm »

I could personally live without it, I'll admit.  I'm more enjoying the intellectual exercise, and perhaps hoping to make it more like I would like it (if/when it happens anyway) by planting some seeds that suit my own desires and get me prepared for any switchover. ;)

OTOH I don't believe the 16 colour thing is the limitation it might have been a decade or so ago (or longer?  My, hasn't time flown?  I'm feeling old again...) because the machines aren't going to be overtaxed, leastwise not by the display mode.

I suppose the main thing is whether the current curses-ish engine can do what's being asked of it, or perhaps can be forced to do so by importing the basic tileset resource but expanding that out to an "all required combinations of shade and brightness" one, internal to DF, before giving the tile-placer slightly more complex instructions to draw from this superset much as if affects have been applied on-the-fly.
Logged

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #51 on: November 27, 2012, 06:02:48 pm »

Bear in mind that Toady is planning to add some form of lighting at some point...
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

NAV

  • Bay Watcher
  • I have an idea!
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #52 on: November 29, 2012, 04:17:12 pm »

It would be a good idea to add mirrors that can reflect light. That way the dwarves could have one massive central light source, and direct it all over the fortress with mirrors. Not sure of it's effect on frame rate though.
Logged
Highmax…dead, flesh torn from him, though his skill with the sword was unmatched…military…Nearly destroyed .. Rhunorah... dead... Mastahcheese returns...dead. Gaul...alive, still locked in combat. NAV...Alive, drinking booze....
The face on the toaster does not look like one of mercy.

Starver

  • Bay Watcher
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #53 on: November 29, 2012, 04:40:42 pm »

A light source redirected (say) 40 tiles north, 40 tiles east and 20 tiles down into the depths, thus 100 tiles away by the most efficient 3D Manhattan route of reflected light, that was bright enough to see by at this extremity would be ten thousand times brighter just one tile away.

Even if it was a direct double-diagonal route, it would have to be a difference of three thousand six hundred times, for a distance ratio of 1:60 (or 60:1, if you so wish).


I'm not saying don't do it that way, but... there may be issues... Still, with a parabolic mirror you might be able to see off invaders/unwated traders/pesky no-skill migrants/random wildlife...
Logged

GreatWyrmGold

  • Bay Watcher
  • Sane, by the local standards.
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #54 on: November 29, 2012, 08:43:23 pm »

Mirrors sound neat.
Mirrored corridors would probably reduce total light loss.
Logged
Sig
Are you a GM with players who haven't posted? TheDelinquent Players Help will have Bay12 give you an action!
[GreatWyrmGold] gets a little crown. May it forever be his mark of Cain; let no one argue pointless subjects with him lest they receive the same.

Starver

  • Bay Watcher
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #55 on: November 29, 2012, 08:57:22 pm »

And vampire-detectors!
Logged

Cool Guy

  • Bay Watcher
  • inlcude <iostream>
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #56 on: November 30, 2012, 09:52:47 pm »

I am aware of how it works Starver. I was just using that as an example people are familiar with.
Sorry!  It's a common misconception(non-conception), that's all.  And then I started blathering.  Probably as a displacement activity for RL. ;)

(Whoops, menat to PM that.... N/m.)
Are you intentionally trying to insult people by explaining the most simple things?
Logged

nop

  • Bay Watcher
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #57 on: December 01, 2012, 11:44:27 am »

I`m busy with implementing A* as I have to test engine in a real-time environment. Also, there was a problem with doors because doors modify shadow maps on closing.
Not sure about vanilla graphics, btw. Anyway, engine is responsible for calculating lighting, not drawing tiles, so it should be possible to deal with multiple drawing schemes: gradients, vanilla graphics or even using lighting engine for simulating "memory" just like in adventure mode
Logged

nop

  • Bay Watcher
    • View Profile
« Last Edit: December 01, 2012, 11:32:19 pm by nop »
Logged

Cool Guy

  • Bay Watcher
  • inlcude <iostream>
    • View Profile
Re: DF lighting system (I wrote a c++ code)
« Reply #59 on: December 02, 2012, 01:43:11 pm »

youtube
https://www.youtube.com/watch?v=dD3-vrz_bYQ
https://www.youtube.com/watch?v=wih3k0wnsnc
https://www.youtube.com/watch?v=-ncqex8ijIM
So from what I can tell they need to be able to see to path somewhere? It also looks like they are carrying their own light source. If this is the case then you have a bunch of dwarves all over constantly looking around like their lost. That will kill any lower end computers. I really think that there should be constant light fixtures (bonfire,torches ect.) that would give off light and if they go outside this light they start to move slower and their pathing might mess up every so often, Definitely not a ton of dwarves looking around all the time. I also noticed that this made the light constantly fluxuate, especially around tight corners which would probably kill anyones eyes after a while of playing.
Logged
Pages: 1 2 3 [4] 5