Skip to content

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

License

Notifications You must be signed in to change notification settings

sicsix/Overseer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published