i want to black out tiles that are obstructed by walls or doors. I use a collision layer for things that stop player motion but not their vision such as gates, rocks (this game is overhead view), and things of that sort. Anyone have good ideas for implementing this?
My only idea is a getTile() on a layer specifically for special impedances such as light.
1 decade ago
by jswart
I'm also really interested in learning more about this myself. Please let me know more as you mess around with it. I have an idea for tile based movement that I want to get into first.
One thing I am considering doing is looking through the source for the game
brogue. When I get time to look through it I will post what I find.
This might be more of a tease than anything. This is a project I started but since put on hold to work on
Galaxis instead. Basically recreating the lighting effects of
Terraria.
illuminated.js. You can also check out snooze's
Dynamic lighting/Shadow casting plugin.
1 decade ago
by lazer
Is this the kind of thing you're talking about? (Walk to the glowing head in the darkness, press E to interact, walk around to see tiles being revealed. Tiles are also hidden over time, very slowly if you watch):
http://liza.id.au/jillwidget/
It's an in-progress project that's currently temporarily on hold while I do my procedural level experiment. To be honest the lighting part of it was so screwed up that I can't even explain back how it's done anymore (I unbaked another game and made a whole bunch of modifications). The code in that example should not be baked, maybe it'll come in useful.
Those examples look more like proximity based line of sights...
I was thinking something along these lines
Hi,
I have posted a WIP Tile Shader in another thread:
http://impactjs.com/forums/private/wip-tile-based-shader but the los part of it may help you a little. In your case you may just be able to use a map layer to hold the blocking objects and ref them to your player entity. The Tile Shader currently adds a new dynamic map layer which you probably do not need. Also it currently calculates the tile positions in the arrays but again it maybe that you can simply use .getTile(x,y);
Page 1 of 1
« first
« previous
next ›
last »