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

A place to record your ideas for the game.

Moderators: MisterPerson, Code Maintainers

qsleepy
 
Joined: Fri Feb 26, 2016 11:32 pm
Byond Username: Qsleepy

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

Postby qsleepy » Fri Feb 26, 2016 11:39 pm #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
In-Game Game Master
 
Joined: Tue Jul 01, 2014 7:02 pm
Location: U S A, U S A, U S A
Byond Username: PKPenguin321
Github Username: PKPenguin321

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

Postby PKPenguin321 » Fri Feb 26, 2016 11:57 pm #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

User avatar
Malkevin
Confined to the shed
 
Joined: Thu May 01, 2014 4:33 pm
Byond Username: Malkevin

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

Postby Malkevin » Sat Feb 27, 2016 1:49 am #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.
This space intentionally left blank.

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.

Postby MisterPerson » Sun Feb 28, 2016 9:39 am #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

User avatar
Malkevin
Confined to the shed
 
Joined: Thu May 01, 2014 4:33 pm
Byond Username: Malkevin

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

Postby Malkevin » Sun Feb 28, 2016 10:21 am #157976

Ah, never mind then.

How does it work now?
This space intentionally left blank.


Return to Ideas

Who is online

Users browsing this forum: No registered users