screeps / driver

ISC License
26 stars 36 forks source link

Game.cpu.halt() function #30

Closed laverdet closed 5 years ago

laverdet commented 6 years ago

This is a commonly requested function. There is a change that goes along with this in engine.

See: screeps/engine#104

artch commented 6 years ago

This is a nice feature to have indeed, but I'm not sure about the risks, how much performance could suffer if a fair number of players start to do this every tick for some reason.

laverdet commented 6 years ago

Something to consider is that some users are already forcing global resets by trying to allocate too much memory. What if halt() cost 500 CPU, or make it so you can only call it when the global is older than 100 ticks or something?

artch commented 5 years ago

Merged to ptr branch. It will be merged to master in a few days, so this PR can still remain open.