536f1dcf47
Closes #1663. The status quo is that built-children of system robots are visible, even if the system robot is invisible. So we preserve that behavior for now, with the potential to override it at some future point. We don't yet have a definite need to make children of system robots invisible, but this PR does at least provide a mechanism to set the foreground and background of child robots (as a stopgap until #1230). Tested with: scripts/play.sh -i scenarios/Challenges/Ranching/beekeeping.yaml --autoplay | Before | After | | --- | --- | | ![Screenshot from 2023-12-01 17-31-00](https://github.com/swarm-game/swarm/assets/261693/9a9a49cb-fee5-424d-a748-9cb3c65ffe8f) | ![Screenshot from 2023-12-01 17-35-19](https://github.com/swarm-game/swarm/assets/261693/4da17e20-8f1a-46fc-ac9c-6154ccb7d4c7) | |
||
---|---|---|
.github | ||
.vscode | ||
app | ||
data | ||
docs/blog | ||
editors | ||
example | ||
images | ||
scripts | ||
src | ||
test | ||
web | ||
.gitignore | ||
.hlint.yaml | ||
.mergify.yml | ||
.restyled.yaml | ||
.stan.toml | ||
cabal.haskell-ci | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
COMMUNITY.md | ||
CONTRIBUTING.md | ||
DESIGN.md | ||
feedback.yaml | ||
fourmolu.yaml | ||
hie.yaml.stack | ||
LICENSE | ||
NOTICE | ||
pull_request_template.md | ||
README.md | ||
scenarios | ||
stack.yaml | ||
swarm.cabal |
Swarm
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.
Contributing
See 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. 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.
-
Clone the Swarm repository, e.g.
git clone https://github.com/swarm-game/swarm.git
-
If you don't already have the
stack
tool:-
Get the
ghcup
tool, a handy one-stop utility for managing all the different pieces of a Haskell toolchain. -
Use
ghcup
to installstack
:ghcup install stack
-
-
Now use
stack
to build and run Swarm:cd /path/to/the/swarm/repo stack run
-
Go get a snack while
stack
downloads a Haskell compiler and all of Swarm's dependencies. -
You might also want to check out the
scripts
directory, which contains an assortment of useful scripts for developers.