A controller for managing Screeps game automation and scripts.
This project provides tools and scripts for controlling and automating gameplay in Screeps, the JavaScript MMO game. It includes a local development server and automated deployment system.
- Docker and Docker Compose
- Node.js and npm
- Screeps account and API token
- Clone the repository
- Run the setup command:
make setup
- Edit the
.envfile with your configuration:STEAM_KEY: Your Steam API key (for local server)SCREEPS_TOKEN: Your Screeps API token (get from https://screeps.com/a/#!/account/auth-tokens)SCREEPS_BRANCH: Target branch (default: "default")SCREEPS_PTR: Set to "true" for PTR serverSCREEPS_DRY_RUN: Set to "true" to test deployment without actually uploading
Start the local Screeps server:
make upOpen browser to http://localhost:21025/
Build your code:
make buildDeploy to official Screeps server (screeps.com):
make deployDeploy to local Screeps server (localhost):
make deploy-localTest deployment (dry run):
# Test official server deployment
SCREEPS_DRY_RUN=true make deploy
# Test local server deployment
SCREEPS_LOCAL_DRY_RUN=true make deploy-localThe deployment script uses server-agnostic variable names that work for both local and remote servers:
Required variables:
SCREEPS_HOST- Server hostname (e.g., localhost, screeps.com)SCREEPS_PORT- Server port (e.g., 21025, 443)SCREEPS_USERNAME- Your username/emailSCREEPS_PASSWORD- Your passwordSCREEPS_BRANCH- Target branch
Optional variables:
SCREEPS_DRY_RUN- Set to "true" for dry run
Deployment target:
SCREEPS_TARGET=local- Deploy to local server- No
SCREEPS_TARGET- Deploy to remote server (screeps.com)
For development with auto-rebuild:
make watchmake setup- Initial setup and dependency installationmake up- Start local Screeps servermake down- Stop local Screeps servermake build- Build production codemake build:dev- Build development codemake watch- Watch mode for developmentmake deploy- Deploy to official Screeps servermake deploy:dev- Deploy development build to official servermake deploy-local- Deploy to local Screeps servermake deploy-local-dev- Deploy development build to local servermake logs- View server logsmake restart- Restart servermake clean- Clean build artifacts
src/
├── engine/
│ └── main.js # Main game loop
└── controller/
└── creep.js # Creep behavior controller
MIT