Skip to content

bot optimizations#45

Open
royal0959 wants to merge 1 commit into
easy-games:mainfrom
royal0959:bot-optimization
Open

bot optimizations#45
royal0959 wants to merge 1 commit into
easy-games:mainfrom
royal0959:bot-optimization

Conversation

@royal0959

Copy link
Copy Markdown
Contributor
  1. When a client sends a command to the server, that command is encoded on the client then decoded on the server. This is also done by bots whenever they generate a command, however, there's no need for this encoding/decoding process for bots because they pass on their command directly to the server which immediately decodes it. I changed it so that bots pass on their raw command and bypass the decoding which greatly improves performance for each bot

  2. Whenever a player joins or leaves the game, ServerModule.SendWorldState will be ran on every chickynoid character, which goes through every chickynoid character to compile the world data to be sent to each player. However, even for bots which don't have a client, ServerModule.SendWorldState will still go through its entire process including iterating through every chickynoid character. This makes it so when the server has a big number of bots, every time a player joins / rejoins there will be a brief drop in server performance due to all the world state data compiling going on for every bot. I've made it so this function doesn't try to compile world state data for bots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant