Toggle Dark Vision to show area's that have no light.

A place to record your ideas for the game.
Post Reply
qsleepy
Joined: Fri Feb 26, 2016 11:32 pm
Byond Username: Qsleepy

Toggle Dark Vision to show area's that have no light.

Post by qsleepy » #157505

Hi guys!


I am new to coding, was hoping maybe someone could push me in the right direction to accomplish this task? As a xeno, hunting people would be easier if you could tell which area's lie in complete darkness without having to do the toggle. I plan on experimenting with it so maybe change the colors or the opacity, however I have like ZERO clue where to start. I know how to program in c# and have just started with this code. Has anyone messed with the lighting/dark vision stuff before? Maybe tell me where it even is? Haha.



Thanks!
User avatar
PKPenguin321
Site Admin
Joined: Tue Jul 01, 2014 7:02 pm
Byond Username: PKPenguin321
Github Username: PKPenguin321
Location: U S A, U S A, U S A

Re: Toggle Dark Vision to show area's that have no light.

Post by PKPenguin321 » #157510

https://github.com/tgstation/-tg-statio ... 2%9C%93&q=

searching for things is your bestest friend

https://client01.chat.mibbit.com/?serve ... 23coderbus

other coders are your side-friend who's even better but doesn't like being seen with you
i play Lauser McMauligan. clown name is Cold-Ass Honkey
i have three other top secret characters as well.
tell the best admin how good he is
Spoiler:
Image
Malkevin

Re: Toggle Dark Vision to show area's that have no light.

Post by Malkevin » #157549

Its actually quite simple, the darkness layer is a sprite sheet of various alpha channels of darkness
IIRC the code automatically adjust the number of darkness layers to the number of sprites in the sheet, so change the darkness levels at the dark end is as simple as change which file it loads them from.
I can't remember what section of code handles the darkness stuff, you'd probably have an easier time looking through the sprite sheets to find the one does the darkness.

Mobs also have (or had, I think it might've been removed?) a darksight_range var which determines how far a mob can see in total darkness.
User avatar
MisterPerson
Board Moderator
Joined: Tue Apr 15, 2014 4:26 pm
Byond Username: MisterPerson

Re: Toggle Dark Vision to show area's that have no light.

Post by MisterPerson » #157973

Malkevin wrote:Its actually quite simple, the darkness layer is a sprite sheet of various alpha channels of darkness
IIRC the code automatically adjust the number of darkness layers to the number of sprites in the sheet, so change the darkness levels at the dark end is as simple as change which file it loads them from.
I can't remember what section of code handles the darkness stuff, you'd probably have an easier time looking through the sprite sheets to find the one does the darkness.

Mobs also have (or had, I think it might've been removed?) a darksight_range var which determines how far a mob can see in total darkness.
This isn't true and hasn't been true for quite a long time.
I code for the code project and moderate the code sections of the forums.

Feedback is dumb and it doesn't matter
Malkevin

Re: Toggle Dark Vision to show area's that have no light.

Post by Malkevin » #157976

Ah, never mind then.

How does it work now?
Post Reply

Who is online

Users browsing this forum: Bing [Bot]