swarm/README.md

76 lines
2.8 KiB
Markdown
Raw Normal View History

2021-08-30 01:27:41 +03:00
Swarm
=====
2022-10-06 01:52:52 +03:00
[![Build Status][build-status]][actions]
2022-10-06 19:59:28 +03:00
[![GitHub release (latest by date)][release-img]][releases]
[![Swarm release on Hackage][hackage-img]][hackage]
2022-10-06 01:52:52 +03:00
[![Contributor Covenant][badge-covenant]](CODE_OF_CONDUCT.md)
[![ircchat][badge-ircchat]][ircchat]
![GitHub Contributors][contribs]
[build-status]: https://github.com/swarm-game/swarm/actions/workflows/haskell-ci.yml/badge.svg
2022-10-06 19:59:28 +03:00
[release-img]: https://img.shields.io/github/v/release/swarm-game/swarm?logo=github
[releases]: https://github.com/swarm-game/swarm/releases
[hackage-img]: https://img.shields.io/hackage/v/swarm.svg?logo=haskell
[hackage]: https://hackage.haskell.org/package/swarm
2022-10-06 01:52:52 +03:00
[actions]: https://github.com/swarm-game/swarm/actions
[badge-covenant]: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg
[badge-ircchat]: https://img.shields.io/badge/chat-on%20libera-brightgreen.svg
[ircchat]: https://web.libera.chat/?channels=#swarm
[contribs]: https://contrib.rocks/image?repo=swarm-game/swarm
2021-09-19 21:40:47 +03:00
2021-08-30 01:27:41 +03:00
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](https://swarm-game.github.io).
[![World 0 after scanning a tree and making a log.](images/tutorial/log.png)](https://swarm-game.github.io)
Contributing
------------
See [CONTRIBUTING.md](CONTRIBUTING.md) for information about various
ways you can contribute to Swarm development!
Building
--------
If you just want to play the game, [head over to the Swarm website for
installation instructions](https://swarm-game.github.io/installing/).
If you want to build Swarm from source (*e.g.* in order to
[contribute](CONTRIBUTING.md), or to test out the latest bleeding-edge
unreleased features), read on.
2021-08-30 01:27:41 +03:00
1. Clone the Swarm repository, e.g.
git clone https://github.com/swarm-game/swarm.git
2021-08-30 01:27:41 +03:00
1. If you don't already have the `cabal` tool:
1. Get the [`ghcup` tool](https://www.haskell.org/ghcup/), a handy
one-stop utility for managing all the different pieces of a
Haskell toolchain.
1. Use `ghcup` to install a supported version of GHC:
2021-08-30 01:27:41 +03:00
ghcup install ghc 9.6.4
2021-08-30 01:27:41 +03:00
1. Use `ghcup` to install `cabal`:
ghcup install cabal
1. Now use `cabal` to build and run Swarm:
2021-08-30 01:27:41 +03:00
cd /path/to/the/swarm/repo
cabal run -O0 swarm:exe:swarm
(Note that we recommend turning off optimizations with `-O0` since
they don't seem to make much difference to the speed of the
resulting executable, but they make a big difference in compilation
time.)
2021-08-30 01:27:41 +03:00
1. Go get a snack while `cabal` downloads and builds all of Swarm's
dependencies.
2021-08-30 01:27:41 +03:00
1. You might also want to check out the `scripts` directory, which
contains an assortment of useful scripts for developers.