Termfront
Termfront is a terminal FPS built in Ruby with a raycasting renderer, campaign scripting, audio support, and experimental PvP multiplayer.
Features
- DDA raycasting renderer for ANSI terminals
- Singleplayer mission mode
- Wavesfight PvE mode with wave-based survival arenas
- Campaign mode with intro/outro scenes and in-mission terminals
- Experimental PvP over TCP + TLS
- Radar, pickups, weapons, shields, and enemy projectiles
- External audio manifest with BGM, SE, and looped shield regeneration audio
Requirements
- Ruby
>= 3.2 - A terminal with ANSI escape sequence support
- One of these audio players if you want sound:
ffplayafplaypaplayaplay
RubyGems metadata currently targets Ruby 0.1.0.
Installation
If the gem is published:
gem install termfront
For local development from this repository:
bundle install
bundle exec rake test
bundle exec rake install
Running
Start the game:
termfront
Start a PvP server:
termfront-server
Use a custom port:
termfront-server 9000
Default PvP port is 7777.
Controls
WASD: moveLeft/Right: turnSpace: fireT: swap weaponE: interact / pick up / use terminalQorEsc: quit or back outEnter: confirm menus
In story scenes:
Enter/Space: next pageEsc/Q: skip scene
Modes
Singleplayer
Quick mission start for testing the core combat loop.
Campaign
Campaign missions include:
- mission start scenes
- mission complete scenes
- optional in-mission terminal logs
Story/event data lives in data/events/*.json.
Wavesfight
Wavesfight is a PvE survival mode built on selected campaign maps.
- Select from
Corridor Sweep,Stronghold, andFinal Push - Survive escalating enemy waves
- Difficulty ramps up every few waves
- Shield, health, and ammo get a partial refresh between waves
- Supports both solo play and 2-player online co-op
PvP
PvP is currently marked experimental.
- The server listens on TCP and wraps traffic with TLS.
- The client connects directly to
host:port. - Matchmaking now supports
1v1,2v2, and4v4. - Players choose the match size on the client, and the server keeps separate queues for each mode.
- Team matches end when one side is fully eliminated.
- Local relay/start/state/ping behavior is covered by tests.
- Internet/WAN play still needs broader real-world verification.
For internet testing, the simplest setups are:
- direct TCP port forwarding to the host running
termfront-server nginx streamTCP passthrough on a VPS- a mesh/VPN overlay such as Tailscale
Audio
Audio mappings are defined in:
Third-party audio notices are tracked here:
If no supported audio player is available, the game still runs without sound.
Development
Run tests:
ruby -Itest test/test_termfront.rb
Build the gem:
gem build termfront.gemspec
Install the built gem locally:
gem install ./termfront-0.1.0.gem
License
Code is available under the MIT License.
Third-party audio assets remain under their own licenses as documented in data/audio/THIRD_PARTY_NOTICES.md.