Skip to main content
1 of 3

Loading and unloading "chunks" of tiles in a 2d tile engine with 2d camera

I am making a 2d tile based game in C# and XNA 4.0. I am having trouble loading and unloading "chunks" of tiles(blocks). The whole world is randomly generated and is infinate on both axis. How would I go about loading and unloading chunks of tile data in the camera's view?

A pastebin to the pastebin links(I still have the 2 link cap):

http://pastebin.com/9PYr8cvC