Lighting Test

by Nadrew
Just a quick dynamic lighting test.
ID:2033630
 
Updates
- Changed circle light graphic to a smoother one, still not quite perfect but a lot better than what it was

- Added a bunch of fancy little debug commands to fiddle with your light source.

- Updated the lamps to have a slight random flicker to them.

- Fixed color setting typo on the master plane causing opacity to show up white.

- Added comments to the code, and cleaned the code up a bit.

- Updated the randomly moving mobs to have random light alphas, sizes, and colors.

- Added square and triangle lights, but got lazy when drawing the base graphics for them.
I've just tried to load this up, but when I run the demo my screen is black. :S

I've tried messing around with hardware/software mode in the Dream Seeker preferences but all I'm getting is a black screen.

Any idea what could cause this? I noticed in the comments you mentioned software mode users would get a black screen, but I've got the hardware mode box ticked in the preferences. /:
Everything looks find on my end. Seems like something might be preventing BYOND from running in hardware mode for you. Make sure you have the latest video drivers for your system and all that.
Ah that might be why, having to run BYOND through a virtual machine. Never mind then, was looking forward to playing around with the planes.
Hardware mode requires proper DirectX 9 support.
You're actually missing out on quite a lot of stuff by using software mode, not just planes and whatnot. Multiplicative blending in general doesn't work on software mode.
I'd still be able to utilise it if I used the web client to test, it just means debugging and trial and error will take a bit longer if I have to refer to the web client for everything. Which feels like more trouble than it's worth.

The joys of there being no OSX support for Dream Maker! Ah well, thanks Nandrew. :)
The web-client currently doesn't support PLANE_MASTER, so it won't accomplish this either, but it will eventually.
What about having a HUD, how would I override plane_master so that it doesn't effect HUD elements?
Throw the HUD on a higher plane than the other stuff is on.
i'm getting 2 errors trying to compile this directly through byond.

light_stuff.dm:13:error: PLANE_MASTER: undefined var
light_stuff.dm:13:error: : expected a constant expression
You need to use the latest BYOND beta version.
ok i just updated to the beta version.
Hey, just wanted to say thank you for posting this - I'm using it as reference for implementing a planar lighting system in SS13 and I wouldn't have had any idea where to start without finding this.

Hugely appreciated!
Keep in mind BYOND's big icon bug prevents most practical usage of this at the moment as light sources won't be visible outside of a certain range even if their graphic should extend that far. Hopefully it'll be fixed soon.
I managed to work around that bug using sight |= SEE_PIXELS.

EDIT: diff for the system.
Ah yeah, that'd do it for smaller stuff. Good catch.
I'm getting a weird bug when I run this o.o
Details?
for some reason when u do params2list on the params for double clicking on a turf, or anything, it returns the wrong icon-x and icon-y value. i set the players step x and step y based off those values(and their bounds and bound values) in my game so its a big issue. any idea how to fix without just not using this?
Page: 1 2