Hello team
My friend (definitely not me) has been having a lot of issues with his Python bot not responding to the game in a timely fashion. At first he was doubting his abilities to optimize his program which led him on a witch-hunt for the part of his code causing this delay.
He traced it back to this part of the code:
StarterBot.py
def get_next_player_action(args) -> None:
try:
...
hub_connection.send("SendPlayerCommand", [player_command])
...
except Exception as e:
...
This command alone takes an average of 30ms with highs of 100ms even when sending empty commands.
Anyone know of a way to speed up sending his response back to the game faster? Asking for a friend.
It is as if the Signal library for python has been written to handle calls in series. This is understandable, but because the library itself takes more than 50ms of computation time, the bot basically never sends a command to the game. Even when the game is done, the bot keeps sending commands to the game as it is working through its backlog of requests.
Any ideas? Anyone else having this issue?