• Stars
    star
    440
  • Rank 99,050 (Top 2 %)
  • Language
    TypeScript
  • License
    The Unlicense
  • Created over 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Starter kit for TypeScript-based Screeps AI codes.

Screeps Typescript Starter

Screeps Typescript Starter is a starting point for a Screeps AI written in Typescript. It provides everything you need to start writing your AI whilst leaving main.ts as empty as possible.

Basic Usage

You will need:

  • Node.JS (10.x || 12.x)
  • A Package Manager (Yarn or npm)
  • Rollup CLI (Optional, install via npm install -g rollup)

Download the latest source here and extract it to a folder.

Open the folder in your terminal and run your package manager to install the required packages and TypeScript declaration files:

# npm
npm install

# yarn
yarn

Fire up your preferred editor with typescript installed and you are good to go!

Rollup and code upload

Screeps Typescript Starter uses rollup to compile your typescript and upload it to a screeps server.

Move or copy screeps.sample.json to screeps.json and edit it, changing the credentials and optionally adding or removing some of the destinations.

Running rollup -c will compile your code and do a "dry run", preparing the code for upload but not actually pushing it. Running rollup -c --environment DEST:main will compile your code, and then upload it to a screeps server using the main config from screeps.json.

You can use -cw instead of -c to automatically re-run when your source code changes - for example, rollup -cw --environment DEST:main will automatically upload your code to the main configuration every time your code is changed.

Finally, there are also NPM scripts that serve as aliases for these commands in package.json for IDE integration. Running npm run push-main is equivalent to rollup -c --environment DEST:main, and npm run watch-sim is equivalent to rollup -cw --dest sim.

Important! To upload code to a private server, you must have screepsmod-auth installed and configured!

Typings

The type definitions for Screeps come from typed-screeps. If you find a problem or have a suggestion, please open an issue there.

Documentation

We've also spent some time reworking the documentation from the ground-up, which is now generated through Gitbooks. Includes all the essentials to get you up and running with Screeps AI development in TypeScript, as well as various other tips and tricks to further improve your development workflow.

Maintaining the docs will also become a more community-focused effort, which means you too, can take part in improving the docs for this starter kit.

To visit the docs, click here.

Contributing

Issues, Pull Requests, and contribution to the docs are welcome! See our Contributing Guidelines for more details.

More Repositories

1

screeps-profiler

This is a profiler designed for use in the game of screeps.
JavaScript
193
star
2

typed-screeps

Strong TypeScript declarations for the game Screeps.
TypeScript
173
star
3

screeps-launcher

Launcher for the Screeps Private Server
Go
119
star
4

screeps-multimeter

The most useful tool on your screeps workbench.
JavaScript
89
star
5

python-screeps

Unofficial client for the Screeps Unofficial API
Python
82
star
6

screeps-snippets

This repository is for saving pinned snippets from the screeps slack for posterity
JavaScript
74
star
7

Screeps-Typescript-Declarations

The repository for *Screeps's* TypeScript type definitions.
TypeScript
69
star
8

node-screeps-api

Node.js API For screeps
JavaScript
64
star
9

screeps-arena-typescript-starter

JavaScript
58
star
10

screeps_console

Standalone Interactive Screeps Console
Python
57
star
11

cppreeps

WASM C++ Screeps API and utilities pack (beta, proof-of-concepts)
C++
55
star
12

screeps-server-mockup

Private server package for unit tests
TypeScript
51
star
13

RoomVisual

JavaScript
39
star
14

screeps-typescript-profiler

A light-weight TypeScript profiler for tagging classes and methods
TypeScript
38
star
15

screeps-stats

Access Screeps Console, Performance, and Statistics Data via Kibana and ElasticSearch
Python
38
star
16

screeps-visual

Chrome Extension that adds a Visual API to screeps
JavaScript
26
star
17

typed-screeps-arena

JavaScript
26
star
18

screeps_notify

Send messages (SMS, Slack) from inside Screeps Scripts
Python
23
star
19

screeps-ConsoleStats

Output stats directly to the screeps console
JavaScript
18
star
20

creeptalk

Giving Creeps Social Skills Since 2016
JavaScript
17
star
21

POSIS

Portable Operating System Interface for Screeps
12
star
22

screepers-standards

12
star
23

utf15

Library (codec generator) for packing integers to JavaScript UTF-16 strings
JavaScript
11
star
24

go-screeps

Go
10
star
25

ScreepsOS

Screeps/Serializable Operation System (SOS)
JavaScript
9
star
26

screeps-regenerator

Use generators in Screeps
JavaScript
8
star
27

screeps-backup

Backups for Screeps
Python
7
star
28

screeps-tools

Tools to help players of the Programming MMO Screeps
TypeScript
7
star
29

ScreepsPerformanceServer

Ready to run server with performance checks
JavaScript
7
star
30

Screeps-Script-Downloader

Download all your Screeps scripts without the need to copy-paste each individual file.
Java
6
star
31

screeps-drawing

JavaScript
2
star
32

screeps-closure-compiler-externs

Screeps externs for use with Closure Compiler.
JavaScript
2
star
33

screeps-server-test

JavaScript
2
star
34

screeps-arena-javascript-starter

JavaScript
2
star
35

ErrorExporter

An error exporter instead of email
JavaScript
2
star
36

snippets-logging

Long term safe keeping for snippets from the #logging slack channel
JavaScript
2
star
37

screeps-jconsole

Node based console for Screeps MMORTS based on screeps-console by stargateur
JavaScript
1
star
38

ScreepsDiplomacyExtensions

A universal verb and framing protocol built on ScreepsDiplomacy
1
star
39

screeps_slack_bot

Slack Bot for providing information about the Screeps world
JavaScript
1
star
40

ScreepsUserTracker

JavaScript
1
star
41

screeps-stats-lib

A client-side library to enhance the output of screeps-stats statistics.
JavaScript
1
star
42

simpleAllies

Allows for simple communication between allies using a public segment
TypeScript
1
star