Tagged: line of sight Toggle Comment Threads | Keyboard Shortcuts

  • danielsaidi 5:18 pm on February 21, 2010 Permalink | Reply
    Tags: , , , line of sight,   

    A board game with tiles in XNA 

    During my experimenting with the XNA framework, I am currently developing a board game where the game board is made up of a grid of square shaped tiles, over which player and monster pieces can move horizontally and vertically.

    Board movement example

    Game pieces can move horizontally and vertically

    So far, the board/tile model have presented these three main problem areas:

    • What is the best way to parse a bitmap into a game board, to make it easy to create dynamic mission maps?
    • Given a set of walkable and non-walkable tiles, how do I find the shortest path from tile A to tile B?
    • How can I determine if tile A is visible from tile B?

    I have successfully solved the first two problems, of which the first is presented in the next post.

     
  • danielsaidi 1:46 am on February 21, 2010 Permalink | Reply
    Tags: , line of sight,   

    A* algorithm implemented for XNA 

    I have implemented a dynamic A* algorithm, which will find the shortest way through a grid of tiles. If multiple possible paths exist, the algorithm will choose a random path, which adds to the random behavior of any computer character that is to be given an illusion of intelligence.

    I will publish the algorithm source code here as soon as I have rewritten it a bit. I will then begin working on an algorithm that will determine the line of sight from a tile in the grid…that is, which tiles can I see if I stand on a certain tile?

    If anyone have implemented such an algorithm, feel free to help me out.

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel