#Websocket Buffer

1 messages · Page 1 of 1 (latest)

night delta
#
        mob_data = {
            'id': self.mob_id,
            'position':"("+ str(self.position.x)+","+str(self.position.y)+","+str(self.position.z)+")",
            'rotation':"("+ str(self.rotation.x)+","+str(self.rotation.y)+","+str(self.rotation.z)+")",
            'health': self.health
            }

        message = {
            'type': 'mobs_data',
            'mobs': mob_data
        }

Hello, I'm having an issue and I'm looking for a solution. Essentially, I need to send a message containing information about 12 mobs to the players every hour, with a delay of 0.01 seconds between each message.

#

Okay, I changed the delay value to 0.05, and it worked. However, when I added 12 more players, the problem resurfaced. If I increase the delay time, it solves the issue, but then the gameplay won't be smooth. Currently, I'm using the WebSocket peer for communication.

night delta
#

the error no longer appears when I'm inside the game, but when I minimize the game, the error starts acting up.