Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ab7e40e
Add live torus world view with anchored reveal and conformal mapping
genixpro Sep 4, 2026
b0ee6da
Unify torus map navigation, restore uniform wrapping, and include clouds
genixpro Sep 4, 2026
072edb4
Mask clouds by discovery and preserve native torus texture detail
genixpro Sep 4, 2026
d7091a4
Batch cloud rendering, cache torus mesh, and hover camera over fixed …
genixpro Sep 4, 2026
8e3b061
Keep a consistent inner-wall lens and anchor clouds to world coordinates
genixpro Sep 4, 2026
5f11891
Use a steady oblique surface orbit and scale drag to local geometry
genixpro Sep 4, 2026
a7f8589
Render torus and sky beneath the translucent sidebar
genixpro Sep 4, 2026
c50deb5
Blend hidden-area clouds smoothly with the view transition
genixpro Sep 4, 2026
f6f6780
Merge remote-tracking branch 'origin/master' into codex/toroidal-world
genixpro Sep 4, 2026
c0acfad
Add torus surface picking and configurable view shortcut; tidy experi…
genixpro Sep 5, 2026
1a81a2d
Fix strict C++14 Windows build and sky projection; remove view overlay
genixpro Sep 5, 2026
f250756
Refresh the torus world on every game frame
genixpro Sep 5, 2026
c269856
Keep inner-wall camera rotation monotonic
genixpro Sep 5, 2026
bf4b2d3
Preserve legacy Windows guards with strict C++14
genixpro Sep 5, 2026
aed4f21
Smooth shared torus camera movement and wheel zoom
genixpro Sep 5, 2026
490ffe8
Remove torus navigation hint overlay
genixpro Sep 5, 2026
187f994
Harden torus lifecycle and fallback; simplify geometry and reuse fram…
genixpro Sep 5, 2026
603a231
Preserve software-only builds and track OpenGL context ownership
genixpro Sep 5, 2026
18a4b2b
Honor software-only mode even when GPU rendering is requested
genixpro Sep 5, 2026
460f9f2
Make CI package downloads resilient to Ubuntu mirror updates
genixpro Sep 5, 2026
a8d7aaa
Run Linux CI on matching hosted Ubuntu images with pinned compilers
genixpro Sep 5, 2026
501b0f4
Honor explicit C++ compiler selection in application and test builds
genixpro Sep 5, 2026
a00e75d
Skip GPU sprite atlases safely in software rendering mode
genixpro Sep 5, 2026
1d19376
Port Giszmo’s fixed-axis torus navigation and cloud layer
genixpro Sep 5, 2026
31d26c9
Fix wrapped buildings and harden torus rendering and interaction
genixpro Sep 5, 2026
2ee8a38
Refresh torus rendering notes after sharing fog-of-war drawing
genixpro Sep 5, 2026
e7f776e
Keep regular 2D navigation separate from the optional torus view
genixpro Sep 5, 2026
0998b46
Keep sky tilt steady and preserve visible wrapped unit positions
genixpro Sep 5, 2026
d675050
Bound torus cloud work and batch variable-size resource sprites
genixpro Sep 5, 2026
76bbae9
Make automatic torus folding an opt-in in-game setting
genixpro Sep 5, 2026
33cb573
Move automatic torus option to main game settings
genixpro Sep 5, 2026
9310d30
Merge master and adapt torus to the refactored renderer
genixpro Sep 6, 2026
4c71b1a
Merge commit '2a8f918a4e3fd96c3734a8c9fc0ed031b83265c6' into codex/to…
genixpro Sep 6, 2026
1016f0b
Fit torus proportions and tile mapping to map dimensions
genixpro Sep 6, 2026
3cc46b1
Merge master and stabilize torus geometry validation
genixpro Sep 6, 2026
e155753
Merge master through b47c7d23
genixpro Sep 7, 2026
0e4524d
Fit torus camera to the viewport and improve shallow-view picking
genixpro Sep 7, 2026
48c98a9
Keep automatic torus view with the display settings
genixpro Sep 7, 2026
a5a9491
Keep torus focus centered and flatten wide-map views
genixpro Sep 7, 2026
708a65d
Merge master and preserve torus build and rendering checks
genixpro Sep 8, 2026
b76dae9
Use a job-level compatible compiler cache path
genixpro Sep 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 70 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ on:
jobs:
linux:
name: linux (${{ matrix.image }})
runs-on: ubuntu-latest
container: ${{ matrix.image }}
runs-on: ${{ matrix.runner }}
env:
CCACHE: 1
CCACHE_DIR: /ccache
CCACHE_DIR: /tmp/glob2-ccache
# Hash the compiler binary instead of trusting its mtime, so a g++ point
# release landing inside the base image cannot reuse the old one's
# entries. CCACHE_SLOPPINESS is deliberately left unset: include_file_mtime
Expand All @@ -29,21 +28,36 @@ jobs:
# 1.74 (catches C++20 features the oldest supported compiler lacks),
# 24.04 is g++ 13 / Boost 1.83 (catches new diagnostics and headers
# that no longer come in transitively).
image: [ubuntu:22.04, ubuntu:24.04]
include:
- image: ubuntu:22.04
runner: ubuntu-22.04
compiler: g++-11
- image: ubuntu:24.04
runner: ubuntu-24.04
compiler: g++-13
steps:
- name: Install dependencies
timeout-minutes: 15
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update -qq
apt-get install -y --no-install-recommends \
ca-certificates git g++ python3 scons pkg-config ccache \
# Fetch immutable package indexes to avoid mirror-sync mismatches,
# and bound network stalls without weakening signature verification.
sudo tee /etc/apt/apt.conf.d/80-ci-network >/dev/null <<'EOF'
Acquire::By-Hash "force";
Acquire::Retries "3";
Acquire::http::Timeout "30";
Acquire::https::Timeout "30";
EOF
sudo apt-get update -qq
sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates git ${{ matrix.compiler }} python3 scons pkg-config ccache \
libsdl2-dev libsdl2-image-dev libsdl2-net-dev libsdl2-ttf-dev \
libvorbis-dev libogg-dev libspeex-dev \
libboost-date-time-dev libboost-thread-dev libboost-system-dev \
zlib1g-dev libfribidi-dev libpcre3-dev \
libgl1-mesa-dev libglu1-mesa-dev libepoxy-dev \
libcppunit-dev xvfb xauth libgl1-mesa-dri
libgl1-mesa-dev libglu1-mesa-dev libepoxy-dev libgl1-mesa-dri xvfb xauth \
libcppunit-dev

