Skip to content

swarm-game/swarm

Repository files navigation

Swarm

Build Status GitHub release (latest by date) Swarm release on Hackage Contributor Covenant ircchat All Contributors

Swarm is a 2D programming and resource gathering game. Program your robots to explore the world and collect resources, which in turn allows you to build upgraded robots that can run more interesting and complex programs. More info can be found on the Swarm website.

World 0 after scanning a tree and making a log.

Contributors

See CONTRIBUTING.md for information about various ways you can contribute to Swarm development!

Brent Yorgey
Brent Yorgey

🐛 📝 💻 🖋 📖 🎨 🤔 🚧 🔬 👀 ⚠️
Josh Price
Josh Price

💻
Tristan de Cacqueray
Tristan de Cacqueray

💻 🚇 👀
Huw Campbell
Huw Campbell

💻
Sam Tay
Sam Tay

💻
Luis Morillo
Luis Morillo

💻
Jens Petersen
Jens Petersen

🚇
Norbert Dzikowski
Norbert Dzikowski

💻
Paul Brauner
Paul Brauner

💻 🚇 🔬
Ondřej Šebek
Ondřej Šebek

💻 🚇 🤔 👀 ⚠️ 📖 🐛 🖋 💡
Jacob
Jacob

💻
Daniel Díaz Carrete
Daniel Díaz Carrete

💻
Ishan Bhanuka
Ishan Bhanuka

💻
Ryan Yates
Ryan Yates

💻
Alexander Block
Alexander Block

💻
Noah Yorgey
Noah Yorgey

💻 📖 🚇
Valentin Golev
Valentin Golev

💻
Tamas Zsar
Tamas Zsar

💻
Steven Garcia
Steven Garcia

💻
Karl Ostmo
Karl Ostmo

📝 💻 🖋 📖 🎨 🤔 👀 ⚠️ 💡
Brian Wignall
Brian Wignall

💻 📖
Chris Casinghino
Chris Casinghino

📖 🔬
Gagan Chandan
Gagan Chandan

💻
persik
persik

💻
Chris Hackett
Chris Hackett

💻
Nitin Prakash
Nitin Prakash

🚇 💻 🚧
Dani Rybe
Dani Rybe

💻
Jonathan Knowles
Jonathan Knowles

💻

Building

If you just want to play the game, head over to the Swarm website for installation instructions. If you want to build Swarm from source (e.g. in order to contribute, or to test out the latest bleeding-edge unreleased features), read on.

  1. Clone the Swarm repository, e.g.

    git clone https://github.com/swarm-game/swarm.git
    
  2. If you don't already have the cabal tool:

    1. Get the ghcup tool, a handy one-stop utility for managing all the different pieces of a Haskell toolchain.

    2. Use ghcup to install a supported version of GHC:

      ghcup install ghc 9.8.2 --set
      
    3. Use ghcup to install cabal:

      ghcup install cabal
      
  3. Now use cabal to build and run Swarm:

    cd /path/to/the/swarm/repo
    cabal run -O0 swarm:exe:swarm
    

    (Note that we recommend turning off optimizations with -O0, as they make a big difference in compilation time. Optimized builds are only noticeably faster in scenarios with swarms of robots.)

  4. Go get a snack while cabal downloads and builds all of Swarm's dependencies.

  5. You might also want to check out the scripts directory, which contains an assortment of useful scripts for developers.