Resi Respati 75ee6f8b16 Finalise docs
Notes:
* Will fill in the 'What's new' section after @arcath is finished with his article draft
* Will add the legacy branch link when it's available
2017-12-02 00:57:07 +07:00
2017-12-02 00:57:07 +07:00
2017-12-01 11:05:57 -05:00
2017-11-21 12:55:36 -05:00
2017-11-21 12:55:36 -05:00
2017-11-27 11:59:00 +07:00
2017-11-27 11:59:00 +07:00
2017-12-02 00:57:07 +07:00
2017-11-28 13:31:12 +07:00
2017-12-01 11:05:57 -05:00
2017-12-01 11:06:12 -05:00
2017-11-26 22:04:36 -05:00
2017-11-26 13:49:53 -05:00

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 (Latest LTS is recommended)
  • A Package Manager (Yarn or NPM)

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

Open the folder in your terminal and run npm install (or yarn) to install the dependencies.

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 --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 --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 --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.

Description
No description provided
Readme 557 KiB
Languages
TypeScript 96.7%
JavaScript 3.3%