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

  • Home
  • SEARCH
  • 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 8122567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:52:34+00:00 2026-06-06T05:52:34+00:00

I am making simple grid like game ( grid is matrix 128×128) and matrix

  • 0

I am making simple grid like game ( grid is matrix 128×128) and matrix is filled with 0 and 1 ( 1 bullet can pass through, 0 bullet cannot pass through cannot continue to travel anymore, also I have bullet range 32 cells).
I am standing for example at position (32,89). Can anyone suggest me any efficient algorithm for calculating all shootable fields ? ( I know to calculate on simple way with simple checking every filed in range, but I wonder is there better idea)

  • 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-06T05:52:36+00:00Added an answer on June 6, 2026 at 5:52 am

    There is a more efficient algorithm. Eric Lippert has written an excellent series on shadow casting in grid games. If I understand correctly, this is exactly what you need.

    • Shadowcasting in C#, Part One
    • Shadowcasting in C#, Part Two
    • Shadowcasting in C#, Part Three
    • Shadowcasting in C#, Part Four
    • Shadowcasting in C#, Part Five
    • Shadowcasting in C#, Part Six
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I'm making a simple grid based game, for example, I might have a
I am making a simple Java Swing GUI chessboard where the player can drag
So I am making a simple brick breaking game in c#/wpf. I am running
I'm making a game. In the game there is a grid that is populated
I'm making simple game with very simple thread (1 sec delay) got problem with
I'm making a simple WP7 game and I have a little problem with orientation
I'm making a simple snake game in as3. the problem I'm having is that
I'm making a simple RTS game. I want it to run very fast because
I am making simple connection between two table - first one called users has
Im making a simple alternative to the default linux system monitor. Im looking to

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.