Updating "Inactive" Chunks

Posted by Conner Bryan on Game Development See other posts from Game Development or by Conner Bryan
Published on 2012-09-06T18:46:16Z Indexed on 2012/09/06 21:53 UTC
Read the original article Hit count: 206

Filed under:
|
|
|

In my game, the only chunks (4x4 areas of tiles) in memory are the ones that the player is in. However, chunks need to have updates applied to them over time. A (likely) well-known example would be MineCraft: even if the player isn't in a chunk, the wheat still needs to grow over time.

My current solution is to call a method and pass in the time since the chunk was active.. but what if the chunk depends on nearby chunks for information, i.e. vines spreading or similar? Is there any reasonable solutions to this problem, or should I simply not depend on nearby chunks?

© Game Development or respective owner

Related posts about 2d

Related posts about java