Mail Archives: djgpp/1998/08/17/20:17:49
Dear Programmers,
I'd like to thank those of you who helped me with the movement AI problem.
One of you came up with an excellent solution is speedy and very accurate.
However, I know have a problem with vision. The current version of War of
the Runes ( beta .5, may be downloaded at the AwesomePlay web page,
http://www.angelfire.com/biz/aweplay ) has very poor handling of vision.
All there is is a square of light around the player, and it is not blocked
by walls ( you can see everything that is in range ).
I would much rather have more circular lighting area that is blocked by
walls. I have come up with several ideas, but all are rather slow and a bit
redundant.
If anyone can help, I offer my thanks, and whoever can give me the best
algorithm will, of course, get their name in the credits ( oh wow, as said
before ).
War of the Runes is a Rogue-clone ( ever play NetHack or ADOM? ). Its
graphics are ASCII characters used to make a tiledlandscape ( no laughs,
please? Rogue-clones are in high demand, actually... they tend to
concentrate more on gameplay than that crap action gamers are into. ). All
maps are stored at 2-dimensional arrays, with a linked list of objects and
NPCs.
All I need, however, is a fast and efficient way to determine if an X,Y
coordinate is within a circular area with another X,Y coordinate as its
center and a number representing its radius in tiles, and to determine
quickly, of course ) if a wall is inbetween the two points ( prefferably
WITHOUT using bresenhem's algorithm ).
Thanks,
Sean Middleditch
of
AwesomePlay Productions
http://www.angelfire.com/biz/aweplay
aweplay AT hotmail DOT com
- Raw text -