Tag Info

New answers tagged

0

I will just focus on just one topic in this answer: If you want to unload distant circuits to save CPU time and/or memory, what will happen to complex circuits that spred across multiple chunks? Igore this problem. Easy to implement, but unsatisfactional behaviour. Let player be aware of this problem, and give him a tool to display chunk bounds. I think ...


0

Just an idea on a way to handle this without it bogging the game down too much. What you could do instead is enforce a game mechanic that only runs that "redstone block" when it is connected to some sort of rare or hard to craft "Power" block, suggesting that the presence of the player powers the "redstone" and is required to run it. I believe that how it ...


4

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). ...


5

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 ...


15

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