English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

firstRTS: An Open-Source RTS Game Built with Godot 4.2

Forum topic · 小凯 · 2026-03-06

Summary

firstRTS is an open-source real-time strategy (RTS) game project developed with Godot 4.2 and GDScript, inspired by StarCraft and Red Alert. It features a deterministic lockstep synchronization architecture shared between online multiplayer and replay systems, enabling fully reproducible match playback. The game offers procedural terrain generation via FastNoiseLite, a complete gameplay loop (resource gathering, building construction, unit production, combat, and victory conditions), multiple fog-of-war modes, and a visual replay system with progress control, speed adjustment, and player statistics. Two factions—Steel Alliance and Shadow Tech—feature distinct units, with Shadow Tech fielding shielded units. LAN multiplayer uses ENet (UDP) on port 7777, with single-player AI covering economy, unit production, and attack pacing. Resources include Minerals and Energy, with starting values of 400 and 200 respectively. The project also supports multilingual UI (Simplified Chinese, Traditional Chinese, English) and is currently at v0.1.0 Alpha.

firstRTS is an open-source real-time strategy (RTS) game built on Godot 4.2 (GDScript), with gameplay and style inspired by *StarCraft* and *Red Alert*.

GitHub: https://github.com/igofreely/firstRTS

Core Features

  • Deterministic lockstep architecture: Online play and replays share the same command execution pipeline, making full match replay reproducible
  • Procedural map generation: Noise-based terrain with fixed spawn points and symmetric resource layouts
  • Complete RTS gameplay loop: Gather resources → build structures → produce units → scout and attack → victory/defeat resolution
  • Multiple fog-of-war modes: No fog, full blackout, terrain-visible, and permanent reveal after exploration
  • Visual replay system: Progress bar, playback speed, pause, player statistics, command logs, and camera modes
  • Resource System

  • Minerals: Basic resource for construction and unit production
  • Energy: Required for advanced units and buildings
  • Default starting resources: 400 minerals, 200 energy
  • Factions

  • Steel Alliance
  • Shadow Tech
  • The two factions differ in unit naming and stat design (Shadow Tech includes shielded units).

    Game Modes

    Single Player (vs AI)

  • Configurable fog of war, game speed, starting resources, and language
  • AI difficulty logic implemented (economy, unit production, attack pacing)
  • LAN Multiplayer

  • Room-based LAN communication via ENet (UDP)
  • Lockstep command synchronization for consistent execution across clients
  • Default port: 7777
  • Replay Mode

  • Automatic recording during matches (both single-player and online)
  • Progress control, speed adjustment, pause, command logs, and statistics panel
  • Replay directory: user://replays/
  • Tech Stack

  • Engine: Godot 4.2 (GDScript)
  • Networking: ENetMultiplayerPeer + RPC
  • Sync model: Lockstep (fixed tick + input delay)
  • Pathfinding: Path planning + local avoidance
  • Map system: Procedural generation with FastNoiseLite
  • Fog of war: Real-time updates via Image/ImageTexture
  • Localization: Custom LocalizationManager with translation tables
  • Controls

  • W/A/S/D or arrow keys: Move camera
  • Left mouse button: Select units
  • Right mouse button: Issue move/interact orders
  • H: Jump camera to main base
  • B: Show build shortcut hints
  • Alt+Q/W/E/R: Place barracks / factory / defense tower / power plant
  • Enter: Open/send chat
  • Esc: Close chat/panel or open game menu
  • Implemented Features

  • Full RTS main loop (gathering, building, combat, win/loss conditions)
  • Single-player AI battles
  • LAN multiplayer lobby and matches
  • Match recording and replay system
  • Multilingual UI (Simplified Chinese / Traditional Chinese / English)
  • Future Directions

  • Additional factions and tech tree branches
  • Richer unit abilities and counter relationships
  • Replacing procedural map rendering with TileSet art
  • More robust online reconnection and anti-cheat mechanisms
  • Campaign levels and scripted event systems

Version

v0.1.0 Alpha

Tags

#godot#rts#open-source#game-development#lockstep#multiplayer#procedural-generation#gdscript

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177168702