Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by ShawnSwander

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.

1 decade ago by Graphikos

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.

/><br />
<br />
Took some doing (a lot of doing) so not sure I want to just give out the source.  Sadly it seems even my lighting engine attempts are no match to some things I've seen out there such as <a href= 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.

1 decade ago by ShawnSwander

Those examples look more like proximity based line of sights...
I was thinking something along these lines


/><br />
<br />
Sorry I just did a quick MSpaint touch up showing the players line of sight rays and the two hexes that should be blacked out in this screenshot...  I don't know how to test these rays I've drawn I do have a map layer hidden under the visible one for indicating which tiles block light.			</div>
		</div>
			<div class=

1 decade ago by StuartTresadern

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 »