All Projects → Sriep → screeps-obsolete

Sriep / screeps-obsolete

Licence: other
Obsolete - Codebase for screeps game.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to screeps-obsolete

The-design-of-OverDom
the design pattern of OverDom, semi-auto AI in the Screeps
Stars: ✭ 63 (+293.75%)
Mutual labels:  screeps
cppreeps
WASM C++ Screeps API and utilities pack (beta, proof-of-concepts)
Stars: ✭ 38 (+137.5%)
Mutual labels:  screeps
screeps-game-api
Typed bindings to the Screeps in-game API for WASM Rust AIs
Stars: ✭ 99 (+518.75%)
Mutual labels:  screeps
screeps-grafana
Pretty graphs for screeps
Stars: ✭ 61 (+281.25%)
Mutual labels:  screeps
creeptalk
Giving Creeps Social Skills Since 2016
Stars: ✭ 14 (-12.5%)
Mutual labels:  screeps
Screeps-Typescript-Declarations
The repository for *Screeps's* TypeScript type definitions.
Stars: ✭ 69 (+331.25%)
Mutual labels:  screeps
creep-tasks
Screeps plugin for a flexible method of controlling creep actions
Stars: ✭ 45 (+181.25%)
Mutual labels:  screeps
screeps-ConsoleStats
Output stats directly to the screeps console
Stars: ✭ 16 (+0%)
Mutual labels:  screeps
screeps console
Standalone Interactive Screeps Console
Stars: ✭ 54 (+237.5%)
Mutual labels:  screeps
screeps-commander
用于游戏《Screeps》的移动端控制台 WEB 应用
Stars: ✭ 18 (+12.5%)
Mutual labels:  screeps
screeps-multimeter
The most useful tool on your screeps workbench.
Stars: ✭ 69 (+331.25%)
Mutual labels:  screeps
screeps-starter-rust
Starter Rust AI for Screeps, the JavaScript-based MMO game
Stars: ✭ 55 (+243.75%)
Mutual labels:  screeps
screeps notify
Send messages (SMS, Slack) from inside Screeps Scripts
Stars: ✭ 21 (+31.25%)
Mutual labels:  screeps

Screeps AI

This is my screeps library. Designed as a platform for developing screeps AI software. Still in development. It has been tested with my ongoing game and the simulation room training mode. But otherwise, stability cannot be guaranteed. Also check out my webpage for more details.

Usage

Clone repository to your machine then use Grunt to upload to your screeps game.

Features

Currently, consists of several 'class libraries'

Tasks

  • These are in their simplest form a wrapper around creep methods but can get much more complex.
  • Each exposes a doTask function which is called during the move creeps phase if the task is due to be carried out.
  • Tasks are designed to be used with roles.

Roles

These represent an array of tasks which perform some useful function.

  • Each tick the doTask methods from the task at the head of the array are called until a stop criterion is found.
  • A role's array of tasks can be self-modifying, however, in this case, there will typically be one key task that is central to the role.

Routes

Encapsulates the build queue for a room.

  • The route.base node represent the build queues.
  • The other route. nodes represent individual build items.
  • They are designed to be linked to roles.

Flags

This library organises information about game objects.

  • Each game permanent viewed is flagged. This allows the memory of objects in neutral rooms that you might loose view of.
  • Sources and minerals with extractors have harvesting information stored in their flags. Including which room should harvest the resource.
  • Controllers in neutral rooms have information about whether they should be reserved or not, with details about which room is designated to build the creep to perform this.

Race

Library of the various types of creeps used catalogued by body type.

Policy

This is where custom user code is designed to be put.

  • Each policy is run once per tick with handlers so that a finite state system can be set up.
  • The economy for each room is run using policies.
  • These special room policies are where the requests in the flags are enacted.

Main game loop.

As shown below each tick. Memory on dead ticks are freed.

  • Each policy is enacted then all the creeps are moved.
  • At intervals each visible room examined and flags placed on important objects, this is a quick process and ROOM_UPDATE_RATE can probably be set to 1.
  • At a different interval, each flag is processed with information about how the flagged object should be interacted with. This is a time-consuming process that does not need to be carried out that often, so FLAG_UPDATE_RATE can be quite long.
    if (Game.time % gc.ROOM_UPDATE_RATE == 0 ){
         roomBase.examineRooms(true);
    }
    if (Game.time % gc.FLAG_UPDATE_RATE == 0 ){
        flagBase.run();
    }
    freememory.freeCreeps();
    policy.enactPolicies();
    raceBase.moveCreeps();

Creeps

Creeps are not meant to be moved directly either in Policies or elsewhere.

  • Instead, they should be given roles or task lists and sent on their way.
  • The raceBase.moveCreeps method then does all the work.
  • Of course in an emergency feel free to take control of and micromanage individual creeps.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].