Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8930925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:59:57+00:00 2026-06-15T08:59:57+00:00

I am going to try my hat at programming a game. My game will

  • 0

I am going to try my hat at programming a game. My game will need to run the A* path finding algorithm on a traditional game grid.

Like this for example: (S=Start, G=Goal, X=Wall)

-------------------------------
|  |  |  |  |  |  |  |  | G|  |
-------------------------------
|  |  |  |  |  |  |  |  |  |  |
-------------------------------
|  | X| X| X| X|  |  |  |  |  |
-------------------------------
|  |  |  |  | X|  |  |  |  |  |
-------------------------------
| S|  |  |  |  |  |  |  |  |  |
-------------------------------

To implement A*, I will need to be able to get the “neighbors” of any node. (For Example, Start has 3 neighbors (Above, Diagonal, and Right).)

The ways that come to mind to map this at a data layer is a 2 dimensional array or a linked list.

The array seems like the most performant and easy to pull off. So if S was [0][4], then its neighbors would be [0 + 1][4] (Right), [0][4 - 1] (Above), [0 + 1][4 - 1] (Diagonal)

But having done .NET application development for a few years, basic arrays seem a bit old school to me.

So before I go down that road, I thought I would ask if there is a nice .NET collection type I can use to map out a grid (at the data layer, not the UI).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:59:57+00:00Added an answer on June 15, 2026 at 8:59 am

    Arrays sounds like the right choice in this case. Remember that most of the data structures provided are attempting to provide different functionality.

    Given that the only abstract method you need (neighbors) is a quick implementation, there is no reason to use anything more complex as your basis.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm going to try to explain this best I can I will provide more
This is very hard to explain but I'm going to try. We run a
I'm going to try and explain this as simply as I can, it's most
Ok, I'm going to try to make this more clear because my last question
I'm totally stuck on what is going on when I try to run the
I'm going to try to explain this in simple terms, because it's probably shorter
I'm going to try this new cloud technology. So I think the best place
OK, I'm going to try my best to explain my problem. I have this
This is a far stretch but i am going to try an explain the
I'm going to try and explain this the best I can. I used this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.