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 mattahj

Play here: http://mattahj.co.uk/eft/

A roguelike I'm working on for one game a month - march edition. It's not at all finished yet!

1 decade ago by drhayes

Neat! The line of sight code seems to be working great. What generator did you use? What LoS code?

1 decade ago by mattahj

I used the grid based dungeon generator from roguebasin (http://roguebasin.roguelikedevelopment.org/index.php?title=Grid_Based_Dungeon_Generator) with A* to connect the rooms.

The LoS is quite basic:

1. Is the square within a certain distance to the player?
2. use the trace() method that comes with impact's collision map to see if the square is visible
3. Set alpha on the square to something appropriate for the distance it is at from the player

1 decade ago by unstoppableCarl

mattahj
Looks really good. The font is distorted and is difficult to read.
Are you going to share your code?
How do you use the trace method to determine line of sight?

1 decade ago by mattahj

Yah, its the font that comes with impact. I think I'll change it at some point :)

This post: http://impactjs.com/forums/help/line-of-sight/page/1 shows how to use trace for LOS. At the moment the code is really hacky as I'm sort of learning impact / gamedev / javascript as I go. If I get it in to a nice easy to understand and well tested state I'll probably throw it on to github.
Page 1 of 1
« first « previous next › last »