Results 1 to 3 of 3

Thread: Need help to implement a Line-of-Sight algorithm for a roguelike in VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    4

    Need help to implement a Line-of-Sight algorithm for a roguelike in VB

    Greetings,

    I am an amateur programmer from Greece who is currently trying to develop a roguelike resembling ADOM. I would like to implement an interesting algorithm that I found here:
    http://www.geocities.com/temerra/los_rays.html
    This is an algorithm about the Line of Sight (LOS) of the game entities, which means it calculates what an entity can and can't see (eg behind a column). It looks pretty fast and accurate, but alas it is poorly described in detail (especially towards the "end" of the algorithm) and the JAVA code link doesn't work any more.

    I could really use some help, either with a piece of code with the above algorithm, or further explanation with steps on precisely what it does.

    For those of you who have read the article: I actually understand what happens in diagrams a, b and c of the article, but I can't figure out how things evolve later, eg when and where a "pink obstruction" stops. Can it be when the x or y coord of the obstruction vector becomes less than zero? Anyway some VB code always helps!

    Thank you in advance,
    vdweller
    http://vdweller.awardspace.com

  2. #2

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    4

    Re: Need help to implement a Line-of-Sight algorithm for a roguelike in VB

    Sorry for the double post, but I could really use your help on this one. I actually found a piece of C++ code for the aforementioned Line-Of_Sight algorithm here:

    http://utilitybase.com/paste/7632

    Problem is, I can't properly convert it to VB code.

    Please, could anyone write the VB6 implementation of this C++ code?

  3. #3
    Cumbrian Milk's Avatar
    Join Date
    Jan 2007
    Location
    0xDEADBEEF
    Posts
    2,448

    Re: Need help to implement a Line-of-Sight algorithm for a roguelike in VB

    How much does your game resemble ADOM? If your graphics are as simple it should make for a fairly easy line of site algorithm. I might have a look at this later.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width