SamTheBlow / grand-strategy-game

A grand strategy game made in Godot.
MIT License
7 stars 4 forks source link

Move all synchronization out of GameNode #230

Closed SamTheBlow closed 1 month ago

SamTheBlow commented 1 month ago

Just like how it was done with GameUsernameSync. I believe (I could be wrong) that it would be much better if the all game sychronization code were at the same place. They would all be children of GameSync (a child of the Main node). These nodes would all automatically spawn when a new game is created, and despawn when the game is discarded. If you want to synchronize a game, all you'd have to do is create a GameSync node for it. Also, GameNode is just an implementation detail of the game's visuals. We should be able to make and use different scenes for the game visuals. The visuals shouldn't be responsible for synchronization; even if they were, they would always have the sync nodes, breaking the DRY principle. Alright, that's enough overthinking.

(More detailed tasks TBD)

SamTheBlow commented 1 month ago

Oh yeah also it would make it possible to synchronize a game without having to create visuals for it... Kind of a big deal!