GithubHelp home page GithubHelp logo

screeps-arena-typescript's Introduction

Screeps Arena Typescript Starter

This repo is a WIP starter template for the current Closed Alpha of Screeps Arena

Screeps Arena is a new game under active development, this repo is unoffcial and maintained by the screepers community

Any issues you experience with this repo should be created as an issue in this repo, the Screeps Arena devs should NOT be contacted!


TODO:

  • A way to push code to a specific arena npm run push alpha-capture-the-flag
    • Will probably be a copy of files to the correct location, depending on what location has been choosen in the arena client.
    • If we can't detect the locations, we will probably need a screeps-arena.json file where people can set up their desired output destinations

Current Issues: None


Screeps Arena Typescript Starter

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

The initial example code from the steam forum is included in src/alpha-capture_the_flag/main.ts

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)

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!

  • arenas are located in src/arena_*any folder you create in src with a name starting with arena_ will result in a main.mjs in the dist/arena_* folder.

  • Run npm run build to generate all arenas to /dist/*

  • npm run build - everything is build, the player can change their arena to look at the specific /dist/arena* directory

    • this template produces the following as an example /dist/alpha_capture_the_flag/main.mjs
  • npm run build capture - a specific arena is build, the player can change their arena to look at the specific /dist/arena* directory knowing only that arena was updated

  • Copy the main.mjs file to your desired location or change the location in the Screeps Arena client to point to the desired /dist/* folder.

- npm run push builds all arenas, then pushes all arenas to their respective folders where the client is pointed at. - npm run push capture builds the specific arena, then pushes the capture arena to their respective folders where the client is pointed at.

Typings

It uses the following project for typings https://github.com/screepers/typed-screeps-arena When the typings are updated and you need to get the newest types

  • delete node_modules/@types/screeps-arena
  • run npm i to reinstall the packages. You might need to delete package-lock.json to get the types.

Contributing

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

screeps-arena-typescript's People

Contributors

shiopon01 avatar

Watchers

James Cloos avatar  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.