Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualServant of the Lord

Posted 07 February 2013 - 10:54 PM

In my game, I have the map broken into 'chunks' of 20x20 tiles.

 

If the player is on Chunk(0,0), then the game loads chunks (0,0), (0,1), (1,1), and etc... It loads the current chunk the player is on, and each chunk around the player.

Every time a player crosses a chunk boundry, all the current unneeded chunks are the discarded, and the new chunks are loaded, but I hold onto the existing chunks that were already loaded and don't discard them if they are still within one chunk of the player. (For simplicity, just discard every chunk and reload every new chunk around the player first, then rewrite it to try and preserve the chunks that don't need to be discarded and reloaded)

 

But the map has to already be broken up into seperate files to stream it this way.


#1Servant of the Lord

Posted 07 February 2013 - 10:52 PM

In my game, I have the map broken into 'chunks' of 20x20 tiles.

 

If the player is on Chunk(0,0), then the game loads chunks (0,0), (0,1), (1,1), and etc... It loads the current chunk the player is on, and each chunk around the player.

 

But the map has to already be broken up into seperate files to stream it this way.


PARTNERS