Giter Club home page Giter Club logo

screeps-haskell's Introduction

screeps-haskell

This shall become a starting point for creating an AI for the Screeps game in Haskell. The Javascript Bindings are currently very rudimentary and don't consider multi-room support.

To run the upload script you will need a screeps account, which you currently only get by purchasing the game. Theoretically you could use the free demo mode if you manage to paste the big output js (see below)

ZuriHac: I'll try to get a setup where we all can use my own account.

The build process rather clumsily runs stack inside a Docker container with a prebuilt ghcjs (since that thing takes ages to build). I haven't got the stack docker integration to work properly. I probably also should package node in the image for the upload script (or even better, convert the upload script to haskell in the first place)

How to run it

  • Have a .env file with USERNAME and PASSWORD of your screeps account

  • FIRST TIME: run make setup (which runs stack setup in a docker container)

  • Run make build

  • Go to https://screeps.com/a/#!/sim/tutorial/4 and click away the dialogues,

  • Upload the script:

    • Either use make upload to build and upload the script, select the haskell branch

    • Or paste the contents of .stack-work/dist/x86_64-linux/Cabal-1.24.2.0_ghcjs/build/screeps-exe/screeps-exe.jsexe/all.js into the main module. Theoretically this should work, although my browser seems to refuse to paste the >1MB of code.

  • Look at them go!

screeps-haskell's People

Contributors

tourn avatar

Watchers

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