GithubHelp home page GithubHelp logo

sicsix / overseer Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 313 KB

Screeps Arena bot in TypeScript and C++, using WebAssembly

License: MIT License

JavaScript 0.26% TypeScript 40.24% CMake 1.17% C++ 58.33%
screeps wasm emscripten cplusplus typescript screepsarena webassembly

overseer's Introduction

Overseer

A pre-alpha bot for the game Screeps Arena written in Typescript and C++ in WebAssembly.

Features

  • Core of the bot is written in C++ which is compiled to WebAssembly by the LLVM compiler, improving performance over using JavaScript alone
  • JavaScript merely updates WASM with the current world state and has no AI logic
  • Code written in a style to enable easy auto vectorisation by the LLVM compiler, gaining performance boost from SIMD instructions without explicitly writing SIMD instructions
  • Only a single interop call from JS to WASM, which runs the main loop
  • No interops between WASM and JS (not including debug/error prints)
  • Game objects are written directly to WASM shared memory by JS as a stream of bytes, which is decoded in C++
  • Decoded game objects converted to entities and kept updated in an Entity Component System - entt
  • Highly optimised pathfinding - written to take advantage of SIMD instructions
  • Influence Map system, capable of tracking threat and proximity of creeps utilising on the fly calculated movement costs and visibility checks in the creeps radius
  • Interest Map system, allows for combining influence maps in various ways to allow the individual creeps to make decisions based on spatial information
  • WASM runs AI and sends commands back to JS by writing to a stream of shared memory. JS decodes this stream and executes the commands in the game world

In Progess

  • Much much more to be done...

Build Instructions

Soon...

overseer's People

Contributors

sicsix avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.