Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game.cpu.halt() function #30

Merged
merged 1 commit into from
Dec 14, 2018
Merged

Game.cpu.halt() function #30

merged 1 commit into from
Dec 14, 2018

Conversation

laverdet
Copy link
Contributor

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

See: screeps/engine#104

@artch
Copy link
Contributor

artch commented Nov 5, 2018

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
Copy link
Contributor Author

laverdet commented Nov 5, 2018

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
Copy link
Contributor

artch commented Dec 10, 2018

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

@artch artch merged commit 10c3b57 into screeps:master Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants