Implement improvements to code design to improve synchronization across players. Will try:
[x] Changing the speed in GridEngine/Phaser (Already done, doesn't seem to help that much, and trades off with how enjoyable and playable the game is (currently set speed to 2, but I think this might be a little too slow, 3 was better/ more fun).
[ ] Adding deliberate delay: Introducing a small, consistent delay before applying updates, you give time for all clients to receive the latest state. However, this needs to be balanced carefully to avoid making the game feel unresponsive.
Changing how shared state is updated:
[ ] Separate static and dynamic properties: Keep rarely changing properties (like color, name) separate from frequently changing ones (position, direction).
[ ] Use more granular updates: Instead of updating the entire player state, update only what has changed.
[ ] Removing the spread operator from the handlerPlayerStateUpdates() function
Implement improvements to code design to improve synchronization across players. Will try:
handlerPlayerStateUpdates()
function