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 7547115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:22:17+00:00 2026-05-30T09:22:17+00:00

I have a simple game that uses a 3D grid representation, something like: Blocks

  • 0

I have a simple game that uses a 3D grid representation, something like:

Blocks grid[10][10][10];

The person in the game is represented by a point and a sight vector:

double x,y,z, dx,dy,dz;

I draw the grid with 3 nested for loops:

for(...) for(...) for(...)
   draw(grid[i][j][k]);

The obvious problem with this is when the size of the grid grows within the hundreds, fps drop dramatically. With some intuition, I realized that:

  • Blocks that were hidden by other blocks in the grid don’t need to be rendered
  • Blocks that were not within the person’s vision field also don’t need to be rendered (ie. blocks that were behind the person)

My question is, given a grid[][][], a person’s x,y,z, and a sight vector dx,dy,dz, how could I figure out which blocks need to be rendered and which don’t?

  • 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-05-30T09:22:18+00:00Added an answer on May 30, 2026 at 9:22 am

    I looked into using JMonkeyEngine, a 3D game engine, a while back and looked at some of the techniques they employ. From what I remember, they use something called culling. They build a tree structure of everything that exists in the ‘world’. The idea then is that you have a subset of this tree that represents the visible objects at any given time. In other words, these are the things that need to be rendered. So, say for example that I have a room with objects in the room. The room is on the tree and the objects in the room are children of the tree. If I am outside of the room, then I prune (remove) this branch of the tree which then means I don’t render it. The reason this works so well is that I don’t have to evaluate EVERY object in the world to see if it should be rendered, but instead I quickly prune whole portions of the world that I know shouldn’t be rendered.

    Even better, then when I step inside the room, I trim the entire rest of the world from the tree and then only render the room and all its descendants.

    I think a lot of the design decisions that the JMonkeyEngine team made were based on things in David Eberly’s book, 3D Game Engine Design. I don’t know the technical details of how to implement an approach like this, but I bet this book would be a great starting point for you.

    Here is an interesting article on some different culling algorithms:

    • View Frustum Culling
    • Back-face Culling
    • Cell-based occlusion culling
    • PVS-based arbitrary geometry occlusion culling
    • Others
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ok well i have a simple game that uses really high of memory and
Say I have simple program that emulates a board game with a number of
If I'm making a simple grid based game, for example, I might have a
i have a simple xna game that i want to port that to silverlight,
I have a simple game that is in progress. As of right now all
I have a somewhat simple game that I'm making and now that I'm testing
I have developed a simple interactive Flash game, but now it appears that sometimes
I have a very simple game that consists of only one activity, and I
I have a game that uses layers as a way to organize depth. It
Ok, Just some background... I have a fully functioning game that uses the canvas

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.