Skip to content
Tech News
← Back to articles

Show HN: Playing LongTurn FreeCiv with Friends

read original get FreeCiv Multiplayer Bundle → more articles
Why This Matters

This development of a self-hosted Freeciv Longturn server introduces a new way for players to engage in long-duration, asynchronous multiplayer strategy games, making it more accessible and manageable for casual players. By integrating features like live status updates, email notifications, and an AI-generated wartime newspaper, it enhances the gaming experience and community engagement within the tech industry and among consumers. This setup exemplifies how scalable, persistent multiplayer environments can be tailored for long-term gameplay, fostering innovation in online gaming infrastructure.

Key Takeaways

Freeciv Longturn Server

A self-hosted Freeciv 3.2.3 multiplayer server designed for longturn games (23-hour turns), running on Fly.io with email notifications, a live status page, and an AI-generated newspaper.

An active 16-player game is running on this codebase right now. Check out the status page to see live rankings, turn countdowns, history charts, diplomacy tracking, and the AI-generated wartime newspaper.

What is Longturn?

Longturn is a style of Freeciv multiplayer where each turn lasts ~23 hours instead of minutes. Players log in once a day, make their moves, click "Turn Done", and go about their lives. When all players have ended their turn (or the timer runs out), the next turn begins.

Architecture Overview

┌─────────────────────────────────────────────────┐ │ Fly.io Container │ │ │ │ entrypoint.sh │ │ ├── busybox crond (status page refresh) │ │ └── start.sh │ │ ├── freeciv-server (port 5556) │ │ ├── busybox httpd (port 8080 → 80/443) │ │ ├── FIFO command writer │ │ ├── Turn change watcher │ │ ├── Auto-saver (every 5 min) │ │ └── Turn reminder checker │ │ │ │ /data/saves (persistent volume) │ │ ├── lt-game-*.sav.gz (save files) │ │ ├── freeciv.sqlite (player auth DB) │ │ ├── status.json (live game state) │ │ ├── history.json (per-turn stats) │ │ ├── attendance.json (missed turns) │ │ ├── diplomacy.json (relationships) │ │ └── gazette.json (AI newspaper) │ └─────────────────────────────────────────────────┘

The server communicates via a FIFO pipe ( /tmp/server-input ) — scripts send commands to the running Freeciv server by writing to this pipe.

Scripts

Core

... continue reading