Any way to check CPU Usage?

  1. What do you want to achieve? Keep it simple and clear!
    I am developing an AI for bots on my game Bomberz. The pathfinding uses A* system to walk on a 5x5 Grid, which is turning quite expensive, even with some solutions I made before, and to reduce performance issues on server, I think I’ll start sending requests to compute path by the clients, distributing work between players that doesn’t seem to have his PC overloaded to save server performance.
  2. What is the issue? Include screenshots / videos if possible!
    I don’t know how to check if a player PC is already using a lot of his process to prevent even more work from their pcs.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried to search on API but I can’t find anything for this problem.

I know people could hack so they control bots not to attack you or become idle, but they will control only a specific Bot on their match and Bots won’t be available on Ranked games if I add the feature, and the only message they will be expected to send will be a table of directions the bot will walk and if it should place a bomb, like this: {“Left”,“Left”,“Left”,“Up”,“Right”,“Bomb”}

You can try to use os.clock().

2 Likes

Oh saw this on API now that you mentioned, seems to be precisely about CPU, thanks I’ll try it.