- uses: actions/checkout@v4

Expand All @@ -53,16 +67,36 @@ jobs:
- name: Restore the compiler cache
uses: actions/cache/restore@v4
with:
path: /ccache
key: ccache-${{ matrix.image }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: ccache-${{ matrix.image }}-
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.runner }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: ccache-${{ matrix.runner }}-

- name: Reset the cache statistics
id: cache_ready
run: ccache -z

- name: Build glob2
run: scons -j$(nproc) release=1
run: scons CXX=${{ matrix.compiler }} -j$(nproc) release=1

- name: Test torus geometry, picking and cloud coordinates
run: |
${{ matrix.compiler }} -std=c++14 -O2 test/TorusGeometryTest.cpp -o /tmp/torus-geometry
/tmp/torus-geometry
${{ matrix.compiler }} -std=c++14 -O2 test/TorusPickingTest.cpp -o /tmp/torus-picking
/tmp/torus-picking
${{ matrix.compiler }} -std=c++14 -O2 test/CloudFieldTest.cpp src/SimplexNoise.cpp -o /tmp/cloud-field
/tmp/cloud-field
${{ matrix.compiler }} -std=c++14 -O2 test/MapRenderGeometryTest.cpp -o /tmp/map-render-geometry
/tmp/map-render-geometry

- name: Exercise GPU and software game rendering
run: |
scons CXX=${{ matrix.compiler }} -j$(nproc) release=1 torus-render-test
mkdir -p /tmp/glob2-render-profile
GLOB2_USER_DIR=/tmp/glob2-render-profile SDL_AUDIODRIVER=dummy LIBGL_ALWAYS_SOFTWARE=1 \
xvfb-run -a build/src/torus-render-test -g -F -m -s 1120x720
GLOB2_USER_DIR=/tmp/glob2-render-profile SDL_AUDIODRIVER=dummy SDL_VIDEODRIVER=dummy \
build/src/torus-render-test -G -F -m -s 1120x720

- name: Build and run the selection lifetime regression
run: |
Expand Down Expand Up @@ -99,7 +133,7 @@ jobs:
python3 test/run-savegame-safety-tests.py --check-preferences --expect-stdout test/fixtures/team-stats/version84.expected.txt build/src/TeamStatsSaveHarness . --legacy games/gd-small-2ai.game

- name: Build the YOG server
run: scons -j$(nproc) release=1 server=1 --build=build-server
run: scons CXX=${{ matrix.compiler }} -j$(nproc) release=1 server=1 --build=build-server

