[A11] Darkness

Started by Viceroy, February 11, 2015, 12:54:42 PM

Previous topic - Next topic

Igabod

Quote from: Viceroy on March 02, 2015, 07:15:21 PM
As for the outdoor lights. I'd love to but that's Igabod's realm. He is the warrior of light. I am but the servant of darkness. :p

Lol, that's the first time I've ever been called a "warrior of light" (I've been called the spawn of Satan a few times though). But just because I've released a lighting based mod doesn't mean someone else can't make lights.

StorymasterQ

Quote from: Igabod on March 02, 2015, 08:15:40 PM
Quote from: Viceroy on March 02, 2015, 07:15:21 PM
As for the outdoor lights. I'd love to but that's Igabod's realm. He is the warrior of light. I am but the servant of darkness. :p

Lol, that's the first time I've ever been called a "warrior of light" (I've been called the spawn of Satan a few times though). But just because I've released a lighting based mod doesn't mean someone else can't make lights.

And Igabod said, "Let there be light," and there was light.

Don't make light of your accomplishments!
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. - Myself

The dubious quotes list is now public. See it here

Viceroy

Quote from: Igabod on March 02, 2015, 08:15:40 PM
Lol, that's the first time I've ever been called a "warrior of light" (I've been called the spawn of Satan a few times though). But just because I've released a lighting based mod doesn't mean someone else can't make lights.

Lol who hasn't amirite?

I /would/ add more lights, but I think it's better to just direct them to yours, so I'll add a link to your lighting mod as a recommended go-together. I myself use it constantly. It really is a bit hard in the darkness otherwise.

But yeah you should take a look at the mining co helmet mod to see how they did a moving light. Maybe you can do some similar stuff, like making a top-layer clothing item that emits light. Like one one of those shoulder lamps they use in Aliens.
Dog goes moo!

Batpeter

Quote from: akiceabear on February 27, 2015, 11:15:49 PM
QuoteI really like this mod but I recognized that in rainy nights you literally can't see anything which is both unpleasant when you want to organize things at night and obstructive if you have to fight. Please alter this a bit so it's getting less extreme.

I believe this is as intended, and like it that way. I suggest adding a mod with improved lighting options (indoor and outdoor) to address your two concerns.

I agree with the OP, those super dark nights are a great idea, but as of now they are too dark (100% black). I even thought it was a bug at first. It's a little silly that everything still works as normal but you can't see anything anymore. Also it interferes with many of the games effects such as rain and the numbers underneath resources and names of colonists.

Igabod

Quote from: Viceroy on March 03, 2015, 04:58:32 AM
But yeah you should take a look at the mining co helmet mod to see how they did a moving light. Maybe you can do some similar stuff, like making a top-layer clothing item that emits light. Like one one of those shoulder lamps they use in Aliens.

I've been toying around with the idea of doing a flashlight object or something that is worn on the top layer of hand. But I've been too busy to really delve into any .dll work (which is required for the lights like the mining helmet). I've got that on my to-do list for the Advanced Lamps mod or maybe as a standalone mod though.

akiceabear

Quote from: Igabod on March 03, 2015, 07:08:22 AM
Quote from: Viceroy on March 03, 2015, 04:58:32 AM
But yeah you should take a look at the mining co helmet mod to see how they did a moving light. Maybe you can do some similar stuff, like making a top-layer clothing item that emits light. Like one one of those shoulder lamps they use in Aliens.

I've been toying around with the idea of doing a flashlight object or something that is worn on the top layer of hand. But I've been too busy to really delve into any .dll work (which is required for the lights like the mining helmet). I've got that on my to-do list for the Advanced Lamps mod or maybe as a standalone mod though.

Would love to see this, especially with the pitch black version of this mod!

Viceroy

You should dive into .dll's sooner rather than later imo. It is really easy to assemble and run. And using ILSpy you can peek at all the game's code. Tynan writes very understandable code.

Also: UPDATE.

It is nothing major since the mod is tiny. But it adds some colour to transitions. And also added a slightly brighter version. I haven't done much testing of it. So let me know if it sucks butthole and I'll tweak it some moar.

Ciao dudes! You all rock!
Dog goes moo!

daft73

This looks nice, ambiance is always great. Will report if needed. Thanks or your work.

Shraniken

One of my favorite mods. Now just need a flash light with a long cone of light.

Viceroy

Ah man if only coned light was possible for my skillset. I'm not even sure it is at all possible in the game.

And thanks for the compliments :)
Dog goes moo!

Igabod

Quote from: Viceroy on March 03, 2015, 01:14:16 PM
You should dive into .dll's sooner rather than later imo. It is really easy to assemble and run. And using ILSpy you can peek at all the game's code. Tynan writes very understandable code.

Also: UPDATE.

It is nothing major since the mod is tiny. But it adds some colour to transitions. And also added a slightly brighter version. I haven't done much testing of it. So let me know if it sucks butthole and I'll tweak it some moar.

Ciao dudes! You all rock!

I already have a couple mods with .dll's. I was just saying I don't have time for anything other than quick simple XML things at this time. I'm busy getting my house ready to be rented by a friend and packing all my stuff and basically preparing to move across the country this summer.

Also, coned light flashlights would be cool. But like Viceroy already said, I don't know if it's even possible. I assume it is since nearly anything is possible for the right C# guru, but I'm not that C# guru.

RemingtonRyder

I imagine it's quite possible, but updating a bunch of cells with new lighting data while a pawn is moving might be fairly intensive.

As for how to do it, I think the first trick is figuring out how to make a matrix of values from an angle (the direction a pawn is facing in) and the distance which the flashlight can illuminate. This is something which can be pre-calculated once and turned into a lighting offset array - basically, only the tiles which you want to light, relative to the pawn's position.

You can make further optimisations by looking at the existing lighting code to see if there's a cheap way of lighting multiple tiles e.g. whether you can specify a rectangular area - if so, you can find the biggest rectangle in the offset array and save yourself having to go through all of those individually. Then, having done all of this, you need not re-calculate all of these, just stash them in memory to retrieve later.

I know that Mining&Co collection of mods has a mining helmet which gives off light, so having an equipped flashlight is certainly possible.

Rock5

Then the question becomes, "Why do you need a cone shaped light?" What purpose does it serve? If I'm not mistaken the only thing the colonist care about is if they are standing in light, not whether there is light ahead of them. Unless this is just a case of "lets see what we  are capable of doing", which is good enough reason to do it I suppose.
Rock5 [B18] Mods
- Butchers Can Count Meat
- Sun Lamp Planner
- JTZoneButtons
- RimSearch
- JTExport

Igabod

Quote from: Rock5 on March 03, 2015, 06:54:32 PM
Then the question becomes, "Why do you need a cone shaped light?" What purpose does it serve? If I'm not mistaken the only thing the colonist care about is if they are standing in light, not whether there is light ahead of them. Unless this is just a case of "lets see what we  are capable of doing", which is good enough reason to do it I suppose.

It's mainly for aesthetics. A flashlight would project light forward in a cone. With the light code provided in the mining helmet it would look weird for an object called a flashlight. A lantern would be a better term for the type of light we are capable of producing now. Also, it is a neat experiment to see what is possible. Also, there are probably a million different ways to achieve that effect, so it could be very interesting to see how different people do it. I'd personally be interested in seeing the results of 50 different people trying to make a cone of light just for the various tricks they might come up with, which could actually help other modders with different projects.

akiceabear

Play prison architect - light and visibility cones definitely can matter beyond aesthetics. helps a lot with tension!