/Screeps

The world's first MMO sandbox game for programmers

Primary LanguageJavaScriptMIT LicenseMIT

Screeps

The world's first MMO sandbox game for programmers

What is Screeps?

Screeps means “scripting creeps.” It’s an open-source sandbox MMO RTS game for programmers, wherein the core mechanic is programming your units’ AI. You control your colony by writing JavaScript which operate 24/7 in the single persistent real-time world filled by other players on par with you.

Modules

  1. Main
    • Game main loop
  2. Defense
    • Controls defense units.
  3. Memory
    • Garbage Collector
  4. Scheduler
    • Schedules tasks for creeps based on their roles.
  5. Settings
    • Game settings
  6. Spawner
    • Spawns new creeps based on the settings.
  7. Prototypes
    • Prototypes game objects.

Roles

  1. Container Miner
    • Mines the energy from the sources and put them into a container.
  2. Harvester
    • Collects the energy and fills it into the spawn and extractors.
  3. MacGyver
    • Builds new structures.
  4. Mechanic
    • Repairs the structures.
  5. Trump
    • His duty is to build up a wall, to keep invaders out of the room.
  6. Upgrader
    • Upgrades the room controller, to level up the RCL (Room Control Level) and unlock new buildings.
  7. Trucker
    • Prevents container overfilling, by transporting energy from containers to room storage.

Deployment

  1. Install Dependencies with npm install.

  2. Create a .screeps.json file with the following content:

    {
      "email": "foo@bar.com",
      "password": "SecretPassword",
      "branch": "default",
      "ptr": false
    }
    
  3. Then run grunt screeps.

Ideas/Improvements

  • Create a scheduler for energy harvesting, sometimes the creeps get to the container which is empty yet.
  • More complex spawn system than just a priority list.
  • Expand harvesting to neighbor rooms.
  • Make more use of the memory to save cpu power.