https://github.com/taciturnaxolotl/bundom
the pixel swarm shall conquer
https://github.com/taciturnaxolotl/bundom
bun pixels swarm
Last synced: about 1 year ago
JSON representation
the pixel swarm shall conquer
- Host: GitHub
- URL: https://github.com/taciturnaxolotl/bundom
- Owner: taciturnaxolotl
- License: mit
- Created: 2024-12-28T16:19:58.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-02T22:19:52.000Z (over 1 year ago)
- Last Synced: 2025-04-06T06:08:12.448Z (about 1 year ago)
- Topics: bun, pixels, swarm
- Language: TypeScript
- Homepage: https://place.danieldb.uk/
- Size: 2.39 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - taciturnaxolotl/bundom - the pixel swarm shall conquer (TypeScript)
README

Bundom
Accomplishing domination of pixel land.
## What's this?
Bundom is a quick project I made to achieve domination of [place.danieldb.uk](https://place.danieldb.uk/). It is a swarm based model that relies on a server I host at `hackclub.app:38425` to assign blocks of pixels to clients. The client then draws the pixels on the canvas and `ack` back to the server. The server then assigns the next block of pixels to the client and the process repeats until the canvas is filled. The cool part though is that this is all done in such a way that its almost effortless to setup a client. Registration is automatic and the client is ✨kind✨ fault tolerant.
If you want to see a mildly corny demo video then I made a short which you can find here: [https://youtube.com/shorts/bh3vvy5NyKg](https://youtube.com/shorts/bh3vvy5NyKg)
## How do I use it?
```bash
bun install
```
Then run the following command to start the client:
```bash
bun run swarm/client.ts
```
Also make sure to have this in your `.env` file:
```bash
BEARER_TOKEN=test
SERVER_URL=http://hackclub.app:38425
```
### Hosting
I'm hosting on nest so I just setup a systemd service file that runs `bun run swarm/server.ts` in the root dir of this repo. Then I setup caddy but was having issues with the ip not being passed properly so I just used the raw port lol.
```bash
BEARER_TOKEN=test
PORT=3000 # Optional
```
### Usage
You literally just need to run it. It will automatically register with the server and start drawing pixels. The server will assign you a block of pixels to draw and you just draw them. Once you're done you `ack` back to the server and it will assign you the next block of pixels. The server will keep assigning you blocks of pixels until the canvas is filled.
```bash
bun run swarm/client.ts
```
There is also a dashboard of sorts which you can see in the screenshot below. It got an absurd amount of dials and knobs by the end of making this project. It also gives an overlay of what the swarm is trying to draw at the moment, how many bots are active, and where the bots are working. It can be started with a quick
```bash
bun run canvas/index.ts
```
Technically that file also runs a testing version of the canvas but I don't have it hooked up rn. (it wouldn't be that hard to fix though; just replace references to hackclub.app with locahost)

© 2024-present Kieran Klukas