Jump to content
  • Advertisement
Sign in to follow this  
MARS_999

Larger 2D grid array, how to make sub grids?

This topic is 2472 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Anyone know of any std::lib algorithms what will take a 2d grid and break it down into chunks? or your own algorithm?

e.g. say you have a 129x129 grid you want 33x33 grids from that main grid? and be able to say what order you want them in?

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
If you want to make arbitrary chunks from an array, use a multidimensional array and be done with it. Was there something else you needed ?
an algorithms to break an array into chunks is something that you should do, not any standard algorithm.

Share this post


Link to post
Share on other sites
I don't quite understand what you're after. What do you mean by making a sub-grid? What is it that you want to break down into chunks; the order the cells are traversed, or something else?
Also, why are those numbers one more than a power of two? Are you expecting to produce 4 non-overlapping chunks width and height-wise?

Share this post


Link to post
Share on other sites

I don't quite understand what you're after. What do you mean by making a sub-grid? What is it that you want to break down into chunks; the order the cells are traversed, or something else?
Also, why are those numbers one more than a power of two? Are you expecting to produce 4 non-overlapping chunks width and height-wise?


Correct.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!