Tag Info

New answers tagged

2

Tekkit (a popular minecraft mod) does this by allowing players to build anchors that keep a few blocks around them in memory regardless of player proximity. It might be a good choice if there is clear distinction between dynamic blocks that require the presence of the player (an automatic door) and others that don't (a generator of some sort). ...


3

In Minecraft, circuits in unloaded chunks simply do not work. Especially with pistons and other ways of interacting with the environment, it could get expensive quickly to keep far-away circuits running in an infinite world. I see three main possible choices for your game: Keep all chunks loaded. This is just a big nope. Keep nearby chunks loaded. For ...


14

What you need to do is separate terrain from live blocks. For example you could store the live blocks in a dictionary that uses a point as key. And then unload the terrain. This way your live blocks stay in memory in a way you see fit, and you can still look them up based on position, but the terrain is stored on disk for later retrieval. This will increase ...


2

This is a good question. I was trying to express that instead of holding an array of pointers to game objects, you can hold an array of game objects themselves, as pointed out by API-Beast in the comments of your question. You can implement this swap operation like this, assuming the array holds structs with simple data (structs with ints, floats, etc., no ...



Top 50 recent answers are included