Hello, recently I started learning system-oriented scripting, but there are still some things I don’t fully understand yet. I’m trying to structure my code properly but I’m unsure how to separate responsibilities between modules.
For example, I have an OOP Block object with methods like UpdatePosition(). I also created a GridService that converts world positions into grid positions and helps snapping things to a grid.
My questions are:
-Should I have a separate module responsible for creating blocks (like a BlockFactory or BlockService)?
-Should another module be responsible for moving blocks?
-Or should the Block object itself handle movement logic using the GridService?
Right now I’m also unsure about the correct responsibility split. For example: My GridService can convert world position to grid position, but should it also be used directly by a system that moves blocks, or should there be another layer (like a movement/placement system) that uses the grid service and then tells the blocks where to move?
Basically, I’m trying to understand how to -properly separate:
creation of blocks
-movement/placement logic
-grid conversion logic and the block object itself
If anyone has examples, architecture explanations, or even a small system breakdown that could help me understand how to structure this properly, I would really appreciate it
** You are now Level 1! **