Hi guys,
I’m developing a little mmorpg and I’m stuck with this problem: I had multiple server nodes (threads) handling different map regions, the nodes received packets from the network and proccessed them to update the game, I had a queue for incoming packet and every update tick a packet was processed, every UNDEFINED_NUMBER of ticks I performed the region update (mob movemente, mob attacks etc)
But I thought it wasn’t a good idea to stop the packet processing with a big regionUpdate() method so I created two different thread:
-regionUpdater, which only performs region updates every tot of milliseconds (6-7 times a second maybe)
-regionHandler, which still processes incoming packets
But now the problem is: if the regionUpdater is updating player1’s health and the regionHandler receives a packet that contains information about the player1’s health (maybe he’s been attacked) I have a consistency problem with that player.
Have you got any solution for this? Maybe I have to go back to the design phase Have you got any better idea for my design?