Coder Social home page Coder Social logo

screepy's Introduction

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

screepy's People

Contributors

tylergarlick avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.