- name: Build and run the terrain resource regression
run: |
Expand Down Expand Up @@ -127,7 +161,7 @@ jobs:
- name: Build and run the tests
working-directory: test
run: |
scons -j$(nproc)
scons CXX=${{ matrix.compiler }} -j$(nproc)
./TestsRunner
for harness in ./*Harness ./*Test; do
echo "== $harness"
Expand All @@ -139,6 +173,14 @@ jobs:
scons -j$(nproc) release=1 server=0 speed-tests
xvfb-run -a python3 test/run-game-speed-tests.py

- name: Build without OpenGL
run: |
scons CXX=${{ matrix.compiler }} -j$(nproc) release=1 server=0 opengl=0 --build=build-software
python3 test/SoftwareStartupTest.py build-software/src/glob2
scons CXX=${{ matrix.compiler }} -j$(nproc) release=1 server=0 opengl=0 --build=build-software torus-render-test
GLOB2_USER_DIR=/tmp/glob2-render-profile SDL_AUDIODRIVER=dummy SDL_VIDEODRIVER=dummy \
build-software/src/torus-render-test -g -F -m -s 1120x720

# A run that touched a widely included header and still shows near-total
# direct hits means the cache is not seeing the change.
- name: Report the cache statistics
Expand All @@ -154,8 +196,8 @@ jobs:
if: ${{ !cancelled() && steps.cache_ready.outcome == 'success' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/master' }}
uses: actions/cache/save@v4
with:
path: /ccache
key: ccache-${{ matrix.image }}-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.runner }}-${{ github.run_id }}-${{ github.run_attempt }}

windows:
name: windows (mingw-w64)
Expand Down Expand Up @@ -193,6 +235,17 @@ jobs:
- name: Build glob2
run: scons -j$(nproc) release=1 mingw=1

- name: Test torus geometry, picking and cloud coordinates
run: |
g++ -std=c++14 -O2 test/TorusGeometryTest.cpp -o /tmp/torus-geometry
/tmp/torus-geometry
g++ -std=c++14 -O2 test/TorusPickingTest.cpp -o /tmp/torus-picking
/tmp/torus-picking
g++ -std=c++14 -O2 test/CloudFieldTest.cpp src/SimplexNoise.cpp -o /tmp/cloud-field
/tmp/cloud-field
g++ -std=c++14 -O2 test/MapRenderGeometryTest.cpp -o /tmp/map-render-geometry
/tmp/map-render-geometry

- name: Test savegame loading and atomic autosaves
run: |
scons -j$(nproc) release=1 mingw=1 server=0 savegame-safety-test
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ testResults.xml
.directory
__pycache__/
build/
build-software/
vcpkg_installed/

experiment/
.DS_Store
compile_commands.json
.cache/
Expand Down
43 changes: 31 additions & 12 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ EnsureSConsVersion(3, 0, 0)
import sys
import os
import glob
from io import StringIO
sys.path.append( os.path.abspath("scons") )
import bundle
import ccache
Expand All @@ -15,6 +16,7 @@ isDarwinPlatform = sys.platform=='darwin'

def establish_options(env):
opts = Variables('options_cache.py')
opts.Add("CXX", "C++ compiler", env["CXX"])
opts.Add("CXXFLAGS", "Manually add to the CXXFLAGS", "-g")
opts.Add("LINKFLAGS", "Manually add to the LINKFLAGS", "-g")
if isDarwinPlatform:
Expand All @@ -24,6 +26,7 @@ def establish_options(env):
opts.Add("BINDIR", "Binary Installation Directory", "/usr/local/bin")
opts.Add("DATADIR", "Directory where data will be put, set to the same as INSTALLDIR", "/usr/local/share")
opts.Add(BoolVariable("release", "Build for release", 0))
opts.Add(BoolVariable("opengl", "Enable OpenGL detection; set to 0 for software rendering only", 1))
opts.Add(BoolVariable("profile", "Build with profiling on", 0))
opts.Add(BoolVariable("mingw", "Build with mingw enabled if not auto-detected", 0))
opts.Add(BoolVariable("mingwcross", "Cross-compile with mingw for Win32", 0))
Expand All @@ -40,7 +43,7 @@ def establish_options(env):
class Configuration:
"""Handles the config.h file"""
def __init__(self):
self.f = open("config.h", 'w')
self.f = StringIO()
self.f.write("// config.h. Generated by scons\n")
self.f.write("\n")
def add(self, variable, doc, value=""):
Expand Down Expand Up @@ -152,7 +155,7 @@ def configure(env, server_only):

#Do checks for OpenGL, which is different on every system
gl_libraries = []
if not server_only:
if not server_only and env["opengl"]:
has_gl = True
if isDarwinPlatform:
print("Using Apple's OpenGL framework")
Expand Down Expand Up @@ -233,6 +236,14 @@ def configure(env, server_only):
Exit(1)

conf.Finish()
contents = configfile.f.getvalue()
previous = None
if os.path.exists("config.h"):
with open("config.h") as source:
previous = source.read()
if previous != contents:
with open("config.h", "w") as output:
output.write(contents)

def main():
AddOption('--portaudio',
Expand Down Expand Up @@ -309,6 +320,11 @@ def main():
if env['server']:
env.Append(CPPDEFINES=["YOG_SERVER_ONLY"])
server_only = True
env.Append(CXXFLAGS=["-std=gnu++20"])
# Strict C++ mode omits MinGW's nonstandard WIN32 alias. Legacy platform
# guards rely on it (including disabling the Unix OSS audio backend).
if env['mingw'] or isWindowsPlatform or env['mingwcross']:
env.Append(CPPDEFINES=["WIN32"])
configure(env, server_only)

env.Append(CPPPATH=['#libgag/include', '#'])
Expand All @@ -322,26 +338,29 @@ def main():
'#src/sgsl',
'#src/team',
'#src/unit'])
env.Append(CXXFLAGS=' -std=gnu++20 -Wall -fPIC')
env.Append(CXXFLAGS=["-Wall", "-fPIC"])
# Uninitialized-read diagnostics: DET_INIT=zero|pattern forces deterministic
# stack initialization (see CLAUDE.md). Env var, not a cached scons option.
_detinit = os.environ.get('DET_INIT')
if _detinit:
env.Append(CXXFLAGS=' -ftrivial-auto-var-init=' + _detinit)
env.Append(CXXFLAGS=['-ftrivial-auto-var-init=' + _detinit])
env.Append(CCFLAGS=' -ftrivial-auto-var-init=' + _detinit)
env.Append(LINKFLAGS=' -Wall')
env.Append(LINKFLAGS=["-Wall"])
env.Append(LIBS=['SDL2_net'])
if not server_only:
env.Append(LIBS=['vorbisfile', 'SDL2_ttf', 'SDL2_image', 'speex'])

if env['release']:
env.Append(CXXFLAGS=' -O3 -s')
env.Append(LINKFLAGS=' -O3 -s -fwhole-program')
env.Append(CXXFLAGS=["-O3"])
env.Append(LINKFLAGS=["-O3"])
if not isDarwinPlatform:
env.Append(CXXFLAGS=["-s"])
env.Append(LINKFLAGS=["-s", "-fwhole-program"])
if env['profile']:
env.Append(CXXFLAGS=' -pg')
env.Append(LINKFLAGS='-pg')
env.Append(CXXFLAGS=' -O3')
env.Append(LINKFLAGS='-O3')
env.Append(CXXFLAGS=["-pg"])
env.Append(LINKFLAGS=["-pg"])
env.Append(CXXFLAGS=["-O3"])
env.Append(LINKFLAGS=["-O3"])
if env['mingw'] or isWindowsPlatform or env['mingwcross']:
# TODO: Remove unneccessary dependencies for server.
env.Append(LIBS=['vorbis', 'ogg', 'wsock32', 'winmm'])
Expand Down Expand Up @@ -372,7 +391,7 @@ def main():

PackTar(env["TARFILE"], Split("COPYING INSTALL mkdist mkinstall mkuninstall README README.hg SConstruct"))
#packaging for apple
if isDarwinPlatform and env["release"]:
if isDarwinPlatform and env["release"] and "bundle" in COMMAND_LINE_TARGETS:
bundle.generate(env)
dmg.generate(env)
env.Replace(
Expand Down
1 change: 1 addition & 0 deletions data/keyboard-gui.default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<->=decrease units working
<=>=increase units working
<d>=destroy building
<g>=toggle torus view
<h>=view history
<i>=toggle draw information
<m>=mark map
Expand Down
6 changes: 6 additions & 0 deletions data/texts.en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1224,6 +1224,12 @@ Your IP address was temporarily banned. Please wait patiently until it is unbann
Your unit got converted to %0's team
[Your username was banned]
Your username was banned. Please contact the administrators to have this changed.

[toggle torus view]
Toggle 2D / torus view

[automatic torus view]
Automatic torus view
[game speed help]
Single-player and replays only. Multiplayer runs at 1x.
[maximum game speed]
Expand Down
2 changes: 2 additions & 0 deletions data/texts.keys.txt
Original file line number Diff line number Diff line change
Expand Up @@ -612,3 +612,5 @@
[Your IP address was temporarily banned]
[Your unit got converted to %0's team]
[Your username was banned]

[automatic torus view]
Loading
Loading