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. Available on GitHub, it implements a deterministic lockstep synchronization architecture shared by both online multiplayer and replay systems, enabling fully reproducible matches. Features include noise-based procedural map generation with symmetric resource layouts, a complete gameplay loop (harvesting, building, unit production, combat, victory conditions), multiple fog-of-war modes, and a visual replay system with scrubbing, speed control, and operation logs. The game offers two factions (Steel Alliance and Shadow Tech), single-player AI matches with difficulty logic, and LAN multiplayer via ENet on port 7777 using lockstep command synchronization. Resources consist of Minerals and Energy, with starting values of 400 and 200 respectively. It 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 developed with Godot 4.2, styled after StarCraft and Red Alert.

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

Core Features

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

  • Minerals: Basic resource for construction and unit production
  • Energy: Consumed by 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 has 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)
  • Multiplayer (LAN)

  • LAN room communication via ENet (UDP)
  • Lockstep command synchronization ensures 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 panels
  • 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 obstacle avoidance
  • Map system: FastNoiseLite procedural generation
  • Fog of war: Real-time updates via Image/ImageTexture
  • Localization: Custom LocalizationManager translation tables
  • Controls

  • W/A/S/D or arrow keys: Move camera
  • Left mouse: Select units
  • Right mouse: Issue move/interact commands
  • 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/panels or open game menu
  • Implemented Features

  • Full RTS main loop (harvesting, building, combat, win/loss)
  • Single-player AI matches
  • LAN multiplayer lobby and battles
  • Replay recording and playback system
  • Multilingual UI (Simplified Chinese / Traditional Chinese / English)
  • Possible Extensions

  • More factions and tech tree branches
  • Richer unit abilities and counter relationships
  • Replacing procedural map rendering with TileSet art
  • More robust 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