Reply-To: "Sean Middleditch" From: "Sean Middleditch" Newsgroups: comp.os.msdos.djgpp Subject: Vision Algorithm Date: Fri, 14 Aug 1998 23:47:37 -0400 Lines: 43 Organization: AwesomePlay Productions NNTP-Posting-Host: usr19-069.provide.net Message-ID: <35d505e6.0@news.provide.net> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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