Advertisement

[Java] How "System Intensive" Would This Be ?

Started by February 07, 2014 10:01 PM
10 comments, last by RLS0812 10 years, 11 months ago

You could create a function that would return the neighboring chunks by just -1 and +1 of the x and y of the current chunk. For example, if you pass x = 40, y = 50, it will return an array of


[[39, 49], [40, 49], [41,49], [39, 50], [41, 50], [39, 51], [40, 51], [41, 51]]

And have some sort of Chunk management system that given a particular chunk's x and y, it loads that chunk and all its neighboring chunks, and unload the chunks that are no longer needed.

I'll try that as soon as I have the time for it. I should be able to "unload" by declaring the objects null, correct ?

I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.

~ Ralph Waldo Emerson

This topic is closed to new replies.

Advertisement