So I have this distributed game im working on(for some time now). A part of the world is considered a Chunk object. This object is composed of many other objects/components that are necessary and a part of the Chunk.
In order the clear up the Chunk object which has the responsibility of a smaller area of an infinite world. I Separated some code into their own classes with their own responsibilties. These "smaller" responsibilities inside the Chunk. Are still objects which help solve the single responsibility of a single Chunk.
I kind of had to break Law of Demeter in order to keep the Chunk class more "neat & tidy" by allowing access to important components of the Chunk object.
I've thought about this a lot and I simply can't come to a better solution. The Chunk has a single responsibility which is accomplished by 8 other objects which help solve the Chunk's responsibility. And in order to clear the Chunk object of some code. I instead allowed getting a ChunkBlockComponents which contain access to the objects which help solve other things which are a bit more secondary to the nature of the Chunk(but essential).
To give an example. One component in ChunkBlockComponents is a HeatGrid. Which handles heat inside the Chunk etc. One other(EntitySpaceGrid) contains information which positions are occupied etc.
Then the Chunk object is mainly for adding or removing entities. And if more than that need to be done. Which can't be done when adding something. Then accessing ChunkBlockComponents allows interacting with the right component. For instance, for NearestFinder for finding the nereast entity of a certain type. EntitySpaceGrid for finding out whether an entity itself can move to its new desired position etc..
In this case I am still thinking about moving some public methods into the Chunk object again. To follow Law of Demeter. But that would add a lot of small methods to the Chunk class etc.
The reason for more public methods than just adding and removing entities. Is because of entities being able to update themselves and getting access to the ChunkBlock they are within on each update. To allow them making accurate updates etc..
So I am also wondering. Are big classes always avoidable/bad?