voidrift

module
v0.0.0-...-e1c47f6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2026 License: GPL-3.0

README

Void Drift — IRC IdleRPG Bot

Go Go Report Card

A standalone IRC bot implementing the classic IdleRPG game, written in Go — with a cosmic horror / dying-world sci-fi skin.

The old gods are gone. What remains are Entities: the Pale Architects, the Drift, the Deep Signal, Protocol ZERO. Players register a character, pick a class and alignment, and gain levels simply by idling in the channel. Talking, changing nick, parting, quitting, or getting kicked adds penalty time. Characters battle each other on level-up, find salvaged artefacts, join guilds, go on missions, and roam a 500×500 map — all without lifting a finger.

See MANUAL.md for full player documentation: commands, mechanics, and strategy.

Void Drift in action

Quickstart

Download a release from the releases page:

# Linux (amd64) — statically linked, runs on any distro including Alpine/musl
curl -L https://github.com/cstroie/voidrift/releases/latest/download/voidrift-linux-amd64 -o voidrift
curl -L https://github.com/cstroie/voidrift/releases/latest/download/drifter-linux-amd64 -o drifter
chmod +x voidrift drifter
./voidrift -server irc.libera.chat:6667 -nick VoidKeeper -channel "#voidrift"

Replace linux-amd64 with linux-arm64, darwin-amd64, darwin-arm64, or windows-amd64.exe as needed.

Build from source — requires Go 1.21 or later:

git clone https://github.com/cstroie/voidrift.git
cd voidrift
make build
./voidrift -server irc.libera.chat:6667 -nick VoidKeeper -channel "#voidrift"

The bot connects, joins the channel, and begins the game loop immediately. Player data is saved automatically to voidrift.json; guild data to guilds.json.

To test locally without a live IRC server, use dev mode (14× faster TTL, event rates ×10, weak creeps, easy quests, auto-logins existing channel members on connect):

make dev

Building & Testing

make build        # compile voidrift + drifter; version stamped with today's date (yymmdd)
make dist         # cross-compile for all platforms (linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64)
make linux/amd64  # build a single platform
make test         # run unit tests
make run          # build and run with default flags
make dev          # build and run in dev mode
make clean        # remove all generated binaries

You can override connection defaults without editing the Makefile:

make run SERVER=irc.example.org:6667 NICK=MyBot CHANNEL='#mygame'

Configuration

All settings can be provided as command-line flags, environment variables, or (for service deployments) via an env file loaded by the init script. Priority order: flag > env var > compiled-in default.

Flags and environment variables
Flag Env var Default Description
Connection
-server VOIDRIFT_SERVER irc.libera.chat:6667 IRC server host:port
-nick VOIDRIFT_NICK VoidKeeper Bot nick
-server-pass VOIDRIFT_SERVER_PASS (none) IRC server password
-nickserv-pass VOIDRIFT_NICKSERV_PASS (none) NickServ password — sends IDENTIFY on connect
-ssl VOIDRIFT_SSL false Use SSL/TLS
-no-verify VOIDRIFT_NO_VERIFY false Skip TLS certificate verification (insecure)
Game
-channel VOIDRIFT_CHANNEL #voidrift Game channel
-data VOIDRIFT_DATA voidrift.json Player data file (created automatically)
-guilds VOIDRIFT_GUILDS guilds.json Guild data file (created automatically)
Tuning
-dev VOIDRIFT_DEV false Dev mode: auto-login channel members on startup, TTL 14× faster, event rates ×10, creep levels capped at 10, quests require only 1 player at level 0+
-rate-player VOIDRIFT_RATE_PLAYER 1.0 Per-player event rate multiplier — scales random events and bot battles
-rate-align VOIDRIFT_RATE_ALIGN 1.0 Alignment event rate multiplier — scales good/evil daily events
-rate-server VOIDRIFT_RATE_SERVER 1.0 Server event rate multiplier — scales team/guild battles, quests, Hand of God
Extra
-log VOIDRIFT_LOG (none) Append log output to this file (stdout always active)
-version false Print version and exit
Env file

For service deployments copy init/voidrift.env.example to /etc/voidrift/voidrift.env (mode 0600, owned by root) and set your values there. Secrets such as VOIDRIFT_NICKSERV_PASS and VOIDRIFT_SERVER_PASS should only ever live in this file, not on the command line.

Running as a Service

The Makefile handles everything automatically:

sudo make install    # build and install binary, create user, install init file
sudo make uninstall  # stop service, remove init file and binary

make install installs the binary to /usr/local/bin/voidrift, creates /var/lib/voidrift as the data directory, and detects the init system automatically (Alpine Linux → OpenRC, anything with /run/systemd/system → systemd). After installing, configure the bot by copying the env-file template:

cp /etc/voidrift/voidrift.env.example /etc/voidrift/voidrift.env
chmod 600 /etc/voidrift/voidrift.env
$EDITOR /etc/voidrift/voidrift.env   # set VOIDRIFT_NICKSERV_PASS, etc.

Then start the service:

# systemd
systemctl start voidrift

# OpenRC
rc-service voidrift start

make uninstall stops and disables the service and removes the binary, but preserves data (/var/lib/voidrift/*.json) and config (/etc/voidrift/).

Manual installation

If you prefer to install without make, copy the binary to /usr/local/bin/ and pick the appropriate init file from the init/ directory. The systemd unit runs the bot as the voidrift user with WorkingDirectory=/var/lib/voidrift; the OpenRC script does the same via command_user and directory.

drifter — idle client

drifter is a companion binary in this repo: a minimal IRC client that connects to the server, joins the channel, sends !login, and idles — no interaction required. All channel messages are printed to stdout.

go build ./cmd/drifter
./drifter -nick MyChar -game-pass s3cr3t
./drifter -nick MyChar -game-pass s3cr3t -log voidrift-MyChar.log
Flag Default Description
Connection
-server irc.libera.chat:6667 IRC server host:port
-nick (required) IRC nick
-server-pass (none) IRC server password
-nickserv-pass (none) NickServ IDENTIFY password
-ssl false Use SSL/TLS
-no-verify false Skip TLS certificate verification (insecure)
Game
-channel #voidrift Channel to join
-bot VoidKeeper Bot nick to DM !login to
-game-pass (required) Game password for !login
Extra
-log (none) Append messages to this file (stdout always active)
-version false Print version and exit

drifter reconnects automatically after a 10-second delay on disconnect. On a clean shutdown (Ctrl-C, kill, service stop) it sends !logout first to avoid the quit penalty.

Channel messages are printed to stdout with ANSI colours matching the IRC formatting. If a log file is specified via -log, it receives plain stripped text instead.

Contributing

Bug reports and pull requests are welcome. Please:

  1. Fork the repo and create a feature branch.
  2. Run make test before submitting — all tests must pass.
  3. Keep each PR focused; one change per PR.

Maintainer

Costin Stroie — costinstroie@eridu.eu.org

License

GNU General Public License v3.0

Directories

Path Synopsis
cmd
drifter command
drifter: a minimal idle IRC client for Void Drift.
drifter: a minimal idle IRC client for Void Drift.
voidrift command
achievements.go defines the achievement/title system.
achievements.go defines the achievement/title system.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL