- C 96.2%
- HTML 2.6%
- Shell 0.5%
- PowerShell 0.3%
- Just 0.3%
|
|
||
|---|---|---|
| .zed | ||
| allegro@debeea89cc | ||
| bin | ||
| CMakeFiles | ||
| linux-packaging | ||
| scripts | ||
| src | ||
| windows | ||
| .clang-format | ||
| .clang-tidy | ||
| .clangd | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmodules | ||
| .mise.toml | ||
| CMakeCache.txt | ||
| justfile | ||
| LICENSE.md | ||
| Makefile | ||
| MODERNIZATION.md | ||
| README.md | ||
Liberation Circuit
[!notice] This is a fork
This is the release version of Liberation Circuit, an RTS/programming game.
To play the pre-built binaries on Windows, download the latest
release and run
LibCirc.exe. There are also pre-built binaries for all platforms
available on itch.io.
Vanilla has set up a Discord server to discuss strategy and things.
Screenshots
Quick Start
Prerequisites
- A C compiler (GCC, Clang, or MSVC)
- Just command runner
- Git (optional, for development)
Build and Run
git clone https://github.com/linleyh/liberation-circuit.git
cd liberation-circuit
# Install dependencies automatically
just setup
# Build and run the game
just run
Dependencies
The following libraries are required to build Liberation Circuit:
- Allegro 5 - Main game library
- Allegro 5 addons: acodec, audio, dialog, font, image, primitives
- C compiler - GCC, Clang, or MSVC
- pkg-config - For finding library dependencies
All dependencies can be installed automatically with just setup.
Building
Liberation Circuit uses a modern justfile for cross-platform building. The justfile automatically detects your platform and uses appropriate build commands.
Available Commands
just setup # Install dependencies for your platform
just build # Build the game
just run # Build and run the game
just clean # Clean build artifacts
just debug # Build with debug symbols
just test # Run basic tests
just help # Show all available commands
The executable will be created as bin/libcirc (Linux/macOS) or bin/libcirc.exe (Windows). The game requires write access to the bin directory to save mission progress.
- Manual.html has extensive detail about the game, including documentation for the in-game API.
- Edit init.txt to set screen resolution and other options (fullscreen, sound volume, key rebinding, colourblind mode etc).
Platform-Specific Instructions
Linux
# Install dependencies (automatically detects your distro)
just setup
# Build and run
just run
Supported distributions:
- Ubuntu/Debian: Uses
apt-get - Fedora/RHEL: Uses
dnf - Arch Linux: Uses
pacman
macOS
# Install Homebrew if needed, then install dependencies
just setup
# Build and run
just run
If you are using a Retina screen, you may want to set the double_fonts option to make the text larger (edit init.txt to do this).
Windows
Native Windows builds are now supported!
- Install MSYS2 from https://www.msys2.org/
- Open MSYS2 MinGW64 terminal
- Install Just:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source ~/.cargo/env cargo install just - Build the game:
git clone https://github.com/linleyh/liberation-circuit.git cd liberation-circuit just setup just run
The Windows executable will be created as bin/libcirc.exe.
Alternative Build Methods
For compatibility, the original build methods are still available:
- Make:
make(Linux/macOS only) - Redo:
./doorredo(if installed)
Multiplayer (LAN)
Liberation Circuit now supports LAN multiplayer for up to 8 players! You can host and join games over your local network.
Quick Multiplayer Setup
-
Build with network support:
just network-build just run -
Host a game:
- Start the game and go to "Multiplayer" → "Host Game"
- Enter a game name and your player name
- Click "Start Hosting"
- Share your IP address with other players
-
Join a game:
- Go to "Multiplayer" → "Browse Games" (for auto-discovery)
- Or go to "Join Game" and enter the host's IP address
- Enter your player name and click "Connect"
Network Requirements
- Ports: The game uses UDP ports 7777 (game) and 7778 (discovery)
- Firewall: Make sure these ports are open in your firewall
- Network: All players must be on the same local network (LAN)
Multiplayer Features
- Automatic game discovery on LAN
- Real-time synchronization of game state
- Player lobby with ready status
- In-game chat system
- Host migration support
- Cross-platform multiplayer (Windows ↔ Linux ↔ macOS)
Hosting a Game
# Build with network support
just multiplayer
# Or use regular build with network
just network-build && just run
- Select Multiplayer from main menu
- Choose Host Game
- Configure:
- Game Name: Visible to other players
- Player Name: Your display name
- Max Players: 2-8 players
- Port: Default 7777 (change if needed)
- Click Start Hosting
- Wait in lobby for players to join
- Click Start Game when ready
Joining a Game
Option 1: Browse Games (Automatic Discovery)
- Select Multiplayer → Browse Games
- Click Refresh to scan for local games
- Select a game from the list
- Enter your player name
- Click Join Game
Option 2: Direct Connection
- Select Multiplayer → Join Game
- Enter host's IP address and port
- Enter your player name
- Click Connect
Network Testing
Test your network setup:
# Run network diagnostics
./scripts/test-network.sh
# Quick network test
just network-test
Troubleshooting
Can't see games in browser?
- Check firewall settings (ports 7777 and 7778)
- Ensure all players are on same network
- Try direct IP connection instead
Connection timeout?
- Verify host's IP address
- Check if port 7777 is blocked
- Try disabling firewall temporarily
Game desync issues?
- All players should use the same game version
- Check network stability
- Host should have stable connection
Windows-specific issues?
- Run as Administrator if needed
- Check Windows Defender firewall
- Ensure MSYS2/MinGW is properly installed
Advanced Network Settings
Edit bin/init.txt to configure:
# Network settings
network_enabled=1
default_port=7777
max_players=8
discovery_interval=1000
connection_timeout=5000
Performance Tips
- Host requirements: Stable connection, sufficient bandwidth
- Recommended: 100 Mbps+ for 8 players
- Latency: < 50ms for optimal experience
- Packet loss: < 1% for stable gameplay
Thanks to:
- Nils Dagsson Moskopp for very useful feedback on the alpha and beta versions.
- zugz (from the tigsource forum) for very useful feedback on the beta.
- Serge Zaitsev's cucu for a very clear explanation of how to write a simple C compiler.
- Batuhan Bozkurt's otomata for the basis of the cellular automata-based procedural music generation.

