Draw the map with WebGL2 by default, with the 2D canvas as fallback

- Sea, land, waves, clouds, cables, tubes and packets are drawn by the
  graphics card; the land is geometry built once, so panning and zooming
  repaint nothing.
- Cities, labels and markers are painted once into a sprite atlas and drawn
  in one call (with drawImage in 2D, which speeds up the 2D map too).
- Settings > Map drawing: Auto or Always 2D, per device. Browsers without
  WebGL2, a lost context and puzzles keep the 2D map.
- npm run bench:gpu compares 2D and WebGL in a real browser on a real GPU;
  ?fps shows a frame meter.
This commit is contained in:
Antoine 2026-11-04 11:37:27 +01:00
parent 7aa6506e70
commit cf9ab5e774
No known key found for this signature in database
GPG key ID: 728FF1CE15732B05
36 changed files with 862 additions and 83 deletions

View file

@ -3910,12 +3910,15 @@
"settings.agent_api":"Agent API",
"settings.agent_relay_connected":"Agent relay connected: a tool can now drive this game in this tab.",
"settings.agent_s_clock":"Agent's clock",
"settings.always_2d":"Always 2D",
"settings.an_early_heads_up_below_60":"An early heads-up below 60% happiness, long before they are furious.",
"settings.auto_draws_the_map_with_your":"Auto draws the map with your graphics card when the browser allows it, which keeps big networks smooth. Always 2D works everywhere but is slower on big maps.",
"settings.auto_follows_your_device_s_reduce":"Auto follows your device’s reduce-motion setting. Off freezes the map: no moving packets, pulses or floating text.",
"settings.customers_and_alerts":"Customers and alerts",
"settings.display_and_sound":"Display and sound",
"settings.for_reporting_layout_bugs_shows_what":"For reporting layout bugs: shows what your screen tells the game.",
"settings.let_an_ai_agent_drive_this_game":"Let an AI agent drive this game",
"settings.map_drawing":"Map drawing",
"settings.n_min":"{n} min",
"settings.n_sec":"{n} s",
"settings.only_trouble_and_milestones_pop_up":"Only trouble and milestones pop up; everything else goes quietly into the NOC log. On by default in Best Effort.",
@ -3928,6 +3931,7 @@
"settings.the_agent_moves_it":"The agent moves it",
"settings.the_clock_while_an_agent_plays":"The clock while an agent plays",
"settings.the_game_stops_so_you_can":"The game stops so you can fix their service before they cancel. Most useful at high speed.",
"settings.this_browser_cannot_so_the_map":"This browser cannot, so the map is drawn in 2D.",
"settings.warn_when_a_customer_gets_unhappy":"Warn when a customer gets unhappy",
"settings.while_agent_mode_is_on_the":"While agent mode is on, the clock is not yours. With a pace it runs by itself and cannot be paused by hand, not even by an open window (yours included), and it waits while no agent is connected. Or the agent moves it, and nothing happens until it asks for days. The page connects to the local agent relay (npm run dev hosts one), so tools like the MCP server can drive this game while you watch.",
"share_card.build_the_internet_one_tube_at":"Build the internet, one tube at a time",