Increasing API response time
I have a problem
A biggie to.
On line 249 of the given repl, the problem is illuminated.
For those of you who are not sure what is going on.
Ignore everything but lines 240-253.
They are unimportant. What matters is that that I created a request to an API that I made, https://replit.com/@sojs/MultiSnake-R-500#index.js, and it logs the time that it took to respond.
The below is a nice screenshot of that.
But. We have a problem. For those of you that delve deep into the games code you will see that the API runs a bot for my game. It gets all the data, and returns a direction for the snake to travel in. You will notice that the game loop runs once every 120 milliseconds. Look back at the response times. 400ms. 200ms. But not one below 120. Any suggestions on either the game (be glad to hear them) or how to lower the response time? Remember, I do not want to buy hacker plan and add a boost. I have already tried setting a timeout to the request but that just meant that my bots never moved becuase the servers could never respond within the timeout. How do I change this? Open to any suggestions.