Giter VIP home page Giter VIP logo

logic's Introduction

robot rumble - logic backend

https://robotrumble.org

Testing Powered By SauceLabs

Robot Rumble is a game where you code robots to battle other users' bots in an arena. This is the logic backend, which is primarily written in Rust (using wasm-bindgen in the browser and tokio + wasmer otherwise).

A detailed writeup of our architecture/infrastructure can be found here.

Directory structure

  • logic/: This contains the pure game logic of robot rumble. It mainly operates on the RobotRunner trait, which has a single method that takes in the state of the board and outputs a list of actions for each unit under its control.
  • lang-runners/: wasm modules that implement our runner "ABI"/"protocol", for running user code in a sandboxed WebAssembly environment. Each runner receives JSON-serialized ProgramInput structs in stdin, and should print JSON-serialized ProgramResults to stdout (types defined in logic/).
    • lang-runners/javascript: implements the robot rumble API/environment for JavaScript, running JS code in the quickjs interpreter.
    • lang-runners/python: the same as above, but running Python in RustPython.
    • lang-runners/lang-common.*: "shared" functionality used for implementing lang-runners.
  • env-runners/: libraries or binaries that wrap the logic crate in order to run in environments like AWS lambda or the browser. Notably absent is the rumblebot CLI, which lives in its own repo at robot-rumble/cli.
    • env-runners/browser/: a wasm-bindgen wasm module that runs robots as web workers, in conjunction with the portions of the garage that are written in JS.
    • env-runners/lambda: an AWS lambda function that runs a battle between two robots and outputs the results to SQS for our backend server to process.
    • env-runners/lambda-cache: a tool to precompile the lang-runners to native code for running on lambda.
    • env-runners/native: a crate providing a RobotRunner that runs in tokio, with robots running as (blocking) tokio tasks. This is used by the cli and the lambda runner.

logic's People

Contributors

coolreader18 avatar outkine avatar parmigggiana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

isgasho

logic's Issues

Clean up `types.rs`

Change the order of the types and remove redundant Serialize/Deserialize where appropriate.

Support GameLisp language

GameLisp is written in Rust and is WASM-compatible. The author @fleabitdev is busy these days seeing as the world is on ๐Ÿ”ฅ , but I just wanted to put a tracking issue up that can be revisited in a brighter future.

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.