Attas wrote:shubla wrote:I had a suggestion that if some tiles woudl regularily be walken over, the ground would eventually turn stomped.
I wonder if this would be better than have people randomly stomp on forest tiles while they walk. I imagine that would be easier to implement, and also could be used as a visual representation of human activity in an area when you're exploring, making you feel less lonely in the world.
I think that loftar said it would be too much load on the RAM data to keep track of activity on tiles. But with implementation that I have in my mind, it would be only 1 or 2 numbers per tile to keep track of or so.
Every time a tile is stomped on, a number attached to the tile would be incremented by one, if it is less than, say, 256 (theoretically fits in 4 bits, probably not in practice)
Then, if the number is big enough. the tile would turn into a stomped tile.
Decay hits would reduce the ticker by some amount, and if it is small enough, it would revert back to a normal tile, if it is a stomped file.
Is the whole map loaded in RAM all the time?
I dont see other reasons why adding one number to each tile would cause issues in ram usage.
One option to reduce the ram usage would be to add the tiles to some vector or such when they are walked through, which would work as a buffer. Sometimes this buffer would be emptied and the values of tiles that can be found in the buffer incremented. This way you wouldnt have to keep all of the tile values in ram, but only a configurable amount of the tiles that the player has walked on. Though it might affect the performance in other ways (emptying the buffer would require some I/O and stuff if the values would be updated on the disk)