diff --git a/CHANGELOG.md b/CHANGELOG.md index 3506efc..de793ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,27 @@ All notable changes to this project are documented here. The project follows out half the port instead of all of it (#8). - The top bar no longer wraps onto a second row and covers the side panels on laptop-sized screens. +- Routers make sense now: the Chonk 800 takes 800G waves and ports (a new + 800G wave sits between 400G and 1.6T), and only the Absolute Unit has 1.6T + ports and takes 6.4T waves, handed off as 4×1.6T. Existing waves keep + their size. +- London–Amsterdam is everywhere: three more cheap North Sea cables, and dark + fiber you can lease on them (and on the Channel), since you can't dig under + the sea. +- Your own IX can grow (#10): upgrade its fabric from 400G to 1.6T, 6.4T and + 25.6T. Bigger fabrics carry more and have room for more members. +- Wave prices follow real markets: Europe is cheap, North America average, + Asia and South America pricier, and anything into Africa several times the + price. Every route has its own going rate, and new leases get about 8% + cheaper each year. The link planner tells you how a route compares. +- Cairo–Dubai over the Red Sea, plus I-ME-WE-Us to Fujairah and Mumbai. +- The Gulf: Jeddah, Riyadh and Doha. Saudi POPs need a local telecom licence, + gigaprojects want enormous demo networks, and now and then the neighbours + fall out and every link between Qatar and Saudi Arabia or the UAE goes dark + for months. Qatar is on the map as a peninsula now, too. +- Tablets in landscape: slimmer side panels, bigger touch targets, and the + left panel tucks away while a city is open (tap "Goals & NOC" to bring it + back). ## [1.9.0] — 2026-10-23 diff --git a/site/gulf2.png b/site/gulf2.png new file mode 100644 index 0000000..00d561d Binary files /dev/null and b/site/gulf2.png differ diff --git a/site/index.html b/site/index.html index e15c957..a262296 100644 --- a/site/index.html +++ b/site/index.html @@ -324,6 +324,20 @@ input.t{width:100%;box-sizing:border-box;border:3px solid var(--ink);border-radi .gl dd{margin:2px 0 0;color:var(--ink2);line-height:1.45;font-size:13px} .kbd{display:inline-block;border:2px solid var(--ink);border-radius:6px;padding:0 5px;font-weight:900;font-size:11px;background:var(--soft)} +/* Tablets in landscape (and small laptops): slimmer side panels, a tuck-away left panel and + bigger touch targets so the map keeps some room in the middle. */ +@media (min-width:761px) and (max-width:1200px){ + #left{width:272px} + #panel{width:336px} + #left.closed{display:none} + #leftToggle{display:flex;position:fixed;left:max(12px,env(safe-area-inset-left,0px));bottom:calc(env(safe-area-inset-bottom,0px) + 14px);z-index:4} + #leftToggle[hidden]{display:none} +} +@media (min-width:761px) and (max-width:1366px) and (pointer:coarse){ + .b.sm{min-height:32px;padding:5px 11px} + .tabs button{min-height:40px} + .speed button{min-height:34px} +} /* Mid-size screens: keep the HUD on one row so it never wraps over the side panels. */ @media (min-width:761px) and (max-width:1360px){ #hud{gap:6px} @@ -464,20 +478,23 @@ const W=2000, H=1000, KM=14; const POP_COST=20000, POP_MO=1500, EYE_RATE=150, CACHE_CAP=100, CACHE_MO=400; const DAY_MS=2500, ROUTER_COST=15000, ROUTER_MO=1500, GEN_COST=12000, GEN_MO=600, DIVERSE=1.4; const RU_BOX=40000, RU_BOX_MO=2000; -const UAE_LIC=15000; +const UAE_LIC=15000,KSA_LIC=25000; const SITE2_COST=45000,SITE2_MO=3000,TE_COST=60000,TE_MO=4000; const SITE2_N=['The Other Building','Campus B (the one with parking)','Across-the-River DC','The Annex','Suburban Mega-shed','The Cheaper One','Formerly a Shopping Mall','Bunker Two']; const siteName=(c,s)=>s==='b'?SITE2_N[hstr(c)%SITE2_N.length]:CITY[c].dc; -const popCost=c=>POP_COST+(c&&CITY[c]&&CITY[c].ru?RU_BOX:0)+(c&&CITY[c]&&CITY[c].uae?UAE_LIC:0); +const popCost=c=>POP_COST+(c&&CITY[c]&&CITY[c].ru?RU_BOX:0)+(c&&CITY[c]&&CITY[c].uae?UAE_LIC:0)+(c&&CITY[c]&&CITY[c].saudi?KSA_LIC:0); const CN_LIC=150000, CN_JV_MO=6000, SCRUB_COST=60000, SCRUB_MO=5000; const MYIX_COST=80000, MYIX_MO=3000, MYIX_FEE=1500, START_CASH=200000; -const LT=[{n:'10G',g:10,m:1},{n:'100G',g:100,m:2.8},{n:'400G',g:400,m:6},{n:'1.6T',g:1600,m:13},{n:'6.4T',g:6400,m:28}]; -const PORT=[{n:'10G',g:10,setup:500,tmo:150,ix:400,pni:200},{n:'100G',g:100,setup:1500,tmo:400,ix:1500,pni:350},{n:'400G',g:400,setup:4000,tmo:900,ix:4000,pni:600},{n:'800G',g:800,setup:8000,tmo:1600,ix:7000,pni:1000}]; +// Your own exchange's switching fabric. Bigger fabrics carry more and attract more members. +const MYIX_FAB=[{n:'400G',g:400,cost:0,mo:3000,max:12},{n:'1.6T',g:1600,cost:60000,mo:6000,max:20,lvl:2},{n:'6.4T',g:6400,cost:200000,mo:12000,max:30,lvl:3},{n:'25.6T',g:25600,cost:600000,mo:25000,max:45,lvl:4}]; +const myFab=c=>MYIX_FAB[Math.min(MYIX_FAB.length-1,Math.max(0,(S.myIx[c]&&S.myIx[c].fab)|0))]; +const LT=[{n:'10G',g:10,m:1},{n:'100G',g:100,m:2.8},{n:'400G',g:400,m:6},{n:'800G',g:800,m:9},{n:'1.6T',g:1600,m:13},{n:'6.4T',g:6400,m:28,note:'handed off as 4×1.6T'}]; +const PORT=[{n:'10G',g:10,setup:500,tmo:150,ix:400,pni:200},{n:'100G',g:100,setup:1500,tmo:400,ix:1500,pni:350},{n:'400G',g:400,setup:4000,tmo:900,ix:4000,pni:600},{n:'800G',g:800,setup:8000,tmo:1600,ix:7000,pni:1000},{n:'1.6T',g:1600,setup:16000,tmo:2800,ix:12000,pni:1600}]; const RG=[ {n:'Rusty Router 9000',pn:'100G',cap:400,cost:0,mo:0,maxLT:1,maxP:1,lvl:1,boot:6,slowP:10,chip:'a mystery ASIC',blurb:'Bought used on eBuy. The fans sound like a jet engine.'}, {n:'Edge Lord 400',pn:'400G',cap:3200,cost:30000,mo:1000,maxLT:2,maxP:2,lvl:2,boot:11,slowP:20,chip:'merchant silicon',blurb:'Sharp, edgy, and finally speaks 400G and 400ZR+.'}, - {n:'Chonk 800',pn:'800G',cap:12800,cost:90000,mo:3000,maxLT:4,maxP:3,lvl:3,boot:25,slowP:45,chip:'Junipurr PacketOinker™',blurb:'An absolute unit with 800G ports, built around the Junipurr PacketOinker™ forwarding chip. Oinks at line rate. Takes 800ZR+ optics.'}, - {n:'Absolute Unit 1.6T',pn:'1.6T',cap:51200,cost:250000,mo:8000,maxLT:4,maxP:3,lvl:4,boot:40,slowP:60,chip:'PacketOinker² (two pigs, one chassis)',blurb:'1.6T ports, its own weather system and two PacketOinker² chips per line card. Needs a forklift.'}, + {n:'Chonk 800',pn:'800G',cap:12800,cost:90000,mo:3000,maxLT:3,maxP:3,lvl:3,boot:25,slowP:45,chip:'Junipurr PacketOinker™',blurb:'An absolute unit with 800G ports, built around the Junipurr PacketOinker™ forwarding chip. Oinks at line rate. Takes 800ZR+ optics.'}, + {n:'Absolute Unit 1.6T',pn:'1.6T',cap:51200,cost:250000,mo:8000,maxLT:5,maxP:4,lvl:4,boot:40,slowP:60,chip:'PacketOinker² (two pigs, one chassis)',blurb:'1.6T ports, its own weather system and two PacketOinker² chips per line card. Takes 6.4T waves as 4×1.6T. Needs a forklift.'}, ]; /* Some routers take forever to boot. Each POP's chassis has a personality per model: most come back in minutes, a few sit through every line card self-test known to the vendor. */ @@ -524,17 +541,17 @@ const capName=l=>l.kind==='vxc'?VXC[l.vt].n:l.kind==='df'?(l.ready>S.day?'buildi /* ================= WORLD ================= */ // Real-ish geography: lon/lat outlines, equirectangular, with gentle "magnifying lenses" over the busy regions. -const LENSES=[{lon:102.5,lat:2.6,r:22,m:1.1},{lon:55.3,lat:24.9,r:26,m:1.2},{lon:78.5,lat:15,r:48,m:1.1},{lon:-44.5,lat:-23.5,r:30,m:1.2},{lon:9,lat:49,r:170,m:1.25},{lon:121,lat:32,r:120,m:0.45},{lon:-80,lat:40,r:110,m:0.5}]; +const LENSES=[{lon:102.5,lat:2.6,r:22,m:1.1},{lon:52.5,lat:25.3,r:45,m:1.5},{lon:78.5,lat:15,r:48,m:1.1},{lon:-44.5,lat:-23.5,r:30,m:1.2},{lon:9,lat:49,r:170,m:1.25},{lon:121,lat:32,r:120,m:0.45},{lon:-80,lat:40,r:110,m:0.5}]; function proj0(lon,lat){return [(lon+180)/360*W,(84-lat)*6.4];} for(const L of LENSES){const q=proj0(L.lon,L.lat);L.x=q[0];L.y=q[1];} function proj(lon,lat){const q=proj0(lon,lat);let dx=0,dy=0;for(const L of LENSES){let ex=q[0]-L.x;ex-=W*Math.round(ex/W);const ey=q[1]-L.y,f=L.m*Math.exp(-(ex*ex+ey*ey)/(L.r*L.r));dx+=ex*f;dy+=ey*f;}return [q[0]+dx,q[1]+dy];} function hav(lo1,la1,lo2,la2){const r=Math.PI/180,dLa=(la2-la1)*r,dLo=(lo2-lo1)*r,a=Math.sin(dLa/2)**2+Math.cos(la1*r)*Math.cos(la2*r)*Math.sin(dLo/2)**2;return 2*6371*Math.asin(Math.min(1,Math.sqrt(a)));} -const LANDS_LL=[{id:'am',ll:[[-166,68],[-157,71.2],[-141,69.8],[-128,70],[-115,68.5],[-97,68],[-94,62],[-92.5,57.5],[-85,55.2],[-80,51.5],[-78.5,58],[-77,62],[-70,61],[-64.5,60],[-61.5,56.5],[-57,52],[-55.6,49.5],[-53,47],[-59,46.5],[-61,45.2],[-66,44.5],[-70,43.3],[-70,42],[-74,40.6],[-76,38],[-75.8,35.5],[-77.5,34.5],[-79,33],[-81,31],[-80.05,27],[-80.1,25.3],[-81.5,25],[-82.7,27.5],[-84,30],[-89,30.2],[-94,29.5],[-97,28],[-97.5,25],[-97.7,22],[-96,19],[-94,18.3],[-91,18.5],[-90.4,21],[-87,21.5],[-88,17],[-88.5,15.8],[-84,15.8],[-83.4,12],[-83.7,10.5],[-81.5,9],[-79.5,9.5],[-77.5,8.6],[-75,10.8],[-71.5,12.3],[-68,10.6],[-62,10.5],[-60,8],[-57,6],[-52,5],[-50,1.5],[-48,-1],[-44,-2.5],[-39,-3.5],[-35,-5.5],[-35,-9],[-37.5,-12.5],[-39,-15],[-39.7,-19],[-41,-22],[-44,-23],[-48,-26],[-48.6,-28.5],[-51,-31],[-53,-34],[-58,-34.5],[-57,-37],[-62,-39],[-65,-41],[-64,-43],[-67.5,-46],[-66,-48],[-69,-51],[-68.5,-53],[-70,-55],[-73,-53],[-75,-48],[-73.5,-43],[-73.5,-37],[-71.5,-32],[-71.3,-27],[-70.5,-20],[-71.5,-17],[-76,-14],[-78,-10],[-81,-6],[-80.5,-3],[-80,0],[-79,1.5],[-77.5,4],[-77.4,7.5],[-80,7.3],[-82.5,8.2],[-85.7,10],[-87,12.5],[-91,14],[-94,16],[-96.5,15.7],[-100,17],[-105.5,20],[-105.5,22.5],[-108,25.5],[-110.8,27.9],[-113,31.3],[-114.7,31.7],[-113.5,29],[-112,26.5],[-110,24],[-109.5,23],[-112,24.8],[-114,27.5],[-115.5,29.8],[-117,32.5],[-118.5,34],[-120.6,34.6],[-122.5,37.5],[-124,40.5],[-124.5,43],[-124,46.2],[-124.7,48.4],[-123,49],[-126,50.5],[-130,54.5],[-133,57.5],[-137,58.5],[-141,60],[-146,61],[-150,59.5],[-152,58.5],[-156,57.5],[-158,56.8],[-162,55.5],[-164.5,54.5],[-158,58.5],[-162,60],[-165,61.5],[-166,64],[-164,65.5]]},{id:'eu',ll:[[-9,39],[-9.5,43],[-8,43.7],[-1.8,43.4],[-1.2,46],[-2.5,47.3],[-4.5,48],[-1.6,48.6],[1.5,50.2],[3,51.2],[4.5,52.5],[5,53.4],[7,53.6],[8.6,54],[8.2,55.5],[8.1,57],[10.5,57.7],[10.5,56.5],[11.2,56],[12.6,56.1],[12.7,55.6],[12.1,54.9],[11,54.3],[14,54],[18.5,54.8],[21,55.3],[21,57],[24,57.5],[24,59.2],[28,59.5],[30,60],[28,60.5],[25,60.1],[22.5,60.3],[21.5,61.5],[21.5,63],[25,65],[25.5,65.6],[22,65.8],[20.5,63.5],[18,62.5],[17.4,61],[19,59.8],[18,59],[16.5,57],[16,56.2],[14.2,55.4],[13,55.4],[12.9,56.5],[11.5,58],[10.5,59.3],[8,58],[5.5,58.5],[5,60],[5,62],[7,63],[10,64],[12.5,66],[15,68.5],[18,69.8],[21.5,70.2],[26,71],[30,70],[33,69.3],[41,67],[44,68.5],[53,68.5],[58,69],[68,69],[69,72.8],[73,72.5],[80,73.5],[87,74.8],[100,76],[104,77.7],[112,74],[113.5,73.5],[127,73.5],[132,71.5],[140,72.5],[150,71.5],[160,70],[170,70],[180,69],[190,66.5],[186,64.5],[182,65],[178,62.5],[173,61],[170,60],[164,60],[164,57],[162,55],[159,52],[156.7,51],[156,55.5],[157,58],[155,59.5],[150,59.5],[143,59.3],[137,54.5],[141,53],[140,48.5],[135,43.5],[131,42.7],[129.5,41],[129.4,37],[129.4,35.5],[127.5,34.6],[126.3,34.8],[126.5,37],[125,37.8],[124.5,39.7],[121.5,39],[121.7,40.8],[119,39.3],[117.8,38.5],[119,37.2],[122.5,37.3],[120.5,36],[119.2,35],[121,32],[121.9,30.8],[121.5,28],[119.5,25.5],[116.5,23],[114.3,22.1],[111,21.5],[109.7,20.5],[108.5,21.6],[106.5,20],[106,18],[108.5,15],[109.3,12],[107,10.5],[105,8.6],[104.8,10.3],[103,11],[100.9,12.6],[100,13.4],[99.3,10.5],[100.3,7],[101,6.8],[103.4,4],[104.3,1.4],[103.6,1.25],[101.3,2.8],[100.2,5.3],[98.3,8],[98.6,13],[97.7,16.5],[94.4,16.2],[94.2,18.8],[92.3,20.6],[91.8,22.6],[90,22],[88.3,21.6],[86.9,20.6],[85,19.5],[82.3,16.6],[80.3,15.8],[80.3,13.5],[79.8,10.3],[78.3,8.9],[77.5,8.1],[76.5,8.9],[75.8,11.5],[74.8,12.9],[73.5,16],[72.8,19],[72.7,21.2],[70,22.5],[68.5,23.5],[66.6,25.4],[61.6,25.2],[57.3,25.8],[56.4,27.1],[54.7,26.5],[51.5,27.9],[50,30],[48,30],[48.4,28.5],[49.5,26.7],[50.8,24.8],[51.6,24.2],[52.6,24.2],[54.6,24.5],[56,26.2],[56.4,24.5],[57.8,23.8],[58.8,22.5],[59.8,22.4],[58.5,20.5],[57.7,19],[55.4,17.7],[52.2,15.7],[48.7,14],[45,12.8],[43.4,12.6],[42.7,15.7],[42.5,17.2],[41,19.5],[39.1,21.6],[38.4,23.6],[37,25.5],[35.2,28],[34.9,29.5],[34.3,27.8],[33,28.8],[32.6,30],[32.3,31.2],[34.2,31.3],[34.9,32.8],[35.6,34.5],[36,35.8],[36.2,36.7],[34.5,36.8],[32.5,36.1],[30.5,36.4],[29,36.6],[27.3,37.4],[26.3,38.6],[26.5,40],[26.2,40.6],[24,40.8],[22.6,40.4],[23.5,38],[22.3,36.5],[21.7,36.8],[21.2,38.4],[19.5,40],[19.5,41.8],[18.5,42.5],[16,43.5],[13.7,45.6],[12.3,45.3],[12.4,44.2],[13.6,43.5],[15.9,41.6],[18.5,40.2],[17,39],[16.6,38],[15.6,38],[16.1,39],[15.6,40.1],[14.3,40.6],[12.5,41.6],[11,42.5],[10.2,43.9],[8.8,44.4],[7.5,43.8],[6,43.1],[4,43.5],[3.1,43.1],[3.2,41.9],[0.8,41],[0,39.5],[-0.3,38.4],[-0.8,37.6],[-2.1,36.7],[-4.4,36.7],[-5.6,36],[-6.3,36.8],[-7.4,37.2],[-8.9,37]]},{id:'af',ll:[[-17.5,14.7],[-17,21],[-16,24],[-13,27.5],[-9.8,30],[-9.2,32.5],[-6.8,34],[-5.9,35.8],[-2,35.1],[1,36.5],[5,36.8],[9.8,37.3],[11,36.9],[10.2,35.2],[11.1,33.3],[15.2,32.3],[19,30.3],[20.1,32],[23,32.6],[25,31.7],[29,30.9],[32.2,31.3],[32.6,30],[33.5,28],[35.5,24],[37.2,21],[38.5,18],[39.6,15.5],[41.6,13.5],[43.3,12.4],[44,10.4],[47,11.1],[51.2,11.8],[51,10.4],[49.5,7],[47.8,4.5],[45,1.6],[42,-1],[40.2,-2.8],[39.3,-4.8],[38.8,-6.5],[39.6,-10],[40.5,-11],[40.6,-14.6],[37,-17.5],[35.4,-22],[35.5,-24],[32.9,-25.9],[32.5,-28.6],[31,-29.9],[28,-32.7],[25.6,-33.9],[22.5,-34],[20,-34.8],[18.4,-34],[17.9,-32.5],[16.5,-28.6],[15.2,-27],[14.4,-23],[12.8,-19],[11.8,-16.8],[12.2,-14.5],[13.6,-12.2],[13.2,-8.8],[12.3,-6],[11.8,-3.5],[9.5,-1],[9.4,1],[9.8,3.2],[8.9,4.5],[6,4.3],[4.3,6.3],[1.6,6.2],[-2,4.8],[-4.6,5.2],[-7.5,4.4],[-9.4,5.4],[-11.5,6.9],[-13.2,8.7],[-15,10.9],[-16.7,12.4]]},{id:'uk',ll:[[-5.7,50.1],[-3,50.6],[1.4,51.2],[1.7,52.7],[0.3,53.4],[-0.2,54.3],[-1.6,55.6],[-2,56.4],[-1.8,57.6],[-3.4,58.6],[-5,58.6],[-6.2,57.5],[-5.6,56.3],[-5,55],[-3.2,54.9],[-3.4,54],[-3,53.4],[-4.6,53.3],[-4.2,52.2],[-5.2,51.7],[-3.2,51.4],[-4.6,51]]},{id:'ie',ll:[[-6,52.2],[-6.2,53.5],[-5.6,54.6],[-6.4,55.2],[-7.4,55.4],[-8.5,54.5],[-10,54.2],[-9.6,53.2],[-10.2,51.9],[-9.6,51.5],[-8.2,51.8]]},{id:'is',ll:[[-22.5,63.9],[-24,65.5],[-22,66.4],[-16,66.5],[-14.5,65.3],[-14.6,64.4],[-18,63.4]]},{id:'jp',ll:[[129.6,33.3],[130.2,31.3],[131.4,31.5],[132,33],[133.5,33.4],[135.2,33.6],[136.8,34.3],[138.8,34.6],[140,35],[140.8,35.7],[141,38.2],[141.9,39.5],[141.4,41.4],[140,41.4],[139.9,40.3],[139.8,38.5],[138.8,37.8],[137.3,36.9],[136,36],[135.4,35.6],[133,35.5],[131.5,34.6],[130.9,34]]},{id:'oc',ll:[[113.5,-22],[114,-26.5],[115,-30],[115.7,-33.6],[115,-34.3],[117.9,-35.1],[123.5,-33.9],[126,-32.3],[131,-31.5],[134,-32.8],[135.6,-34.8],[137.6,-35.6],[138.5,-34.6],[139.6,-36.9],[141.5,-38.4],[144.9,-37.9],[146.4,-39.1],[150,-37.5],[150.8,-34.5],[152.5,-32.4],[153.6,-28.5],[153,-25],[150.8,-22.5],[149,-20.6],[146.3,-18.9],[145.4,-16],[145.3,-14.9],[143.5,-12.3],[142.5,-10.7],[141.6,-12.8],[141.6,-16],[140.6,-17.6],[139.3,-17.4],[137,-15.9],[135.8,-15],[136.8,-12.2],[135,-12],[132.6,-11.5],[131,-12.2],[129.5,-14.9],[128,-15.4],[126.5,-13.9],[124.5,-16.5],[122.2,-18.2],[121,-19.7],[118.5,-20.3],[116.7,-20.6],[114.6,-21.8]]},{id:'nz',ll:[[172.7,-34.4],[174.5,-36],[175.9,-37.5],[178.5,-37.7],[177.9,-39.2],[176.9,-39.6],[175.2,-41.6],[174.6,-41.2],[174.9,-39.9],[173.8,-39.3],[174.6,-38.1],[174.5,-37.3],[173.1,-35.3]]},{id:'idn',ll:[[105.2,-6.8],[106.8,-6.1],[108.5,-6.4],[110.5,-6.9],[112.6,-6.9],[114.6,-7.7],[114.4,-8.7],[111,-8.3],[108,-7.8],[105.5,-7]]},{id:'ph',ll:[[120.6,18.5],[122.2,18.5],[122,16.5],[121.6,14.2],[124,13.8],[124,12.5],[123.3,13],[121,13.6],[120.6,14.5],[119.8,16.2]]}]; +const LANDS_LL=[{id:'am',ll:[[-166,68],[-157,71.2],[-141,69.8],[-128,70],[-115,68.5],[-97,68],[-94,62],[-92.5,57.5],[-85,55.2],[-80,51.5],[-78.5,58],[-77,62],[-70,61],[-64.5,60],[-61.5,56.5],[-57,52],[-55.6,49.5],[-53,47],[-59,46.5],[-61,45.2],[-66,44.5],[-70,43.3],[-70,42],[-74,40.6],[-76,38],[-75.8,35.5],[-77.5,34.5],[-79,33],[-81,31],[-80.05,27],[-80.1,25.3],[-81.5,25],[-82.7,27.5],[-84,30],[-89,30.2],[-94,29.5],[-97,28],[-97.5,25],[-97.7,22],[-96,19],[-94,18.3],[-91,18.5],[-90.4,21],[-87,21.5],[-88,17],[-88.5,15.8],[-84,15.8],[-83.4,12],[-83.7,10.5],[-81.5,9],[-79.5,9.5],[-77.5,8.6],[-75,10.8],[-71.5,12.3],[-68,10.6],[-62,10.5],[-60,8],[-57,6],[-52,5],[-50,1.5],[-48,-1],[-44,-2.5],[-39,-3.5],[-35,-5.5],[-35,-9],[-37.5,-12.5],[-39,-15],[-39.7,-19],[-41,-22],[-44,-23],[-48,-26],[-48.6,-28.5],[-51,-31],[-53,-34],[-58,-34.5],[-57,-37],[-62,-39],[-65,-41],[-64,-43],[-67.5,-46],[-66,-48],[-69,-51],[-68.5,-53],[-70,-55],[-73,-53],[-75,-48],[-73.5,-43],[-73.5,-37],[-71.5,-32],[-71.3,-27],[-70.5,-20],[-71.5,-17],[-76,-14],[-78,-10],[-81,-6],[-80.5,-3],[-80,0],[-79,1.5],[-77.5,4],[-77.4,7.5],[-80,7.3],[-82.5,8.2],[-85.7,10],[-87,12.5],[-91,14],[-94,16],[-96.5,15.7],[-100,17],[-105.5,20],[-105.5,22.5],[-108,25.5],[-110.8,27.9],[-113,31.3],[-114.7,31.7],[-113.5,29],[-112,26.5],[-110,24],[-109.5,23],[-112,24.8],[-114,27.5],[-115.5,29.8],[-117,32.5],[-118.5,34],[-120.6,34.6],[-122.5,37.5],[-124,40.5],[-124.5,43],[-124,46.2],[-124.7,48.4],[-123,49],[-126,50.5],[-130,54.5],[-133,57.5],[-137,58.5],[-141,60],[-146,61],[-150,59.5],[-152,58.5],[-156,57.5],[-158,56.8],[-162,55.5],[-164.5,54.5],[-158,58.5],[-162,60],[-165,61.5],[-166,64],[-164,65.5]]},{id:'eu',ll:[[-9,39],[-9.5,43],[-8,43.7],[-1.8,43.4],[-1.2,46],[-2.5,47.3],[-4.5,48],[-1.6,48.6],[1.5,50.2],[3,51.2],[4.5,52.5],[5,53.4],[7,53.6],[8.6,54],[8.2,55.5],[8.1,57],[10.5,57.7],[10.5,56.5],[11.2,56],[12.6,56.1],[12.7,55.6],[12.1,54.9],[11,54.3],[14,54],[18.5,54.8],[21,55.3],[21,57],[24,57.5],[24,59.2],[28,59.5],[30,60],[28,60.5],[25,60.1],[22.5,60.3],[21.5,61.5],[21.5,63],[25,65],[25.5,65.6],[22,65.8],[20.5,63.5],[18,62.5],[17.4,61],[19,59.8],[18,59],[16.5,57],[16,56.2],[14.2,55.4],[13,55.4],[12.9,56.5],[11.5,58],[10.5,59.3],[8,58],[5.5,58.5],[5,60],[5,62],[7,63],[10,64],[12.5,66],[15,68.5],[18,69.8],[21.5,70.2],[26,71],[30,70],[33,69.3],[41,67],[44,68.5],[53,68.5],[58,69],[68,69],[69,72.8],[73,72.5],[80,73.5],[87,74.8],[100,76],[104,77.7],[112,74],[113.5,73.5],[127,73.5],[132,71.5],[140,72.5],[150,71.5],[160,70],[170,70],[180,69],[190,66.5],[186,64.5],[182,65],[178,62.5],[173,61],[170,60],[164,60],[164,57],[162,55],[159,52],[156.7,51],[156,55.5],[157,58],[155,59.5],[150,59.5],[143,59.3],[137,54.5],[141,53],[140,48.5],[135,43.5],[131,42.7],[129.5,41],[129.4,37],[129.4,35.5],[127.5,34.6],[126.3,34.8],[126.5,37],[125,37.8],[124.5,39.7],[121.5,39],[121.7,40.8],[119,39.3],[117.8,38.5],[119,37.2],[122.5,37.3],[120.5,36],[119.2,35],[121,32],[121.9,30.8],[121.5,28],[119.5,25.5],[116.5,23],[114.3,22.1],[111,21.5],[109.7,20.5],[108.5,21.6],[106.5,20],[106,18],[108.5,15],[109.3,12],[107,10.5],[105,8.6],[104.8,10.3],[103,11],[100.9,12.6],[100,13.4],[99.3,10.5],[100.3,7],[101,6.8],[103.4,4],[104.3,1.4],[103.6,1.25],[101.3,2.8],[100.2,5.3],[98.3,8],[98.6,13],[97.7,16.5],[94.4,16.2],[94.2,18.8],[92.3,20.6],[91.8,22.6],[90,22],[88.3,21.6],[86.9,20.6],[85,19.5],[82.3,16.6],[80.3,15.8],[80.3,13.5],[79.8,10.3],[78.3,8.9],[77.5,8.1],[76.5,8.9],[75.8,11.5],[74.8,12.9],[73.5,16],[72.8,19],[72.7,21.2],[70,22.5],[68.5,23.5],[66.6,25.4],[61.6,25.2],[57.3,25.8],[56.4,27.1],[54.7,26.5],[51.5,27.9],[50,30],[48,30],[48.4,28.5],[49.5,26.7],[50.8,24.8],[50.85,25.6],[51.2,26.15],[51.62,25.9],[51.62,24.6],[52.6,24.2],[54.3,24.6],[55.3,25.3],[55.9,25.75],[56.1,26.1],[56.35,26.38],[56.42,25.8],[56.38,25.0],[56.5,24.6],[57.8,23.8],[58.8,22.5],[59.8,22.4],[58.5,20.5],[57.7,19],[55.4,17.7],[52.2,15.7],[48.7,14],[45,12.8],[43.4,12.6],[42.7,15.7],[42.5,17.2],[41,19.5],[39.1,21.6],[38.4,23.6],[37,25.5],[35.2,28],[34.9,29.5],[34.3,27.8],[33,28.8],[32.6,30],[32.3,31.2],[34.2,31.3],[34.9,32.8],[35.6,34.5],[36,35.8],[36.2,36.7],[34.5,36.8],[32.5,36.1],[30.5,36.4],[29,36.6],[27.3,37.4],[26.3,38.6],[26.5,40],[26.2,40.6],[24,40.8],[22.6,40.4],[23.5,38],[22.3,36.5],[21.7,36.8],[21.2,38.4],[19.5,40],[19.5,41.8],[18.5,42.5],[16,43.5],[13.7,45.6],[12.3,45.3],[12.4,44.2],[13.6,43.5],[15.9,41.6],[18.5,40.2],[17,39],[16.6,38],[15.6,38],[16.1,39],[15.6,40.1],[14.3,40.6],[12.5,41.6],[11,42.5],[10.2,43.9],[8.8,44.4],[7.5,43.8],[6,43.1],[4,43.5],[3.1,43.1],[3.2,41.9],[0.8,41],[0,39.5],[-0.3,38.4],[-0.8,37.6],[-2.1,36.7],[-4.4,36.7],[-5.6,36],[-6.3,36.8],[-7.4,37.2],[-8.9,37]]},{id:'af',ll:[[-17.5,14.7],[-17,21],[-16,24],[-13,27.5],[-9.8,30],[-9.2,32.5],[-6.8,34],[-5.9,35.8],[-2,35.1],[1,36.5],[5,36.8],[9.8,37.3],[11,36.9],[10.2,35.2],[11.1,33.3],[15.2,32.3],[19,30.3],[20.1,32],[23,32.6],[25,31.7],[29,30.9],[32.2,31.3],[32.6,30],[33.5,28],[35.5,24],[37.2,21],[38.5,18],[39.6,15.5],[41.6,13.5],[43.3,12.4],[44,10.4],[47,11.1],[51.2,11.8],[51,10.4],[49.5,7],[47.8,4.5],[45,1.6],[42,-1],[40.2,-2.8],[39.3,-4.8],[38.8,-6.5],[39.6,-10],[40.5,-11],[40.6,-14.6],[37,-17.5],[35.4,-22],[35.5,-24],[32.9,-25.9],[32.5,-28.6],[31,-29.9],[28,-32.7],[25.6,-33.9],[22.5,-34],[20,-34.8],[18.4,-34],[17.9,-32.5],[16.5,-28.6],[15.2,-27],[14.4,-23],[12.8,-19],[11.8,-16.8],[12.2,-14.5],[13.6,-12.2],[13.2,-8.8],[12.3,-6],[11.8,-3.5],[9.5,-1],[9.4,1],[9.8,3.2],[8.9,4.5],[6,4.3],[4.3,6.3],[1.6,6.2],[-2,4.8],[-4.6,5.2],[-7.5,4.4],[-9.4,5.4],[-11.5,6.9],[-13.2,8.7],[-15,10.9],[-16.7,12.4]]},{id:'uk',ll:[[-5.7,50.1],[-3,50.6],[1.4,51.2],[1.7,52.7],[0.3,53.4],[-0.2,54.3],[-1.6,55.6],[-2,56.4],[-1.8,57.6],[-3.4,58.6],[-5,58.6],[-6.2,57.5],[-5.6,56.3],[-5,55],[-3.2,54.9],[-3.4,54],[-3,53.4],[-4.6,53.3],[-4.2,52.2],[-5.2,51.7],[-3.2,51.4],[-4.6,51]]},{id:'ie',ll:[[-6,52.2],[-6.2,53.5],[-5.6,54.6],[-6.4,55.2],[-7.4,55.4],[-8.5,54.5],[-10,54.2],[-9.6,53.2],[-10.2,51.9],[-9.6,51.5],[-8.2,51.8]]},{id:'is',ll:[[-22.5,63.9],[-24,65.5],[-22,66.4],[-16,66.5],[-14.5,65.3],[-14.6,64.4],[-18,63.4]]},{id:'jp',ll:[[129.6,33.3],[130.2,31.3],[131.4,31.5],[132,33],[133.5,33.4],[135.2,33.6],[136.8,34.3],[138.8,34.6],[140,35],[140.8,35.7],[141,38.2],[141.9,39.5],[141.4,41.4],[140,41.4],[139.9,40.3],[139.8,38.5],[138.8,37.8],[137.3,36.9],[136,36],[135.4,35.6],[133,35.5],[131.5,34.6],[130.9,34]]},{id:'oc',ll:[[113.5,-22],[114,-26.5],[115,-30],[115.7,-33.6],[115,-34.3],[117.9,-35.1],[123.5,-33.9],[126,-32.3],[131,-31.5],[134,-32.8],[135.6,-34.8],[137.6,-35.6],[138.5,-34.6],[139.6,-36.9],[141.5,-38.4],[144.9,-37.9],[146.4,-39.1],[150,-37.5],[150.8,-34.5],[152.5,-32.4],[153.6,-28.5],[153,-25],[150.8,-22.5],[149,-20.6],[146.3,-18.9],[145.4,-16],[145.3,-14.9],[143.5,-12.3],[142.5,-10.7],[141.6,-12.8],[141.6,-16],[140.6,-17.6],[139.3,-17.4],[137,-15.9],[135.8,-15],[136.8,-12.2],[135,-12],[132.6,-11.5],[131,-12.2],[129.5,-14.9],[128,-15.4],[126.5,-13.9],[124.5,-16.5],[122.2,-18.2],[121,-19.7],[118.5,-20.3],[116.7,-20.6],[114.6,-21.8]]},{id:'nz',ll:[[172.7,-34.4],[174.5,-36],[175.9,-37.5],[178.5,-37.7],[177.9,-39.2],[176.9,-39.6],[175.2,-41.6],[174.6,-41.2],[174.9,-39.9],[173.8,-39.3],[174.6,-38.1],[174.5,-37.3],[173.1,-35.3]]},{id:'idn',ll:[[105.2,-6.8],[106.8,-6.1],[108.5,-6.4],[110.5,-6.9],[112.6,-6.9],[114.6,-7.7],[114.4,-8.7],[111,-8.3],[108,-7.8],[105.5,-7]]},{id:'ph',ll:[[120.6,18.5],[122.2,18.5],[122,16.5],[121.6,14.2],[124,13.8],[124,12.5],[123.3,13],[121,13.6],[120.6,14.5],[119.8,16.2]]}]; // South America is drawn as part of 'am' but counts as its own landmass: nothing crosses the Darién Gap. LANDS_LL.push({id:'lk',ll:[[79.9, 9.8], [80.6, 9.6], [81.4, 8.5], [81.9, 7.4], [81.6, 6.4], [80.6, 5.9], [80.0, 6.2], [79.75, 7.2], [79.75, 8.3]]},{id:'sa',hide:true,ll:[[-77.5, 8.6], [-75, 10.8], [-71.5, 12.3], [-68, 10.6], [-62, 10.5], [-60, 8], [-57, 6], [-52, 5], [-50, 1.5], [-48, -1], [-44, -2.5], [-39, -3.5], [-35, -5.5], [-35, -9], [-37.5, -12.5], [-39, -15], [-39.7, -19], [-41, -22], [-44, -23], [-48, -26], [-48.6, -28.5], [-51, -31], [-53, -34], [-58, -34.5], [-57, -37], [-62, -39], [-65, -41], [-64, -43], [-67.5, -46], [-66, -48], [-69, -51], [-68.5, -53], [-70, -55], [-73, -53], [-75, -48], [-73.5, -43], [-73.5, -37], [-71.5, -32], [-71.3, -27], [-70.5, -20], [-71.5, -17], [-76, -14], [-78, -10], [-81, -6], [-80.5, -3], [-80, 0], [-79, 1.5], [-77.5, 4], [-77.4, 7.5]]},{id:'tw',ll:[[121.5, 25.35], [122.05, 25.0], [121.85, 24.3], [121.4, 23.0], [120.85, 21.9], [120.6, 22.3], [120.15, 22.9], [120.1, 23.6], [120.55, 24.5], [121.0, 25.1]]}); const LANDS=LANDS_LL.map(l=>({id:l.id,hide:!!l.hide,pts:l.ll.map(q=>proj(q[0],q[1]))})); const DECOR=[[[-73,78],[-60,81.5],[-35,82.5],[-20,81.5],[-18,77],[-20,72],[-23,70],[-30,68],[-38,65.5],[-43,60],[-48,61],[-52,64.5],[-54,68],[-55,71],[-60,76],[-68,77]],[[-80,73.5],[-72,71.5],[-67,69.5],[-62,66.5],[-64,63],[-71,62.5],[-78,64],[-83,66],[-88,70],[-85,73]],[[-110,76],[-95,77],[-80,79],[-70,82],[-90,82.3],[-105,79]],[[-118,73],[-105,72],[-100,69.5],[-110,68.8],[-118,70]],[[140,41.5],[141.6,42.4],[143.3,42],[145.6,43.3],[144.5,44],[141.9,45.5],[141.4,43.4],[140,42.6]],[[120.1,23],[121,25.2],[121.9,25],[121.5,22.5],[120.8,21.9]],[[122,11],[125.5,11.5],[126.5,9.5],[126.2,6.5],[124,6.5],[122,7]],[[95.3,5.6],[98,4],[100.3,2],[103.8,-1],[106,-3],[106,-5.9],[104.5,-5.9],[102.3,-4],[100.3,-1],[97.5,2.4],[95.2,4]],[[109.6,2],[111,1.6],[113,3.2],[115.5,5.2],[117.2,6.9],[119,5],[118,2],[117.5,0.6],[116.2,-2.5],[116,-4],[114.5,-3.4],[111.7,-3],[110,-1.6],[109,0.5]],[[119,-5.5],[120.5,-1],[121.5,1],[125,1.5],[123,-1],[121.5,-4.5]],[[131,-1.2],[134,-0.8],[138,-1.6],[141,-2.6],[145,-4.3],[147.5,-6],[147.5,-8],[146,-8],[143.4,-9.1],[141,-9.1],[139,-8],[138,-8.5],[137.7,-5.6],[134,-4],[132,-2.8]],[[172.6,-40.5],[174.3,-41.7],[173,-43.5],[171.2,-44.5],[170.6,-45.9],[169.2,-46.6],[166.5,-46],[167,-45],[168.4,-44],[170.8,-42.6],[171.5,-41.7]],[[144.6,-40.7],[148.3,-40.9],[148,-43.2],[146,-43.5]],[[49.3,-12],[50.5,-15.5],[49.5,-17.5],[47.1,-24.9],[45,-25.5],[43.8,-23.6],[43.3,-21],[44.4,-16.2],[46.5,-15.7],[48,-13.5]],[[79.8,9.8],[81.9,7.5],[81.2,6.2],[80,6],[79.7,8.2]],[[-85,21.9],[-82,23.2],[-77.5,22.3],[-74.2,20.2],[-77.7,19.9],[-80.5,21.8]],[[-74.5,18.5],[-72,19.9],[-68.4,18.6],[-70,18.2]],[[12.4,38.1],[15.6,38.3],[15.1,36.7]],[[8.2,41],[9.8,41.1],[9.6,39.1],[8.4,39]],[[11,78],[17,80],[27,80],[20,77]],[[52,71],[56,74],[64,76.5],[68,77],[58,74],[54,71]],[[142,46],[143.5,49],[143,54],[142,53],[141.8,48]],[[108.7,19],[111,19.7],[110,18.2]]].map(poly=>poly.map(q=>proj(q[0],q[1]))); -const CITY_LL={"kyv":[30.52,50.45],"mel":[144.96, -37.81],"bne":[153.03, -27.47],"drw":[131.05,-12.46],"osa":[135.5, 34.69],"kul":[101.69, 3.14],"bkk":[100.5, 13.76],"sgn":[106.66, 10.76],"khi":[67.14,25.0],"dac":[90.41, 23.81],"cbo":[80.0, 6.95],"waw":[21.01, 52.23],"prg":[14.42, 50.08],"vie":[16.37, 48.21],"bud":[19.04, 47.5],"buh":[26.1, 44.43],"tll":[24.45,58.9],"ist":[28.98, 41.01],"for":[-38.54, -3.73],"rio":[-43.11,-22.57],"bue":[-58.38, -34.6],"scl":[-70.67, -33.45],"lim":[-76.85,-12.05],"bog":[-74.07, 4.71],"pan":[-79.52, 8.98],"del":[77.21, 28.61],"maa":[80.18,13.25],"blr":[77.59, 12.97],"hyd":[78.49, 17.39],"tpe":[121.56, 25.03],"auh":[54.37, 24.45],"fuj":[56.15,25.07],"cpt":[18.42, -33.92],"stg":[9.18,48.78],"ber":[13.4,52.52],"zrh":[8.54,47.37],"nbo":[36.82,-1.29],"cai":[31.24,30.04],"sea":[-122.33,47.61],"sjc":[-121.89,37.34],"lax":[-118.24,34.05],"dal":[-96.8,32.78],"chi":[-87.63,41.88],"ash":[-77.49,39.04],"nyc":[-74.0,40.71],"mia":[-80.19,25.76],"tor":[-79.38,43.65],"mtl":[-73.57,45.5],"mex":[-99.13,19.43],"sao":[-46.63,-23.55],"lon":[-0.13,51.51],"dub":[-6.26,53.35],"rek":[-21.94,64.15],"ams":[4.9,52.37],"fra":[8.68,50.11],"par":[2.35,48.86],"mrs":[5.37,43.3],"mad":[-3.7,40.42],"sto":[18.07,59.33],"osl":[10.75,59.91],"cph":[12.57,55.68],"hel":[24.94,60.17],"beg":[20.46,44.79],"sof":[23.32,42.7],"mos":[37.62,55.76],"lag":[3.38,6.52],"jnb":[28.05,-26.2],"dxb":[55.27,25.2],"bom":[72.88,19.08],"sin":[103.82,1.35],"jkt":[106.85,-6.2],"mnl":[120.98,14.6],"hkg":[114.17,22.32],"sha":[121.47,31.23],"pek":[116.4,39.9],"icn":[126.98,37.57],"tok":[139.69,35.69],"syd":[151.21,-33.87],"per":[115.86,-31.95],"akl":[174.76,-36.85]}; +const CITY_LL={"jed":[39.25,21.55],"ruh":[46.72,24.71],"doh":[51.45,25.28],"kyv":[30.52,50.45],"mel":[144.96, -37.81],"bne":[153.03, -27.47],"drw":[131.05,-12.46],"osa":[135.5, 34.69],"kul":[101.69, 3.14],"bkk":[100.5, 13.76],"sgn":[106.66, 10.76],"khi":[67.14,25.0],"dac":[90.41, 23.81],"cbo":[80.0, 6.95],"waw":[21.01, 52.23],"prg":[14.42, 50.08],"vie":[16.37, 48.21],"bud":[19.04, 47.5],"buh":[26.1, 44.43],"tll":[24.45,58.9],"ist":[28.98, 41.01],"for":[-38.54, -3.73],"rio":[-43.11,-22.57],"bue":[-58.38, -34.6],"scl":[-70.67, -33.45],"lim":[-76.85,-12.05],"bog":[-74.07, 4.71],"pan":[-79.52, 8.98],"del":[77.21, 28.61],"maa":[80.18,13.25],"blr":[77.59, 12.97],"hyd":[78.49, 17.39],"tpe":[121.56, 25.03],"auh":[54.37, 24.45],"fuj":[56.15,25.07],"cpt":[18.42, -33.92],"stg":[9.18,48.78],"ber":[13.4,52.52],"zrh":[8.54,47.37],"nbo":[36.82,-1.29],"cai":[31.24,30.04],"sea":[-122.33,47.61],"sjc":[-121.89,37.34],"lax":[-118.24,34.05],"dal":[-96.8,32.78],"chi":[-87.63,41.88],"ash":[-77.49,39.04],"nyc":[-74.0,40.71],"mia":[-80.19,25.76],"tor":[-79.38,43.65],"mtl":[-73.57,45.5],"mex":[-99.13,19.43],"sao":[-46.63,-23.55],"lon":[-0.13,51.51],"dub":[-6.26,53.35],"rek":[-21.94,64.15],"ams":[4.9,52.37],"fra":[8.68,50.11],"par":[2.35,48.86],"mrs":[5.37,43.3],"mad":[-3.7,40.42],"sto":[18.07,59.33],"osl":[10.75,59.91],"cph":[12.57,55.68],"hel":[24.94,60.17],"beg":[20.46,44.79],"sof":[23.32,42.7],"mos":[37.62,55.76],"lag":[3.38,6.52],"jnb":[28.05,-26.2],"dxb":[55.27,25.2],"bom":[72.88,19.08],"sin":[103.82,1.35],"jkt":[106.85,-6.2],"mnl":[120.98,14.6],"hkg":[114.17,22.32],"sha":[121.47,31.23],"pek":[116.4,39.9],"icn":[126.98,37.57],"tok":[139.69,35.69],"syd":[151.21,-33.87],"per":[115.86,-31.95],"akl":[174.76,-36.85]}; const CITIES=[ {id:'sea',name:'Seattle',x:205,y:245,land:'am',reg:'AM',P:300,ix:'Sea-IX',dc:'Westin-ish Carrier Hotel'}, {id:'sjc',name:'San Jose',x:240,y:345,land:'am',reg:'AM',P:500,ix:'Silly-Con Valley IX',dc:'Equinox SV-ish'}, @@ -616,9 +633,12 @@ const CITIES=[ {id:'tll',name:'Tallinn',x:0,y:0,land:'eu',reg:'EU',P:80,ix:'E-Stonia-IX',dc:'Medieval Wall DC',note:'Digital everything, e-residency for anyone, and Baltic cables that ships keep dragging their anchors over.'}, {id:'ist',name:'Istanbul',x:0,y:0,land:'eu',reg:'EU',P:900,ix:'Baklava-IX',dc:'Bosphorus Bridge DC',note:'One foot in Europe, one in Asia. Every land route between them crosses here.'}, {id:'kyv',name:'Kyiv',x:0,y:0,land:'eu',reg:'EU',P:500,blackout:true,ix:'Varenyky-IX',dc:'Generator-backed Bunker DC',note:'Ukrainian network engineers kept the internet running through blackouts and much worse. Generators, spare fiber and redundant everything are standard here, and the peering scene is famously tough.'}, + {id:'jed',name:'Jeddah',x:0,y:0,land:'eu',reg:'AS',P:300,saudi:true,gcc:true,ix:'',dc:'Red Sea Landing Palace',note:'Saudi Arabia’s Red Sea cable hub. More and more of the cables between Europe, Africa and Asia stop here instead of in Egypt.'}, + {id:'ruh',name:'Riyadh',x:0,y:0,land:'eu',reg:'AS',P:600,saudi:true,gcc:true,ix:'Kabsa-IX',dc:'Desert Megaproject DC',note:'The capital, building AI campuses at gigawatt scale. Data about Saudi users has to stay in the Kingdom, and every POP needs a local telecom licence.'}, + {id:'doh',name:'Doha',x:0,y:0,land:'eu',reg:'AS',P:150,arpu:1.5,qa:true,ix:'Pearl-IX',dc:'Air-cooled Stadium DC',note:'Small, rich and very well connected, as long as the neighbours are on speaking terms. Its only land border is with Saudi Arabia.'}, ]; // Display-only nudges for cities that sit on top of each other at map scale; distances still use real lon/lat. -const CITY_NUDGE={stg:[30,6],fra:[-8,-8],auh:[-30,3],fuj:[8,30],dxb:[6,-8],rio:[14,-16],tll:[-4,22],osa:[-10,6],khi:[-2,-6]}; +const CITY_NUDGE={stg:[30,6],fra:[-8,-8],auh:[-5,6],dxb:[9,-7],fuj:[8,15],rio:[14,-16],tll:[-4,22],osa:[-10,6],khi:[-2,-6]}; for(const c of CITIES){const q=CITY_LL[c.id];if(q){c.lon=q[0];c.lat=q[1];const pt=proj(q[0],q[1]),n=CITY_NUDGE[c.id]||[0,0];c.x=pt[0]+n[0];c.y=pt[1]+n[1];}} const CITY=Object.fromEntries(CITIES.map(c=>[c.id,c])); const CABLES=[ @@ -656,11 +676,11 @@ const CABLES=[ {"id":"aec","name":"AEConnect-the-Dots","price":0.85,"age":"new","blurb":"New York to Ireland: the tech-tax express.","pairs":[["nyc","dub",[[-70,41],[-50,47],[-25,52],[-11,52.8]]]]}, {"id":"havf","name":"Havfun","price":0.8,"age":"new","blurb":"Danish for “sea fun”. Probably.","pairs":[["nyc","cph",[[-70,41.5],[-50,49],[-25,55],[-10,58],[0,58],[7,57.5],[10,57.6]]],["dub","cph",[[-10,54.5],[-8,57],[-2,59],[6,58],[10,57.6]]]]}, {"id":"celtix","name":"Celtix Connected","price":0.7,"age":"mid","blurb":"Dublin to London across the Irish Sea.","pairs":[["dub","lon",[[-5,53.4]]]]}, - {"id":"falcon","name":"Falcon Punch","price":0.9,"age":"mid","blurb":"Dubai to Mumbai. Hits hard.","pairs":[["fuj","bom",[[58,24.8],[63,22.3],[70,19.2]]],["dxb","bom",[[57,25.5],[60,23],[66,21],[71,19]]]]}, + {"id":"falcon","name":"Falcon Punch","price":0.9,"age":"mid","blurb":"Dubai to Mumbai. Hits hard.","pairs":[["cai","dxb",[[32.6,29.9],[34.4,27.2],[37.5,22.5],[41.5,15.5],[43.4,12.4],[48,12.6],[55,15.8],[59.4,21.8],[57,25.5]]],["fuj","bom",[[58,24.8],[63,22.3],[70,19.2]]],["dxb","bom",[[57,25.5],[60,23],[66,21],[71,19]]]]}, {"id":"eig","name":"Eye-Gee","price":1.0,"age":"mid","blurb":"Europe-India Gateway-ish, through the Red Sea.","pairs":[["dxb","mrs",[[57,25],[59,22],[55,16],[48,12.8],[43.2,11.92],[40.2,14.62],[37.2,20.62],[34.2,25.62],[32.2,29.12],[31.599999999999998,30.82],[29.2,31.62],[19.2,33.620000000000005],[11.2,37.120000000000005],[5.2,42.02]]]]}, {"id":"clion","name":"C-Lion King","price":1.0,"age":"new","blurb":"Helsinki to Germany under the Baltic. Anchors keep finding it.","pairs":[["hel","fra",[[24,59.8],[20,57.5],[15,55.2],[12.2,54.3]]]]}, - {"id":"uly","name":"Ulysses-ish","price":0.8,"age":"old","blurb":"Short hop across the North Sea. An odyssey it is not.","pairs":[["lon","ams",[[2,51.8]]]]}, - {"id":"chn","name":"Channel Hopper","price":0.7,"age":"mid","blurb":"London to Paris under the Channel. Cheaper than the train.","pairs":[["lon","par",[[1,50.5]]]]}, + {"id":"uly","df":true,"name":"Ulysses-ish","price":0.8,"age":"old","blurb":"Short hop across the North Sea. An odyssey it is not.","pairs":[["lon","ams",[[2,51.8]]]]}, + {"id":"chn","df":true,"name":"Channel Hopper","price":0.7,"age":"mid","blurb":"London to Paris under the Channel. Cheaper than the train.","pairs":[["lon","par",[[1,50.5]]]]}, {"id":"medn","name":"Med-Nauti-lust","price":0.9,"age":"mid","blurb":"Across the Mediterranean, Egypt to France. Romantic, in a cable way.","pairs":[["ist","mrs",[[26.5,40],[25,37],[20,35.5],[12,38],[6.5,42.6]]],["cai","mrs",[[29.9,31.4],[28,32.5],[20,34.5],[12,38],[6.5,42.6]]]]}, {"id":"eassy","name":"EASSy Peasy","price":0.95,"age":"mid","blurb":"East Africa up to Europe via the Red Sea. Lemon squeezy.","pairs":[["nbo","mrs",[[39.7,-4],[42,-1],[45,2],[51,10.5],[45,12.3],[43.4,12.0],[40.4,14.7],[37.4,20.700000000000003],[34.4,25.700000000000003],[32.4,29.200000000000003],[31.799999999999997,30.900000000000002],[29.4,31.700000000000003],[19.4,33.7],[11.4,37.2],[5.4,42.1]]]]}, {"id":"teams","name":"TEAMS-work","price":0.9,"age":"mid","blurb":"Kenya to the Gulf. Makes the dream work.","pairs":[["nbo","dxb",[[39.7,-4],[44,0],[52,8],[58,18],[59,22.5],[57,25]]]]}, @@ -682,20 +702,27 @@ const CABLES=[ {"id":"jga","name":"JGA-ish (Japan–Guam–Aussie)","price":0.9,"age":"new","blurb":"Brisbane to Tokyo with a beach break in Guam.","pairs":[["bne","tok",[[155,-25],[156,-5],[146,13],[141,30]]]]}, {"id":"smw4","name":"SEE-ME-WAVE 4-ish","price":1.2,"age":"old","blurb":"The previous generation. Still carries most of Pakistan, Sri Lanka and Bangladesh, held together with hope.","pairs":[["khi","mrs",[[65,23.5],[60,22],[55,15.5],[48,12.6],[43.2,11.8],[40.2,14.5],[37.2,20.5],[34.2,25.5],[32.2,29],[31.6,30.7],[29.2,31.5],[19.2,33.5],[11.2,37],[5.2,42]]],["khi","bom",[[67,23],[70,20.5]]],["bom","cbo",[[72,15],[75,8],[78.5,6.3]]],["cbo","maa",[[80.6,8.6],[81,11.5]]],["maa","dac",[[82,14],[87,17.5],[91.5,21.2]]],["dac","sin",[[92,21],[93,17],[95,10],[97,6.4],[100,3.6],[102.6,2.1],[103.7,1.3]]]]}, {"id":"balt","name":"Baltic Anchor Magnet","price":0.8,"age":"mid","blurb":"Short hops under the Baltic Sea. Every passing ship seems to find it.","pairs":[["tll","hel",[[24.8,59.8]]],["tll","sto",[[22,59.3],[19.5,59.3]]]]}, - {"id":"bsea","name":"Black Sea-ish Cable","price":1.0,"age":"mid","blurb":"Istanbul to Bucharest's coast across the Black Sea.","pairs":[["ist","buh",[[29.5,42],[29.5,43.5],[28.8,44.2]]]]} + {"id":"bsea","name":"Black Sea-ish Cable","price":1.0,"age":"mid","blurb":"Istanbul to Bucharest's coast across the Black Sea.","pairs":[["ist","buh",[[29.5,42],[29.5,43.5],[28.8,44.2]]]]}, + {"id":"concerto","name":"Concerto-ish","price":0.55,"age":"new","df":true,"blurb":"North Sea workhorse from London to Amsterdam. Dark fiber pairs for sale by the dozen.","pairs":[["lon","ams",[[1.6,51.72],[3.6,52.02]]]]}, + {"id":"circe","name":"Circe North-ish","price":0.6,"age":"mid","df":true,"blurb":"Another London–Amsterdam route. Everyone has one, so prices are low.","pairs":[["lon","ams",[[1.8,52.18],[3.8,52.58]]]]}, + {"id":"nshuttle","name":"North Sea Shuttle","price":0.5,"age":"new","df":true,"blurb":"Brand new, cheap, and it lands right next to your racks.","pairs":[["lon","ams",[[1.5,51.42],[3.9,51.88]]]]}, + {"id":"imewe","name":"I-ME-WE-Us","price":1.05,"age":"mid","blurb":"India, the Middle East and Western Europe, all on one cable. Lands in Cairo on the way.","pairs":[["cai","fuj",[[32.6,29.9],[34.4,27.2],[37.5,22.5],[41.5,15.5],[43.4,12.4],[48,12.6],[55,15.8],[59.4,21.8],[57.5,24.3]]],["cai","bom",[[32.6,29.9],[34.4,27.2],[37.5,22.5],[41.5,15.5],[43.4,12.4],[48,12.6],[60,15],[68,17.5]]]]}, + {"id":"jedx","name":"Jeddah Express-ish","price":0.95,"age":"new","blurb":"New cables increasingly land in Jeddah instead of Egypt. This one heads for India and Singapore.","pairs":[["jed","bom",[[38.6,22.5],[41.5,15.5],[43.4,12.4],[48,12.6],[60,15],[68,17.5]]],["jed","sin",[[38.6,22.5],[41.5,15.5],[43.4,12.4],[52,11],[70,6],[80,5.2],[92,5.5],[97,6],[100,3.6],[102.6,2.1],[103.7,1.3]]]]}, + {"id":"rsea","name":"Red Sea Shortcut","price":0.9,"age":"mid","blurb":"A quick hop across the Red Sea between Egypt and Saudi Arabia.","pairs":[["cai","jed",[[32.6,29.9],[34.6,27],[37.2,23.6]]]]}, + {"id":"qgulf","name":"Gulf Bridge-ish Spur","price":1.0,"age":"mid","blurb":"Connects Doha to the rest of the Gulf, by sea, which is handy when the land border is closed.","pairs":[["doh","fuj",[[52.5,26.2],[55,26.4],[56.6,26],[56.9,25.3]]],["doh","bom",[[52.5,26.2],[55,26.4],[57,25.5],[60,23],[66,21],[71,19]]]]} ]; const CAB=Object.fromEntries(CABLES.map(c=>[c.id,c])); const CABLE_PAIRS=CABLES.flatMap(c=>c.pairs.map(([a,b,mid])=>{const A=CITY[a],B=CITY[b];const near=(x,ref)=>x+W*Math.round((ref-x)/W); const mp=mid.map(q=>proj(q[0],q[1]));const pts=[[near(A.x,mp[0][0]),A.y]].concat(mp,[[near(B.x,mp[mp.length-1][0]),B.y]]); const ll=[[A.lon,A.lat]].concat(mid,[[B.lon,B.lat]]);let L=0;for(let i=1;iS.day&&[a,b].includes(S.ev.landban.city);if(ban)return [];const bp=S&&S.scn&&S.scn.rules&&S.scn.rules.banPairs;return bp?cablesFor(a,b).filter(c=>!bp.includes(c.cid+':'+c.a+'-'+c.b)&&!bp.includes(c.cid+':'+c.b+'-'+c.a)):cablesFor(a,b);} +function cablesOk(a,b){const ban=S&&S.ev&&S.ev.landban&&S.ev.landban.until>S.day&&[a,b].includes(S.ev.landban.city);if(ban)return [];const rl=S&&S.scn&&S.scn.rules,bp=rl&&rl.banPairs,bc=rl&&rl.banCities;return bp||bc?cablesFor(a,b).filter(c=>!(bp&&(bp.includes(c.cid+':'+c.a+'-'+c.b)||bp.includes(c.cid+':'+c.b+'-'+c.a)))&&!(bc&&(bc.includes(c.a)||bc.includes(c.b)))):cablesFor(a,b);} function cablesFor(a,b){return CABLE_PAIRS.filter(c=>(c.a===a&&c.b===b)||(c.a===b&&c.b===a));} function cablePair(cid,a,b){const c=CABLE_PAIRS.find(x=>x.cid===cid&&((x.a===a&&x.b===b)||(x.a===b&&x.b===a)));if(!c)return null;return c.a===a?c:{...c,pts:c.pts.slice().reverse()};} const ALLC=CITIES.filter(c=>!c.cn&&!c.ru&&!c.ixOnly).map(c=>c.id); const ruCity=c=>!!CITY[c].ru; const cnCity=c=>!!CITY[c].cn; -const BIGC=['kyv','mel','bne','osa','kul','bkk','sgn','khi','dac','waw','prg','vie','bud','buh','ist','rio','bue','scl','bog','lim','del','maa','blr','hyd','tpe','cpt','auh','ber','zrh','nbo','cai','jkt','mnl','per','akl','dub','lax','tor','mex','dxb','cph','icn','sjc','dal','chi','ash','nyc','mia','sao','lon','ams','fra','par','mrs','mad','sto','bom','sin','hkg','tok','syd','jnb','lag']; +const BIGC=['ruh','jed','doh','kyv','mel','bne','osa','kul','bkk','sgn','khi','dac','waw','prg','vie','bud','buh','ist','rio','bue','scl','bog','lim','del','maa','blr','hyd','tpe','cpt','auh','ber','zrh','nbo','cai','jkt','mnl','per','akl','dub','lax','tor','mex','dxb','cph','icn','sjc','dal','chi','ash','nyc','mia','sao','lon','ams','fra','par','mrs','mad','sto','bom','sin','hkg','tok','syd','jnb','lag']; const MIDC=['mel','osa','kul','bkk','waw','vie','ist','rio','bue','scl','bog','del','maa','blr','tpe','auh','ber','zrh','jkt','mnl','dub','lax','tor','dxb','icn','sjc','ash','nyc','chi','dal','mia','lon','ams','fra','par','mad','sin','hkg','tok','syd','bom','sao']; /* ================= NETWORKS ================= */ @@ -704,11 +731,11 @@ const NETS=[ {id:'ntt',name:'Not That Telecom',asn:2941,type:'t1',pol:'restrictive',share:.06,price:8,col:'#4B3FC4',pops:['jkt','mnl','per','lax','dxb','icn','sea','sjc','dal','ash','nyc','lon','ams','fra','sin','hkg','tok','syd','tpe','del','maa','blr','hyd','osa','kul','bkk','sgn'],ix:[],blurb:'Huge in Asia. "Which telecom?" "Not that one."'}, {id:'tly',name:'Tell-Ya Carrier',asn:1229,type:'t1',pol:'restrictive',share:.05,price:8,col:'#9D4EDD',pops:['ber','osl','cph','hel','beg','sof','chi','ash','nyc','mia','lon','ams','fra','par','sto','mad','mrs','hkg','sin','tpe','tll','waw','vie','bud','buh','prg','kyv'],ix:[],blurb:'Nordic backbone that tells you exactly where your packets went.'}, {id:'cog',name:'Cogentle',asn:714,type:'t1',pol:'restrictive',share:.04,price:3,col:'#B35CF0',pops:['ber','zrh','dub','hel','sof','beg','tor','lax','mex','cph','icn','sea','sjc','dal','chi','ash','nyc','mia','sao','lon','ams','fra','par','mad','mrs','sto','sin','hkg','tok','rio','bue','scl','bog','lim','osa','waw','prg','vie','bud','buh','ist','kyv'],ix:[],blurb:'Cheapest transit on the map. Famously gentle, except during peering spats.'}, - {id:'tat',name:'Ta-Ta Comms',asn:6543,type:'t1',pol:'restrictive',share:.04,price:9,col:'#6A4C93',pops:['nbo','cai','jkt','dxb','nyc','ash','lon','fra','mrs','lag','jnb','bom','sin','hkg','tok','del','maa','blr','hyd','cpt','fuj','auh','tpe','khi','dac','cbo','kul','bkk'],ix:[],blurb:'Waves goodbye to latency across the Indian Ocean.'}, - {id:'drz',name:'Drizzle Electric',asn:9369,type:'t2',pol:'open',share:.04,price:4,col:'#1E90FF',pops:['ber','zrh','nbo','akl','per','jkt','mnl','dub','rek','tor','mtl','lax','mex','sof','osl','icn','sea','sjc','dal','chi','ash','nyc','mia','lon','ams','fra','par','sto','mad','hkg','sin','tok','syd','jnb','for','rio','bue','scl','lim','bog','pan','del','maa','blr','hyd','tpe','auh','cpt','mel','bne','osa','kul','bkk','sgn','khi','dac','cbo','waw','prg','vie','bud','buh','tll','ist','kyv'],ix:'ALL',blurb:'Will peer with anyone, anywhere. Rumored to mail out IPv6 cakes.'}, + {id:'tat',name:'Ta-Ta Comms',asn:6543,type:'t1',pol:'restrictive',share:.04,price:9,col:'#6A4C93',pops:['nbo','cai','jkt','dxb','nyc','ash','lon','fra','mrs','lag','jnb','bom','sin','hkg','tok','del','maa','blr','hyd','cpt','fuj','auh','tpe','khi','dac','cbo','kul','bkk','jed','ruh','doh'],ix:[],blurb:'Waves goodbye to latency across the Indian Ocean.'}, + {id:'drz',name:'Drizzle Electric',asn:9369,type:'t2',pol:'open',share:.04,price:4,col:'#1E90FF',pops:['ber','zrh','nbo','akl','per','jkt','mnl','dub','rek','tor','mtl','lax','mex','sof','osl','icn','sea','sjc','dal','chi','ash','nyc','mia','lon','ams','fra','par','sto','mad','hkg','sin','tok','syd','jnb','for','rio','bue','scl','lim','bog','pan','del','maa','blr','hyd','tpe','auh','cpt','mel','bne','osa','kul','bkk','sgn','khi','dac','cbo','waw','prg','vie','bud','buh','tll','ist','kyv','jed','ruh','doh'],ix:'ALL',blurb:'Will peer with anyone, anywhere. Rumored to mail out IPv6 cakes.'}, {id:'tng',name:'Tangerine Telecom',asn:5115,type:'t2',pol:'selective',minIx:15,minPni:40,share:.03,price:6,col:'#FF8C42',pops:['cai','nbo','dxb','par','mrs','mad','lon','ams','lag','jnb','waw','buh'],ix:['par','mrs','mad','lon','ams','lag','jnb','waw'],blurb:'Juicy reach into Europe and Africa.'}, {id:'sgt',name:'SingTell',asn:7474,type:'t2',pol:'selective',minIx:15,minPni:40,share:.03,price:7,col:'#00A6A6',pops:['jkt','mnl','per','akl','icn','sin','hkg','tok','syd','bom','tpe','maa','kul','bkk','sgn','mel'],ix:['sin','hkg','tok','syd','bom','tpe','maa','kul','bkk'],blurb:'Sings your packets across Asia-Pacific.'}, - {id:'vdp',name:'Voda-Phony',asn:1373,type:'t2',pol:'selective',minIx:15,minPni:40,share:.03,price:6,col:'#E63946',pops:['nbo','cai','ber','dub','dxb','lon','fra','ams','mad','mrs','jnb','bom','lag','cpt','del','maa','ist','prg','bud','buh'],ix:['lon','fra','ams','mad','mrs','jnb','bom','lag','cpt','del','maa'],blurb:'Mobile giant. The signal is real, the name is not.'}, + {id:'vdp',name:'Voda-Phony',asn:1373,type:'t2',pol:'selective',minIx:15,minPni:40,share:.03,price:6,col:'#E63946',pops:['nbo','cai','ber','dub','dxb','lon','fra','ams','mad','mrs','jnb','bom','lag','cpt','del','maa','ist','prg','bud','buh','doh'],ix:['lon','fra','ams','mad','mrs','jnb','bom','lag','cpt','del','maa'],blurb:'Mobile giant. The signal is real, the name is not.'}, {id:'ctc',name:'China Telecomet',asn:4314,type:'t2',pol:'restrictive',share:.02,price:22,premium:2.5,cn:true,col:'#0B5CAD',pops:['pek','sha','hkg','sin','tok','lon','fra','nyc','sjc'],ix:[],blurb:'The biggest network in China. Its CN-Too premium route skips the congested border, for a price.'}, {id:'cun',name:'China Unicorn',asn:4837,type:'t2',pol:'restrictive',share:.015,price:16,cn:true,col:'#D7000F',pops:['pek','sha','hkg','fra','sjc','lon'],ix:[],blurb:'Number two in China, with a horn for every backbone.'}, {id:'cmb',name:'China Moble',asn:9880,type:'eye',pol:'paid',paidFee:12000,share:.01,cn:true,col:'#0085CA',pops:['pek','sha','hkg'],ix:[],blurb:'The largest mobile network on Earth. Paid peering only.'}, @@ -732,7 +759,7 @@ NETS.push( {id:'rtc',name:'Rostelecomedy',asn:12389,type:'t2',pol:'selective',minIx:20,minPni:40,share:.01,price:6,col:'#7700FF',pops:['mos','hel','sto','fra','ams'],ix:['mos','fra','ams'],blurb:'The national carrier. Every punchline is pre-approved.'}, {id:'ydx',name:'Yawndex',asn:13238,type:'cdn',pol:'open',share:.008,col:'#FC3F1D',pops:['mos','hel','fra','ams'],ix:['mos','hel','fra','ams'],blurb:'Search, taxis and maps. Slightly sleepy.'}, {id:'vkl',name:'VKontakt-lens',asn:47541,type:'cdn',pol:'open',share:.006,col:'#0077FF',pops:['mos','hel'],ix:['mos','hel'],blurb:'Social network with perfect vision.'}, - {id:'ets',name:'Etis-a-lot',asn:5384,type:'eye',pol:'paid',paidFee:8000,share:.006,col:'#719E19',pops:['dxb','mrs','lon','fra','sin','auh','fuj'],ix:[],blurb:'Charges a lot. Paid peering only, and the name says it all.'}, + {id:'ets',name:'Etis-a-lot',asn:5384,type:'eye',pol:'paid',paidFee:8000,share:.006,col:'#719E19',pops:['dxb','mrs','lon','fra','sin','auh','fuj','doh'],ix:[],blurb:'Charges a lot. Paid peering only, and the name says it all.'}, {id:'tmx',name:'Tel-Mess',asn:8151,type:'eye',pol:'paid',paidFee:7000,share:.008,col:'#00A0DF',pops:['mex','dal','lax','mia'],ix:[],blurb:'Mexico’s giant. Paid peering only, and the pricing is a mess.'}, {id:'bcd',name:'Bell Canad-eh',asn:577,type:'eye',pol:'selective',minIx:10,minPni:30,share:.01,col:'#00549A',pops:['tor','mtl','nyc','chi'],ix:['tor','mtl'],blurb:'Polite, enormous, and sorry about the bill.'}); NETS.push( @@ -762,6 +789,8 @@ NETS.push( {id:'dgi',name:'Digi-tally Cheap',asn:8798,type:'eye',pol:'open',share:.006,col:'#2A5CAA',pops:['buh','bud','mad'],ix:['buh','bud','mad'],blurb:'Gigabit to every flat for the price of a coffee. Peers with anyone.'}, {id:'ups',name:'UPC-You-Later',asn:6380,type:'eye',pol:'selective',minIx:8,minPni:25,share:.006,col:'#D8001B',pops:['waw','prg','vie','bud','zrh','kyv'],ix:['waw','prg','vie','kyv'],blurb:'Cable broadband across Central Europe. See you later, in a support queue.'}); NETS.push({id:'kys',name:'KyivStar-ish',asn:15859,type:'eye',pol:'selective',minIx:5,minPni:20,share:.006,col:'#0055B8',pops:['kyv','waw','fra'],ix:['kyv'],blurb:'Ukraine’s biggest mobile network. Has kept working through things most networks never have to plan for.'}); +NETS.push({id:'stc',name:'Sticky Telecom',asn:39368,type:'t2',pol:'selective',minIx:10,minPni:30,share:.01,price:8,col:'#4F008C',pops:['ruh','jed','dxb','fra','lon','cai'],ix:['ruh'],blurb:'The Kingdom’s incumbent. Once you are in, you stay in.'}, + {id:'ord',name:'Ooh-redoo',asn:8871,type:'eye',pol:'paid',paidFee:5000,share:.004,col:'#ED1C24',pops:['doh','dxb','jkt'],ix:[],blurb:'Qatar’s big operator. Paid peering only, and it sings the price list to you.'}); const NET=Object.fromEntries(NETS.map(n=>[n.id,n])); const NSH={}; {const t=NETS.reduce((a,n)=>a+n.share,0); NETS.forEach(n=>NSH[n.id]=n.share/t);} const CN_W={ctc:.2,cun:.14,cmb:.08,tcs:.22,abc:.14,byd:.08,bdc:.08,akm:.02,msf:.02,amz:.01,drz:.01}; @@ -919,7 +948,7 @@ function isoWeek(dt){const d=new Date(Date.UTC(dt.getFullYear(),dt.getMonth(),dt function pathExists(a,b){if(!S.pops[a]||!S.pops[b])return false;const adj={};for(const l of S.links){if(linkDown(l))continue;(adj[l.a]=adj[l.a]||[]).push(l.b);(adj[l.b]=adj[l.b]||[]).push(l.a);}const seen=new Set([a]),q=[a];while(q.length){const u=q.shift();if(u===b)return true;for(const v of adj[u]||[])if(!seen.has(v)){seen.add(v);q.push(v);}}return false;} const SCN=[ {id:'stg',n:'Only Spätzle-IX',city:'stg',cash:400000,days:730,rules:{noTransit:true},d:'Start in Stuttgart, where nobody sells transit. Reach the internet through peering, PNIs, caches and your own fiber only. No transit anywhere, ever.',goal:'Serve 200 Gbps',ok:()=>R.served>=200}, - {id:'redsea',n:'Red Sea Crisis',city:'mrs',cash:2500000,days:540,rules:{banPairs:['eig:dxb-mrs','gbi:fuj-mrs','smw4:khi-mrs','smw6:mrs-bom','smw6:mrs-sin','peace:mrs-sin','aae:mrs-hkg','twoaf:mrs-bom','medn:cai-mrs','medn:ist-mrs','twoaf:jnb-mrs','eassy:nbo-mrs']},d:'Every cable through the Red Sea is cut, and so is the hop to Egypt. Get Marseille talking to Singapore anyway: round Africa, overland, or the other way round the planet.',goal:'A path from Marseille to Singapore, and 300 Gbps served',ok:()=>pathExists('mrs','sin')&&R.served>=300}, + {id:'redsea',n:'Red Sea Crisis',city:'mrs',cash:2500000,days:540,rules:{banCities:['cai','jed'],banPairs:['eig:dxb-mrs','gbi:fuj-mrs','smw4:khi-mrs','smw6:mrs-bom','smw6:mrs-sin','peace:mrs-sin','aae:mrs-hkg','twoaf:mrs-bom','medn:cai-mrs','medn:ist-mrs','twoaf:jnb-mrs','eassy:nbo-mrs']},d:'Every cable through the Red Sea is cut, and so is the hop to Egypt. Get Marseille talking to Singapore anyway: round Africa, overland, or the other way round the planet.',goal:'A path from Marseille to Singapore, and 300 Gbps served',ok:()=>pathExists('mrs','sin')&&R.served>=300}, {id:'spat',n:'The Cogentle Spat',city:'nyc',cash:700000,days:540,rules:{spat:true},d:'Cogentle and Goggle are not speaking, and this time it is permanent. Buy the cheap transit if you dare.',goal:'99% reach and 150 Gbps served',ok:()=>R.reach>=0.99&&R.served>=150}, {id:'carnaval',n:'Carnaval',city:'rio',cash:600000,days:100,rules:{},setup:()=>{S.biz.push({id:uid(),scripted:true,city:'rio',city2:null,reqs:[],name:'Carnaval-ish Parade in Rio de Janeiro',type:'event',bw:400,rate:0,mood:100,since:0,start:90,dur:5,fee:400*5*70});},d:'Rio from scratch. Carnaval-ish starts in 90 days and wants 400 Gbps for five days straight. The whole world is watching.',goal:'Deliver Carnaval in full',ok:()=>(S.stats.evFull||0)>=1}, {id:'darien',n:'Mind the Gap',city:'pan',cash:900000,days:730,rules:{},d:'Start in Panama City. Nothing crosses the Darién Gap by land, and the Andes are in the way of everything else.',goal:'POPs in Bogotá, Lima, Santiago and São Paulo, and 150 Gbps served',ok:()=>['bog','lim','scl','sao'].every(c=>S.pops[c])&&R.served>=150}, @@ -1049,7 +1078,7 @@ function scenarioModal(){const wk=weekly(),h=scnHof();let best=null;try{best=JSO ${SCN.map(x=>`
${esc(x.n)} ${h[x.id]?`done in ${h[x.id].days} days`:''}
${esc(x.d)}
Goal: ${esc(x.goal)} · Time: ${x.days} days · start in ${esc(CITY[x.city].name)}
${btn('Play','startScn',{id:x.id},'')}
`).join('')}`);} function newGame(name,home){ S={v:1,name,asn:200000+Math.floor(_rand()*15000),home,day:0,cash:START_CASH, - pops:{[home]:{day:0,bb:null,boost:0,down:0,routers:1,gen:false}},links:[],nni:[],transit:[],ixp:{},rs:{},peers:{},pni:[],caches:[],biz:[],offers:[],myIx:{}, + ltv:2,pops:{[home]:{day:0,bb:null,boost:0,down:0,routers:1,gen:false}},links:[],nni:[],transit:[],ixp:{},rs:{},peers:{},pni:[],caches:[],biz:[],offers:[],myIx:{}, done:{},inc:[],ev:{},priceMul:1,nextFail:45,nextEvent:40,usedNames:[],stats:{survived:0,incidents:0,peak:0},cnLic:{state:'none'},scrubAt:null,won:false,lost:false,neg:0,loans:[],loanOffers:[],loanStrikes:0}; } @@ -1072,7 +1101,7 @@ function ixMembers(c){if(S.myIx[c])return S.myIx[c].members.slice();if(!CITY[c]. const LAG_MAX=8; function lagCap(g,n){n=n||1;return g*n*(n>1?0.95:1);} function lagName(tier,n){return (n||1)>1?`${n}×${PORT[tier].n} LAG`:`${PORT[tier].n} port`;} -function ixCap(c){return S.myIx[c]?400:liveCap(PORT[S.ixp[c]].g,c,(S.ixSite||{})[c],(S.ixn||{})[c])*(isRemote(c)?REMOTE_CAP:1);} +function ixCap(c){return S.myIx[c]?myFab(c).g*(S.pops[c]&&(siteDown(c,'a'))?0:1):liveCap(PORT[S.ixp[c]].g,c,(S.ixSite||{})[c],(S.ixn||{})[c])*(isRemote(c)?REMOTE_CAP:1);} function ixSessions(c){ const s=new Set(); if(S.ixp[c]===undefined)return s; for(const id of ixMembers(c)){const n=NET[id]; @@ -1330,7 +1359,7 @@ function compute(){ C.links=S.links.reduce((a,l)=>a+(l.mo||0),0); C.nni=(S.nni||[]).reduce((a,x)=>a+NNI[x.tier].mo,0); C.transit=S.transit.reduce((a,t)=>{const q=p95(t,R2.useT[t.id]||0);R2.p95[t.id]=q;const n=t.n||1;return a+Math.max(q,PORT[t.tier].g*n*0.2)*NET[t.net].price*(t.premium&&t.city==='hkg'?NET[t.net].premium:1)*pm*regionMult(t.city)+PORT[t.tier].tmo*n;},0); - C.ix=Object.keys(S.ixp).reduce((a,c)=>a+(S.myIx[c]?MYIX_MO:ixPortMo(c,S.ixp[c])*((S.ixn||{})[c]||1)+dkAddonMo(c)),0); + C.ix=Object.keys(S.ixp).reduce((a,c)=>a+(S.myIx[c]?myFab(c).mo:ixPortMo(c,S.ixp[c])*((S.ixn||{})[c]||1)+dkAddonMo(c)),0); C.pni=S.pni.reduce((a,p)=>a+PORT[p.tier].pni*(p.n||1)+(NET[p.net].pol==='paid'?NET[p.net].paidFee:0),0); C.caches=S.caches.length*CACHE_MO; C.loans=(S.loans||[]).reduce((a,l)=>a+(BANKS[l.bank].equity?0:l.pay),0); @@ -1345,7 +1374,7 @@ function compute(){ R=R2;UI.hotMap=hotByCity(); } function p95(t,cur){const h=(t.hist||[]).slice(-29).concat([cur]).sort((a,b)=>a-b);return h[Math.max(0,Math.ceil(.95*h.length)-1)];} -function linkDown(l){return l.cut>S.day||(S.ev.runet>S.day&&ruCity(l.a)!==ruCity(l.b))||(l.kind==='vxc'&&!!S.ev.fab&&S.ev.fab[l.prov]>S.day)||(l.kind==='df'&&dfCap(l)<=0);} +function linkDown(l){return l.cut>S.day||(S.ev.runet>S.day&&ruCity(l.a)!==ruCity(l.b))||(S.ev.gulf>S.day&&((CITY[l.a].qa&&(CITY[l.b].gcc||CITY[l.b].uae))||(CITY[l.b].qa&&(CITY[l.a].gcc||CITY[l.a].uae))))||(l.kind==='vxc'&&!!S.ev.fab&&S.ev.fab[l.prov]>S.day)||(l.kind==='df'&&dfCap(l)<=0);} function remoteCities(){return [...new Set(S.links.filter(l=>l.kind==='vxc').flatMap(l=>[l.a,l.b]))].filter(c=>!S.pops[c]);} function nniUsed(c,prov){return S.links.filter(l=>l.kind==='vxc'&&l.prov===prov&&(l.a===c||l.b===c)).reduce((a,l)=>a+VXC[l.vt].g,0);} function nniPort(c,prov){return (S.nni||[]).find(x=>x.city===c&&x.prov===prov);} @@ -1374,7 +1403,7 @@ function sanitize(s){ for(const k of ['rs','ixn','ixPref','ixSite'])for(const c of Object.keys(s[k]))if(!isCity(c))delete s[k][c]; for(const c of Object.keys(s.ixn))s.ixn[c]=lag(s.ixn[c]);for(const c of Object.keys(s.ixSite))if(!['a','b','ab'].includes(s.ixSite[c]))s.ixSite[c]='a'; for(const k of Object.keys(s.peers)){const [n,c]=k.split('@');if(!isNet(n)||!isCity(c))delete s.peers[k];} - for(const c of Object.keys(s.myIx)){const m=s.myIx[c];if(!isCity(c)||!m||typeof m!=='object'){delete s.myIx[c];continue;}m.members=Array.isArray(m.members)?m.members.filter(isNet):[];m.name=String(m.name||'Your IX').slice(0,40);m.next=num(m.next,s.day);} + for(const c of Object.keys(s.myIx)){const m=s.myIx[c];if(!isCity(c)||!m||typeof m!=='object'){delete s.myIx[c];continue;}m.members=Array.isArray(m.members)?m.members.filter(isNet):[];m.name=String(m.name||'Your IX').slice(0,40);m.next=num(m.next,s.day);m.fab=int(m.fab,0,MYIX_FAB.length-1,0);} const okBiz=b=>b&&own(BIZ_T,b.type)&&isCity(b.city)&&(!b.city2||isCity(b.city2))&&(!b.sites||Array.isArray(b.sites)&&b.sites.every(isCity)); const fixBiz=b=>{b.id=sid(b.id);b.name=String(b.name||'Customer').slice(0,80);b.bw=num(b.bw,1);b.rate=num(b.rate,0);if(b.fee!==undefined)b.fee=num(b.fee,0);if(b.start!==undefined)b.start=num(b.start,0);if(b.dur!==undefined)b.dur=num(b.dur,1);if(b.slots!==undefined)b.slots=num(b.slots,0);if(b.what!==undefined)b.what=String(b.what).slice(0,200);if(!Array.isArray(b.reqs))b.reqs=[];b.reqs=b.reqs.filter(r=>own(REQS,r));if(b.mood!==undefined)b.mood=num(b.mood,100);if(b.exp!==undefined)b.exp=num(b.exp,0);if(b.latMax!=null)b.latMax=num(b.latMax,10);if(b.route&&!own(RT,b.route))b.route='normal';return b;}; s.biz=s.biz.filter(okBiz).map(fixBiz);s.offers=s.offers.filter(okBiz).map(fixBiz); @@ -1384,7 +1413,7 @@ function sanitize(s){ if(s.scrubAt&&!isCity(s.scrubAt))s.scrubAt=null; if(s.te){if(typeof s.te!=='object')s.te=null;else{s.te.on=!!s.te.on;s.te.script=typeof s.te.script==='string'?s.te.script.slice(0,4000):'';}} return s;} -function migrate(s){sanitize(s);if(s.dk){s.dk.m=s.dk.m||{};s.dk.add=s.dk.add||{};s.dk.ret=s.dk.ret||{};s.dk.retUsed=s.dk.retUsed||{};}s.hist=s.hist||[];s.loans=s.loans||[];s.loanOffers=s.loanOffers||[];s.loanStrikes=s.loanStrikes||0;for(const l of s.links||[])if(!l.kind)l.kind='wave'; +function migrate(s){sanitize(s);if(s.ltv!==2){for(const l of s.links)if(l.kind==='wave'&&l.tier>=3)l.tier=Math.min(LT.length-1,l.tier+1);s.ltv=2;}if(s.dk){s.dk.m=s.dk.m||{};s.dk.add=s.dk.add||{};s.dk.ret=s.dk.ret||{};s.dk.retUsed=s.dk.retUsed||{};}s.hist=s.hist||[];s.loans=s.loans||[];s.loanOffers=s.loanOffers||[];s.loanStrikes=s.loanStrikes||0;for(const l of s.links||[])if(!l.kind)l.kind='wave'; for(const c in s.pops){const p=s.pops[c];if(p.rgen===undefined){let g=0;const need=(i,key)=>{const k=RG.findIndex(r=>r[key]>=i);if(k>g)g=k;}; for(const l of s.links||[])if((l.a===c||l.b===c)&&l.kind==='wave')need(l.tier,'maxLT'); for(const t of s.transit||[])if(t.city===c)need(t.tier,'maxP');for(const x of s.pni||[])if(x.city===c)need(x.tier,'maxP');if(s.ixp&&s.ixp[c]!==undefined)need(s.ixp[c],'maxP');p.rgen=g;}}for(const b of s.biz||[])if(!b.reqs)b.reqs=BIZ_T[b.type]&&BIZ_T[b.type].div?['diverse']:[];for(const o of s.offers||[])if(!o.reqs)o.reqs=[];if(!s.lvl)s.lvl=1;s.nni=s.nni||[];s.cnLic=s.cnLic||{state:'none'};if(s.scrubAt===undefined)s.scrubAt=null;s.ev=s.ev||{};for(const l of s.links){if(!l.kind)l.kind='wave';if(l.mo===undefined)l.mo=Math.round(waveMo(l.km,l.sub,l.tier)*(l.mult||1));}for(const c in s.pops){if(!s.pops[c].routers)s.pops[c].routers=1;}return s;} @@ -1431,7 +1460,7 @@ function eventTick(b,d){if(!BIZ_T[b.type].event)return false;if(d=0.95)S.stats.evFull=(S.stats.evFull||0)+1;const pay=avg>=0.95?b.fee:avg>=0.7?Math.round(b.fee*avg):-Math.round(b.fee*0.2);S.cash+=pay;S.biz=S.biz.filter(x=>x!==b); toast(pay>=0?`${esc(b.name)} is over: +${fmt$(pay)}
You delivered ${pct(avg)} of what the crowd wanted.${avg>=0.95?' Flawless.':''}`:`${esc(b.name)} was a disaster.
Only ${pct(avg)} delivered, and it trended on social media. Penalty: ${fmt$(-pay)}.`,pay>=0?'good':'bad');sfx(pay>=0?'coin':'err');return true;} /* Where the giants actually build: gigawatt AI campuses and cloud regions, mapped to the nearest city on the map. */ -const MEGA=[{c:'ash',n:'Data Center Alley-ish'},{c:'ash',n:'Prometheus-ish Ohio'},{c:'dal',n:'Star-Gait Abilene'},{c:'dal',n:'Hyperion-ish Louisiana'},{c:'dal',n:'Colossal Ego Memphis'},{c:'chi',n:'Fairwater-ish Wisconsin'},{c:'chi',n:'Project Rainier-ish Indiana'},{c:'chi',n:'Cornfield Cluster Iowa'},{c:'nyc',n:'Neocloud New Jersey'},{c:'sto',n:'Star-Gait Fjord-way'},{c:'mad',n:'Aragón Mega-shed'},{c:'dub',n:'Bring-Your-Own-Power Dublin'},{c:'auh',n:'Star-Gait UAE'},{c:'dxb',n:'Desert Kingdom AI Campus'},{c:'kul',n:'Johor-ish Overflow'},{c:'hyd',n:'Vizag-ish AI Hub'},{c:'icn',n:'Ulsan-ish AI Campus'},{c:'tok',n:'Hokkaido-ish Snow DC'},{c:'syd',n:'Star-Gait Down Under'},{c:'mex',n:'Querétaro-ish Cluster'},{c:'for',n:'Short-Video Ceará Campus'},{c:'scl',n:'Quilicura-ish Region'}]; +const MEGA=[{c:'ash',n:'Data Center Alley-ish'},{c:'ash',n:'Prometheus-ish Ohio'},{c:'dal',n:'Star-Gait Abilene'},{c:'dal',n:'Hyperion-ish Louisiana'},{c:'dal',n:'Colossal Ego Memphis'},{c:'chi',n:'Fairwater-ish Wisconsin'},{c:'chi',n:'Project Rainier-ish Indiana'},{c:'chi',n:'Cornfield Cluster Iowa'},{c:'nyc',n:'Neocloud New Jersey'},{c:'sto',n:'Star-Gait Fjord-way'},{c:'mad',n:'Aragón Mega-shed'},{c:'dub',n:'Bring-Your-Own-Power Dublin'},{c:'auh',n:'Star-Gait UAE'},{c:'ruh',n:'Desert Kingdom AI Campus'},{c:'doh',n:'Lusail-ish Data Oasis'},{c:'kul',n:'Johor-ish Overflow'},{c:'hyd',n:'Vizag-ish AI Hub'},{c:'icn',n:'Ulsan-ish AI Campus'},{c:'tok',n:'Hokkaido-ish Snow DC'},{c:'syd',n:'Star-Gait Down Under'},{c:'mex',n:'Querétaro-ish Cluster'},{c:'for',n:'Short-Video Ceará Campus'},{c:'scl',n:'Quilicura-ish Region'}]; function spawnMega(t,T,nm,mine){ const megaMine=MEGA.filter(m=>mine.includes(m.c));if(!megaMine.length)return; if(t==='ingest'){const m=pick(megaMine),bw=pick(T.opts),dur=3+Math.floor(Math.random()*4),start=S.day+10+Math.floor(Math.random()*12); @@ -1468,11 +1497,25 @@ function landMult(a,b){if(isSub(a,b))return 1;if(uaePair(a,b))return 3;return (C function landWhy(a,b){if(isSub(a,b))return '';if(uaePair(a,b))return 'Inside the UAE only the two licensed operators, Etis-a-lot and do-ish, may run fiber. No dark fiber, no digging your own, and waves cost 3×.'; const r=[];if(CITY[a].reg!==CITY[b].reg)r.push('Overland between continents crosses a dozen borders: 2.5× the price.');if(andesPair(a,b))r.push('This route crosses the Andes: 2× the price, and landslides and snow cut it far more often than flat fiber.');return r.join(' ');} function linkLat(l){const f=l.kind==='df'?(l.own?1.1:1.25):l.kind==='vxc'?1.4:l.cable?(CAB[l.cable].lat||1):1.3;return l.km*f/200;} +/* Wave prices differ a lot by market (TeleGeography): Europe's dense, competitive metro and + long-haul routes are cheap (Frankfurt–London 100G ≈ $1,150/mo), the US costs more, and + routes into Africa are several times dearer (Africa–Europe ≈ 5.9× London–New York). + Each route also gets its own market mood, and new leases get cheaper every year (~8%). */ +const WAVE_LAND={EU:0.65,AM:1,SA:1.6,AS:1.4,OC:1.2,AF:2.2},WAVE_SUB={EU:0.8,AM:1,SA:2,AS:1.5,OC:1.5,AF:4.5}; +const WAVE_NAME={EU:'Europe',AM:'North America',SA:'South America',AS:'Asia',OC:'Oceania',AF:'Africa'}; +function waveMarket(a,b,sub){const ra=CITY[a].reg,rb=CITY[b].reg,T=sub?WAVE_SUB:WAVE_LAND; + const reg=sub?Math.max(T[ra]||1,T[rb]||1):((T[ra]||1)+(T[rb]||1))/2; + const key=a1.03?Math.round((k.mood-1)*100)+'% above':'right at'} the going rate${k.ero<1?`, and prices have fallen ${Math.round((1-k.ero)*100)}% since you started`:''}.`;} function waveRoute(a,b,mult,border){const cabs=cablesOk(a,b),sub=isSub(a,b);let via=UI.via; if(!cabs.find(c=>c.cid===via))via=sub?(cabs[0]?cabs[0].cid:null):(via==='land'||!via?'land':'land'); if(!via)return null;const bf=border?3*(UI.cnPrem&&(a==='hkg'||b==='hkg')?1.6:1):1; - if(via==='land')return {via,cabs,cab:null,km:kmBetween(a,b),sub:false,wm:mult*landMult(a,b)}; - const c=cabs.find(x=>x.cid===via);return {via,cabs,cab:via,km:c.km,sub:true,wm:bf*CAB[via].price};} + if(via==='land')return {via,cabs,cab:null,km:kmBetween(a,b),sub:false,wm:mult*landMult(a,b)*waveMarket(a,b,false).m}; + const c=cabs.find(x=>x.cid===via);return {via,cabs,cab:via,km:c.km,sub:true,wm:bf*CAB[via].price*waveMarket(a,b,true).m};} function viaSeg(a,b){const cabs=cablesOk(a,b),sub=isSub(a,b);if(!cabs.length)return landMult(a,b)>1?`

${landWhy(a,b)}

`:'';const wr=waveRoute(a,b,1,false); const opts=(sub?[]:[{v:'land',l:`Overland ${landMult(a,b)>1?landMult(a,b)+'× · ':''}${(kmBetween(a,b)*1.3/200).toFixed(1)} ms`}]).concat(cabs.map(c=>({v:c.cid,l:`${esc(CAB[c.cid].name)} ${CAB[c.cid].price}× · ${(c.km*(CAB[c.cid].lat||1)/200).toFixed(1)} ms${CAB[c.cid].age==='old'?' · old, cuts often':''}`}))); return `

Route

${opts.map(o=>btn(o.l,'via',{v:o.v},wr&&wr.via===o.v?'pink':'ghost')).join('')}
${wr&&wr.cab?`

${esc(CAB[wr.cab].blurb)} All your waves on one cable share its fate when it is cut.

`:''}`;} @@ -1633,11 +1676,15 @@ function fireEvent(){ const opts=['viral','price','grant']; if(S.day>50)opts.push('sanction','tariff','hijack','landban','shutdown','redsea','baltic'); if(Object.keys(S.pops).some(ruCity))opts.push('runet','runet'); + if(S.pops.doh&&Object.keys(S.pops).some(c=>CITY[c].gcc||CITY[c].uae)&&!(S.ev.gulf>S.day))opts.push('gulf'); + if(Object.keys(S.pops).some(c=>CITY[c].saudi))opts.push('mega'); if(['mnl','hkg','tok','icn','sha','jkt'].some(c=>S.pops[c]))opts.push('typhoon'); if(Object.keys(S.pops).some(cnCity)||R.gfwCross>1)opts.push('golden','gfw'); if(S.transit.some(t=>t.net==='cog'))opts.push('depeer','depeer'); if(Object.keys(S.peers).some(k=>k.startsWith('drz@'))||Object.keys(S.rs).length)opts.push('cake'); const e=pick(opts); + if(e==='gulf'){const dur=60+Math.floor(Math.random()*60);S.ev.gulf=S.day+dur;toast(`The neighbours have fallen out.
A diplomatic spat closes borders and airspace around Qatar. Every link between Doha and Saudi Arabia or the UAE is down for about ${dur} days. Route the long way round, by sea.`,'bad');sfx('alert');} + if(e==='mega'){const c=pick(Object.keys(S.pops).filter(x=>CITY[x].saudi)),bw=pick([800,1600,3200]),start=S.day+15;S.offers.push({id:uid(),city:c,city2:null,name:`A futuristic city that is not built yet, demo day in ${CITY[c].name}`,type:'event',bw,rate:0,reqs:[],start,dur:4,fee:bw*4*90,exp:start-2});toast(`A gigaproject wants a demo.
${fmtG(bw)} for four days in ${CITY[c].name}, to show off a city that is still mostly renderings. Check the Deals tab.`,'goal');} if(e==='sanction'){S.ev.sanction=S.day+60;toast('Sanctions!
The Republic of Paperworkistan sanctioned your router vendor’s favorite screw supplier. Spare parts are slow: router crashes take twice as long to fix for 60 days.','bad');sfx('alert');return;} if(e==='tariff'){S.ev.tariff=S.day+90;toast('Trade war on optics
Two governments slapped tariffs on each other’s lasers. Optics cost 40% more for 90 days.','bad');sfx('alert');return;} if(e==='hijack'){const nh=NETS.map(n=>n.id).filter(()=>Math.random()<0.6),old=S.ev.rpki&&S.ev.rpki.until>S.day?S.ev.rpki:null;S.ev.rpki=old?{until:Math.max(old.until,S.day+1),nets:[...new Set(old.nets.concat(nh))]}:{until:S.day+1,nets:nh};addInc({type:'hijack',ref:'rpki',until:S.day+1,msg:'A state-owned ISP “accidentally” announced your prefixes for 18 minutes. Their apology press release was suspiciously well written. Many networks are still routing your traffic into the void.',cost:1500,fix:'Call everyone you know'});toast('BGP hijack
Someone else is announcing your prefixes. Reach is down until it is cleaned up.','bad');sfx('alert');return;} @@ -1701,7 +1748,7 @@ function dayTick(){ else if(b.mood<30&&!b.warned){b.warned=true;toast(`${esc(b.name)} is furious.
Fix service in ${CITY[b.city].name} or they leave.`,'bad',[{l:'Show me',act:'focusCity',args:{city:b.city}}]);}} if(b.mood>60)b.warned=false;} // own IX members join - for(const c in S.myIx){const m=S.myIx[c];if(d>=m.next&&m.members.length<12){ + for(const c in S.myIx){const m=S.myIx[c];if(d>=m.next&&m.members.lengthn.type!=='t1'&&!m.members.includes(n.id)&&(n.pops.includes(c)||n.pops.some(p=>CITY[p].reg===CITY[c].reg))); if(cands.length){cands.sort((a,b)=>(a.pol==='open'?0:1)-(b.pol==='open'?0:1)||b.share-a.share);const n=Math.random()<.6?cands[0]:pick(cands);m.members.push(n.id);toast(`${esc(n.name)} joined ${esc(m.name)}!
Another member paying ${fmt$(MYIX_FEE)}/mo for a port.`,'good');sfx('coin');} m.next=d+8+Math.floor(Math.random()*10);}} @@ -1852,7 +1899,7 @@ const ACT={ animSet:({v})=>{if(!['auto','on','off'].includes(v))return;UI.anim=v;try{localStorage.setItem('sot-anim',v);}catch(e){}applyAnim();const m=$('modalCard'),r=m&&m.querySelector('.setrow');if(r)r.outerHTML=settingsRow();}, soundSet:({v})=>{UI.muted=v==='off';try{localStorage.setItem('sot-mute',UI.muted?'1':'0');}catch(e){}renderHUD();const m=$('modalCard'),r=m&&m.querySelector('.setrow');if(r)r.outerHTML=settingsRow();}, mute:()=>{UI.muted=!UI.muted;try{localStorage.setItem('sot-mute',UI.muted?'1':'0');}catch(e){}renderHUD();}, - closePanel:()=>{UI.sel=null;UI.confirm=null;renderPanel();}, + closePanel:()=>{UI.sel=null;UI.confirm=null;renderPanel();renderLeft();}, closeModal:()=>closeModal(), tab:({t})=>{UI.tab=t;UI.confirm=null;renderPanel();}, leftTab:({t})=>{UI.left=t;UI.leftOpen=true;renderLeft();}, @@ -1928,6 +1975,7 @@ const ACT={ rmLink:({id})=>{if(UI.confirm!==id){UI.confirm=id;renderPanel();return;}S.links=S.links.filter(l=>l.id!==id);UI.sel=null;UI.confirm=null;after();}, fixInc:({id})=>{const i=S.inc.find(x=>x.id===id);if(!i||!(i.cost>0))return;if(i.slow&&i.rushed)return;if(!spend(i.cost))return; if(i.slow&&i.until>S.day+1){i.rushed=true;i.cost=0;i.until=S.day+1;const p=S.pops[i.ref];if(p)p.down=Math.min(p.down,S.day+1);toast(`Power-cycled.
The router in ${esc(CITY[i.ref].name)} is booting again. It will be up tomorrow, the ${esc(RG[(p&&p.rgen)||0].chip)} willing.`,'good');after();return;}clearInc(i);toast(`Fixed. ${incTitle(i.type)} resolved early.`,'good');after();}, + myIxUp:({city})=>{const m=S.myIx[city];if(!m)return;const f=(m.fab|0)+1,N=MYIX_FAB[f];if(!N)return;if(N.lvl>lvl()){toast(`A ${N.n} fabric unlocks at customer level ${N.lvl}.`,'bad');sfx('err');return;}if(!spend(N.cost))return;m.fab=f;toast(`${esc(m.name)} now runs a ${N.n} fabric.
Room for ${N.max} members. Expect a few more to join.`,'good');m.next=Math.min(m.next,S.day+3);after();}, foundIx:({city})=>{if(!S.pops[city]||S.myIx[city]||CITY[city].ix||CITY[city].cn)return;if(!spend(MYIX_COST))return;const nm=(S.name.split(' ')[0]||'My').replace(/[^A-Za-z0-9]/g,'').slice(0,10)+'-IX '+CITY[city].name; S.myIx[city]={name:nm,members:[],next:S.day+4};S.ixp[city]=2;toast(`You founded ${esc(nm)}!
Networks will join over time and pay you for ports. Open members peer with you for free.`,'goal');after();}, buildLink:({tier})=>{tier=+tier;const p=UI.pending;if(!p)return;const {a,b}=p;const km=kmBetween(a,b),sub=isSub(a,b),sib=pairLinks(a,b).filter(l=>l.kind!=='vxc'),same=sib.length>0&&UI.route==='same',border=cnCity(a)!==cnCity(b),mult=(sib.length&&!same?DIVERSE:1)*(border?3*(UI.cnPrem&&(a==='hkg'||b==='hkg')?1.6:1):1); @@ -1968,12 +2016,12 @@ const ACT={ dfMode:({m})=>{UI.lmode=m;if(UI.pending)openLinkModal(UI.pending.a,UI.pending.b);}, dfSrc:({v})=>{UI.dfSrc=v;if(UI.pending)openLinkModal(UI.pending.a,UI.pending.b);}, dfSys:({v})=>{UI.dfSys=v;if(UI.pending)openLinkModal(UI.pending.a,UI.pending.b);}, - orderDf:()=>{const p=UI.pending;if(!p)return;const {a,b}=p,km=kmBetween(a,b);if(isSub(a,b)||!dfAllowed(a,b))return; - const own=UI.dfSrc==='build'&&lvl()>=3,sys=DF_SYS[UI.dfSys]&&DF_SYS[UI.dfSys].lvl<=lvl()?UI.dfSys:'lite';if(lvl()<2)return; + orderDf:()=>{const p=UI.pending;if(!p)return;const {a,b}=p;if(!dfAllowed(a,b))return;const sc=isSub(a,b)?subDfCable(a,b):null,km=sc?sc.km:kmBetween(a,b); + const own=UI.dfSrc==='build'&&lvl()>=3&&!sc,sys=DF_SYS[UI.dfSys]&&DF_SYS[UI.dfSys].lvl<=lvl()?UI.dfSys:'lite';if(lvl()<2)return; const up=(own?dfBuildCost(km):0)+DF_SYS[sys].cost+ampCount(km)*AMP_COST+(S.pops[b]?0:popCost(b));if(!spend(up))return; if(!S.pops[b])S.pops[b]={day:S.day,bb:null,boost:0,down:0,routers:1,gen:false,rgen:0}; const sib=pairLinks(a,b).filter(l=>l.kind!=='vxc'),id=uid(); - const l={id,a,b,kind:'df',own,sys,ch:[],km,sub:false,mo:own?Math.round(km*0.15):dfLeaseMo(km),trench:id,cut:0,day:S.day,ready:S.day+(own?dfBuildDays(km):30),spares:false}; + const l={id,a,b,kind:'df',own,sys,ch:[],km,sub:!!sc,cable:sc?sc.cid:null,mo:own?Math.round(km*0.15):dfLeaseMo(km),trench:sc?'cab:'+sc.cid:id,cut:0,day:S.day,ready:S.day+(own?dfBuildDays(km):30),spares:false}; S.links.push(l);closeModal();UI.sel={type:'link',id}; toast(own?`Groundbreaking!
Your own fiber from ${CITY[a].name} to ${CITY[b].name}. Permits and digging take about ${dfBuildDays(km)} days.`:`Dark fiber IRU signed.
${CITY[a].name}–${CITY[b].name} will be spliced and handed over in about 30 days.`,'goal');after();}, addCh:({id,o})=>{const l=S.links.find(x=>x.id===id),O=OPT[o];if(!l||!O||l.kind!=='df')return;const why=chWhy(l,o);if(why){toast(`Can't add ${O.n}.
${esc(why)}`,'bad');sfx('err');return;}if(!spend(optCost(o)))return;(l.ch=l.ch||[]).push(o);floater((CITY[l.a].x+CITY[l.b].x)/2,(CITY[l.a].y+CITY[l.b].y)/2-20,`+${O.n}`,'#FF4F9A');after();}, @@ -2013,14 +2061,17 @@ const ACT={ helpClose:()=>{if(UI.started)closeModal();else showTitle();}, }; function pairLinks(a,b){return S.links.filter(l=>(l.a===a&&l.b===b)||(l.a===b&&l.b===a));} -function dfAllowed(a,b){return !isSub(a,b)&&cnCity(a)===cnCity(b)&&!uaePair(a,b);} +// Short, busy subsea routes (London–Amsterdam, London–Paris) sell dark fiber pairs too. +function subDfCable(a,b){return cablesOk(a,b).filter(c=>CAB[c.cid].df).sort((x,y)=>x.km-y.km)[0]||null;} +function dfAllowed(a,b){if(isSub(a,b))return !!subDfCable(a,b);return cnCity(a)===cnCity(b)&&!uaePair(a,b);} function optCost(o){return Math.round(OPT[o].cost*(S&&S.ev&&S.ev.tariff>S.day?1.4:1));} function chWhy(l,o){const O=OPT[o];if(O.lvl>lvl())return `Unlocks at customer level ${O.lvl}.`;if(O.sys==='roadm'&&l.sys!=='roadm')return 'Needs a ROADMaster 9000 line system.';if(l.km>O.reach)return `Reach is ${O.reach.toLocaleString()} km; this route is ${l.km.toLocaleString()} km.`; if((l.ch||[]).length+soldSlots(l)>=DF_SYS[l.sys].max)return `${DF_SYS[l.sys].n} is full (${DF_SYS[l.sys].max} channels${soldSlots(l)?`, ${soldSlots(l)} sold to customers`:''}).`; for(const c of [l.a,l.b]){const p=S.pops[c];if(p&&(p.rgen||0)innerWidth>760&&innerWidth<=1200; +function selectCity(c){UI.sel={type:'city',id:c};UI.confirm=null;if(isTablet())UI.leftOpen=false;if(!S.pops[c])UI.tab='cust';renderPanel();} /* ================= SAVE ================= */ function save(){if(!S||S.lost)return;S.uiSpeed=UI.speed;S.cam={x:cam.x,y:cam.y,z:cam.z};try{localStorage.setItem('sot-save-v1',JSON.stringify(S));}catch(e){}UI.lastSave=performance.now();} @@ -2062,7 +2113,7 @@ const $=id=>document.getElementById(id); const btn=(label,act,args={},cls='',dis=false,title='')=>``; const logo=n=>``; const barCls=u=>u>=0.9?'bad':u>=0.65?'warn':''; -function renderAll(){renderHUD();renderLeft();renderPanel();renderHint();renderMega();renderCoach();} +function renderAll(){if(isTablet()&&!UI.sel)UI.leftOpen=false;renderHUD();renderLeft();renderPanel();renderHint();renderMega();renderCoach();} function renderMega(){const el=$('mega');if(!el)return;const on=!!(S&&S.ev&&S.ev.php>S.day);if(el.hidden===!on)return;el.hidden=!on;} function renderHUD(){ for(const v of [0,0.5,1,2,4,8]){const b=$('sp'+v);if(b)b.classList.toggle('on',UI.speed===v);} @@ -2081,7 +2132,9 @@ function renderHUD(){ const n=S.inc.length;$('hNoc').classList.toggle('hot',n>0);$('hNocVal').textContent=n?`${n} incident${n>1?'s':''}`:'All quiet'; } function renderLeft(){ - const L=$('left');L.classList.toggle('closed',!UI.leftOpen); + // Tablets in landscape: both side panels don't fit next to the map, so the left one tucks away + // while a city or link is open and comes back with the toggle button. + const tab=isTablet(),L=$('left');L.classList.toggle('closed',tab?(!!UI.sel&&!UI.leftOpen):!UI.leftOpen);const tg=$('leftToggle');if(tg&&innerWidth>760)tg.hidden=!(tab&&L.classList.contains('closed')); if(!S){L.hidden=true;return;}L.hidden=false; const ndone=GOALS.filter(g=>S.done[g.id]!==undefined).length; const tabs=[['goals',`Goals${ndone}/${GOALS.length}`],['deals',`Deals${S.offers.length?`${S.offers.length}`:''}`],['noc',`NOC${S.inc.length?`${S.inc.length}`:''}`],['nets','Networks']]; @@ -2233,11 +2286,11 @@ function ixSection(c){const C=CITY[c],ix=ixName(c);let h=''; else if(!ix){h+=`

There's no IX in ${C.name} yet. Found one: networks join over time, pay you for ports, and peer with you for free.

${S.pops[c]?btn(`Found your own IX ${fmt$(MYIX_COST)} + ${fmt$(MYIX_MO)}/mo`,'foundIx',{city:c},'pink',S.cashBuild a POP here first.

'}`;} else if(S.ixp[c]===undefined){h+=`

${esc(ix)} is a shared switch. One port lets you peer with every member for free. Members: ${ixMembers(c).map(id=>esc(NET[id].name)).join(', ')||'nobody yet'}.

${S.pops[c]?'':REMOTE_WARN}${CITY[c].ixCheap?`

Run by a nonprofit. Public prices at a fraction of what other exchanges charge, and almost everyone is here.

`:''}${isDk(c)?`

Run by DE-KICKS Group. No public price list. Ask sales for a personalised quote and bring your haggling face.

`:''}
${PORT.map((P2,i)=>btn(`${P2.n} port ${isDk(c)?'Price on request ☎':fmt$(ixPortMo(c,i))+'/mo'}`,'buyIx',{city:c,tier:i},'',(!isDk(c)&&S.cash1))).join('')}
`;} else{const mine=!!S.myIx[c],u=R.useIx[c]||0,cap=ixCap(c),set=ixSessions(c),xdown=S.ev.ixdown&&S.ev.ixdown[c]>S.day; - h+=`
${mine?'Your own fabric · 400G':lagName(S.ixp[c],(S.ixn||{})[c])}${xdown?' · FABRIC DOWN':''}${fmtG(u)}
${prefCtl('ix',c,S.ixPref&&S.ixPref[c])}${S.pops[c]?siteCtl('ix',c,c,(S.ixSite||{})[c]):''}`; + h+=`
${mine?`Your own fabric · ${myFab(c).n}`:lagName(S.ixp[c],(S.ixn||{})[c])}${xdown?' · FABRIC DOWN':''}${fmtG(u)}
${prefCtl('ix',c,S.ixPref&&S.ixPref[c])}${S.pops[c]?siteCtl('ix',c,c,(S.ixSite||{})[c]):''}`; if(isDk(c)&&S.dk){const ad=S.dk.add[c]||[],rt=S.dk.ret[c];h+=`

DE-KICKS personalised pricing: ${Math.round(dkMult(c)*100)}% of what a normal IX would charge${rt&&rt>S.day?` (promo, ${rt-S.day} days left)`:''}.

`; for(const x of ad)h+=`
${esc(x.n)}
${esc(x.blurb)} · ${fmt$(x.mo)}/mo
${btn(UI.confirm==='dk'+c+x.n?'Lose exclusive benefits?':'Opt out','dkOptOut',{city:c,n:x.n},'ghost sm')}
`;} if(isRemote(c))h+=`

Remote port via a reseller: 1.5× price, 80% usable, and ${ixMembers(c).filter(noRemote).length} member${ixMembers(c).filter(noRemote).length===1?'':'s'} here refuse remote peers.

`; - if(mine)h+=`
Members paying you${S.myIx[c].members.length} · ${fmt$(S.myIx[c].members.length*MYIX_FEE)}/mo
`; + if(mine){const f=S.myIx[c].fab|0,N=MYIX_FAB[f+1];h+=`
Members paying you${S.myIx[c].members.length} of up to ${myFab(c).max} · ${fmt$(S.myIx[c].members.length*MYIX_FEE)}/mo
${N?`
${btn(N.lvl>lvl()?`${N.n} fabric level ${N.lvl}`:`Upgrade fabric to ${N.n} ${fmt$(N.cost)} + ${fmt$(N.mo)}/mo`,'myIxUp',{city:c},'pink sm',N.lvl>lvl()||S.cash

A bigger fabric carries more traffic and has room for more members. Your router here still has to keep up.

`:'

Biggest fabric money can buy.

'}`;} else h+=`
${PORT.map((P2,i)=>i>S.ixp[c]?btn(`Upgrade ${P2.n} ${fmt$(ixPortMo(c,i)*((S.ixn||{})[c]||1))}/mo`,'buyIx',{city:c,tier:i},'sm',(!!S.pops[c]&&!portOk(c,i))||(!S.pops[c]&&i>1)):'').join('')}${S.pops[c]&&((S.ixn||{})[c]||1)${fmt$(ixPortMo(c,S.ixp[c]))}/mo`,'lagIx',{city:c,d:1},'sm',S.cash1?btn('− member','lagIx',{city:c,d:-1},'ghost sm'):''}${btn(S.rs[c]?'Leave route server':'Join route server','rs',{city:c},S.rs[c]?'ghost sm':'pink sm')}${btn(UI.confirm==='ix'+c?'Really leave?':'Leave IX','cancelIx',{city:c},'ghost sm')}
`; h+=`
`; for(const id of ixMembers(c)){const n=NET[id],on=set.has(id),viaRs=on&&!S.peers[id+'@'+c]&&!mine,chk=peerOk(id,'ix',c); @@ -2452,7 +2505,7 @@ function showHelp(){
Embedded cache
A CDN's server in your rack. Serves most of that CDN's traffic locally, for the price of power.
DE-KICKS
The group behind several big exchanges (Frankfurt, Madrid, Marseille, Dubai, Mumbai, New York) treats price lists as a state secret. Ports are quoted per customer and go up the bigger you look. Haggling can work, backfire or stall for a week. Prices get "harmonised" upwards once a year, add-ons appear on your invoice until you opt out, and trying to leave earns you a retention discount that ends with a fee.
Remote peering
Reach an IX over a fabric circuit without a POP there. It works, and the route server still gets you every open network, but it is discouraged: the reseller charges 1.5× for the port and oversubscribes it to 80%, latency rides the fabric, one fabric outage drops every session, and many selective networks refuse remote members outright.
Peering policy
Open peers with anyone. Selective wants to see traffic first. Restrictive (Tier 1s) only peers with giants, over PNIs. Paid means exactly that. Big selective networks also have moods: in some cities they refuse new peers for a few months, or only take PNIs, and now and then they tear down a session you already had. Try another city or a PNI, and ask again later.
Waves
Your fiber links are leased waves at a flat monthly rate. Longer and bigger costs more (10G → 6.4T), and subsea is 1.8× the price.
95th percentile
Transit bills sample your usage every day and charge the 95th percentile of the last 30 days, so short spikes are forgiven but long ones are not.
Routers
Each POP's router model caps its fastest port (100G, 400G, 800G, 1.6T) and how much it can forward. Bigger waves and ports need better routers at both ends. Better models unlock with your customer level. With one router, upgrades mean a day of downtime.
Dark fiber
Lease an IRU or build your own (slow, with delays), then buy a line system with amplifiers and light channels with 400ZR+, 800ZR+ or 1.6T transponders. Much cheaper than waves at scale, but the gear can fail. A spares kit speeds up repairs.
Subsea cables
Subsea waves can only follow real-ish cable systems, drawn faintly on the map (tap a city to highlight its cables). Teal ones are new and cheap, purple ones pricey, dashed ones old and cut-prone. All your waves on one cable die together when it is cut. Between continents on land, you can often choose overland (2.5×, many borders) or a cable.
Latency
Every link has latency. High-frequency traders pay a fortune for a circuit within their latency budget; route them “Lowest latency”. Bulk backup customers do not care, so route them “Scenic” over your quiet links to keep busy ones free.
NOC dashboard
The chart button at the top opens traffic graphs by exit (caches, PNIs, IX, transit), money over time, per-ASN traffic with how it reaches you and what its transit costs, plus your busiest links and routers.
Asia
A weird, underserved market. Transit costs 2.5× what it does in Europe (Africa 2×, Oceania 1.8×), local incumbents mostly peer only for pay, and IXs are fragmented. But demand is enormous and users sign up 60% faster than anywhere else. Peering and caches pay off most here.
Russia
Moscow needs a mandatory government box in every POP, Western CDNs are mostly gone, Goggle video is throttled to half speed, and the sovereign internet drills now and then cut Moscow off for a day.
Events, chains and wholesale
Event networks (a final, a festival, a keynote) need a burst of capacity in one city for a few days and pay once at the end, prorated by how much of the crowd you served; below 70% you pay a penalty. SD-WAN chains connect 3–6 of your POPs hub-and-spoke, so one broken spoke upsets the whole contract. Once you run your own dark fiber, carriers want to rent spare channels as alien waves, and on fiber you built yourself, a spare pair.
Bank
Tap your cash to open the bank. Lenders make offers now and then, and much more often when you are in the red. Each loan has a monthly payment and some odd conditions; break one and you pay a penalty. Your credit rating decides which banks talk to you. The loan shark is always there. Do not be late.
LAGs
Out of port speed? Bundle up to 8 identical ports to the same transit provider, IX or PNI into a LAG. Each member costs a full port; flow hashing is never perfectly even, so a bundle carries about 95% of the sum.
Traffic engineering
Tap a link to see which networks, which entry points and which customer cities fill it. Raise a link's metric to steer traffic around it, or set an egress (transit, IX, PNI) to Prefer or Backup only.
China
Mainland China needs a license and a local joint venture. Many foreign services are blocked there, and traffic crossing the border loses packets unless you pay for premium routes.
Weird requirements
Some customers come with conditions: no Cogentle anywhere, no subsea cables because of sharks, two routers, a generator, NetChill on-net, low-loss China reach and more. Each pays a bonus. Unmet ones make them grumpy until you fix it or they leave.
Customer levels
As your peak traffic and footprint grow, bigger customers show up: streaming startups and universities, then AI GPU data centers and cloud on-ramps, then AI training interconnects and hyperscaler DCI deals measured in terabits. Pink $$ bubbles mark the big ones.
L2VPN & DDoS protection
Businesses may want a private circuit between two of your POPs (it rides your backbone), or DDoS protection (needs your own scrubbing center).
NNI fabrics
Megapork, PocketFabric and Consolation Connect sell a port plus virtual circuits between cities. Great for small links and remote peering at an IX where you have no POP.
-
Conferences
NANOG-ish, RIPE-ish, DENOG-ish and friends come round every year. Register in the Deals tab for $8k. For 45 days after, selective networks with a presence in that region need only half the usual traffic before they peer with you. Sometimes you also win the raffle.
Modes
Sandbox gives you a billion dollars, every unlock and no failures, but no badges. Scenarios are hand-built challenges with a goal and a deadline, and the weekly challenge gives everyone the same world for a week. Share your result with the card in the menu.
Traceroute
Tap 🔍 Traceroute on any of your cities, or open it from the NOC tab, to see the exact path to a network or POP, hop by hop, with latency, the exit and the AS path.
Badges
Below your goals sits a wall of badges, from common to legendary. Some take luck, some take years, and a couple are secret. Badges you earned in earlier games stay on this device with a dashed outline.
The giants
At customer level 3 and 4, hyperscalers and AI clouds show up with deals only they would ask for: terabit AI WANs between gigawatt campuses, training runs spread over several sites, week-long dataset ingests, and hundreds of fiber pairs in a trench you dug yourself. They pay like nobody else, and they want diverse paths, two sites per metro and zero excuses. Cities near their campuses list them under “Who’s here”.
RouteScript
Once Auto-TE is installed, you can program it from the NOC tab. Rules include spill at 80%, prefer pni for goggle, avoid transit for netchill, cap transit cogentle at 20 gbps, drain paris, avoid link fra-ams and blackhole ddos. Check runs a dry run against live traffic; Deploy makes it real, mistakes included.
Auto-TE
Traffic follows the shortest path by distance and link metric, and reroutes by itself when links fail. When a path is merely full, the overflow is dropped, just like a real IGP. From customer level 3 you can install Auto-TE in the NOC tab: it spills overflow onto up to two alternate paths with free capacity, as long as they are no more than twice as long.
Metro diversity
A POP is one building until you add a second site in the Infra tab. Then a power cut, cleaner or A/C failure only takes out half the city, and you choose which site each transit, PNI and IX port plugs into, or pick Both to split a LAG across the two buildings. Spread them out, or both halves of your redundancy will sit in the same dark room. Watch out for metro ring cuts, which cut site B off.
Regional quirks
South America hangs off Miami: transit is pricier, nothing crosses the Darién Gap by land, and fiber over the Andes costs double and breaks often. IX.brrr in Brazil is run by a nonprofit with cheap public prices, and small Brazilian provedores buy transit in bulk. Inside the UAE only the duopoly may run fiber, so no dark fiber and 3× waves. Taiwan’s cables meet a lot of anchors, Indian fiber meets road widening and the monsoon, and South Africa has load shedding: bring a generator.
Boot times
Some routers take forever to boot. The Infra tab shows how long yours takes. Slow booters make crashes last longer and turn a one-router swap into a three-day outage. Bigger chassis, especially anything with a PacketOinker™ inside, are slow more often. Twin routers make it someone else’s problem.
Failures
Things break all the time: fiber cuts, router crashes, power cuts, IX loops, fabric outages, route leaks, DDoS, fat fingers, cooling failures, and geopolitics: sanctions, tariffs, BGP hijacks, landing permit disputes, exam-day shutdowns and Red Sea cable cuts. Traffic reroutes automatically over other paths and upstreams. Parallel links on diverse routes, a second router and a backup generator all help. Or pay to rush repairs.
+
Conferences
NANOG-ish, RIPE-ish, DENOG-ish and friends come round every year. Register in the Deals tab for $8k. For 45 days after, selective networks with a presence in that region need only half the usual traffic before they peer with you. Sometimes you also win the raffle.
Modes
Sandbox gives you a billion dollars, every unlock and no failures, but no badges. Scenarios are hand-built challenges with a goal and a deadline, and the weekly challenge gives everyone the same world for a week. Share your result with the card in the menu.
Traceroute
Tap 🔍 Traceroute on any of your cities, or open it from the NOC tab, to see the exact path to a network or POP, hop by hop, with latency, the exit and the AS path.
Badges
Below your goals sits a wall of badges, from common to legendary. Some take luck, some take years, and a couple are secret. Badges you earned in earlier games stay on this device with a dashed outline.
The giants
At customer level 3 and 4, hyperscalers and AI clouds show up with deals only they would ask for: terabit AI WANs between gigawatt campuses, training runs spread over several sites, week-long dataset ingests, and hundreds of fiber pairs in a trench you dug yourself. They pay like nobody else, and they want diverse paths, two sites per metro and zero excuses. Cities near their campuses list them under “Who’s here”.
RouteScript
Once Auto-TE is installed, you can program it from the NOC tab. Rules include spill at 80%, prefer pni for goggle, avoid transit for netchill, cap transit cogentle at 20 gbps, drain paris, avoid link fra-ams and blackhole ddos. Check runs a dry run against live traffic; Deploy makes it real, mistakes included.
Auto-TE
Traffic follows the shortest path by distance and link metric, and reroutes by itself when links fail. When a path is merely full, the overflow is dropped, just like a real IGP. From customer level 3 you can install Auto-TE in the NOC tab: it spills overflow onto up to two alternate paths with free capacity, as long as they are no more than twice as long.
Metro diversity
A POP is one building until you add a second site in the Infra tab. Then a power cut, cleaner or A/C failure only takes out half the city, and you choose which site each transit, PNI and IX port plugs into, or pick Both to split a LAG across the two buildings. Spread them out, or both halves of your redundancy will sit in the same dark room. Watch out for metro ring cuts, which cut site B off.
Wave markets
What a wave costs depends on where it runs. Europe is cheap (lots of competing fiber), North America is average, Asia and South America are pricier, and anything into Africa is several times the price. Every route has its own going rate, and new leases get about 8% cheaper each year, so waiting can pay. The link planner tells you how a route compares.
Regional quirks
In the Gulf, Saudi POPs need a local telecom licence and data on Saudi users stays in the Kingdom; gigaprojects ask for huge demo networks; and now and then the neighbours fall out and every link between Qatar and Saudi Arabia or the UAE goes dark for months, so keep a sea route. South America hangs off Miami: transit is pricier, nothing crosses the Darién Gap by land, and fiber over the Andes costs double and breaks often. IX.brrr in Brazil is run by a nonprofit with cheap public prices, and small Brazilian provedores buy transit in bulk. Inside the UAE only the duopoly may run fiber, so no dark fiber and 3× waves. Taiwan’s cables meet a lot of anchors, Indian fiber meets road widening and the monsoon, and South Africa has load shedding: bring a generator.
Boot times
Some routers take forever to boot. The Infra tab shows how long yours takes. Slow booters make crashes last longer and turn a one-router swap into a three-day outage. Bigger chassis, especially anything with a PacketOinker™ inside, are slow more often. Twin routers make it someone else’s problem.
Failures
Things break all the time: fiber cuts, router crashes, power cuts, IX loops, fabric outages, route leaks, DDoS, fat fingers, cooling failures, and geopolitics: sanctions, tariffs, BGP hijacks, landing permit disputes, exam-day shutdowns and Red Sea cable cuts. Traffic reroutes automatically over other paths and upstreams. Parallel links on diverse routes, a second router and a backup generator all help. Or pay to rush repairs.
${btn(UI.started?'Back to the map':'Got it','helpClose',{},'big')}${RELEASE_NOTES.length?btn(`What’s new in ${esc(APP_VERSION)}`,'whatsNewShow',{},'ghost'):''}${UI.started&&S&&!S.lost?btn('Start a new network','resetAsk',{},'ghost sm'):''}
${UI.started&&S&&!S.lost?btn('Export save','exportSave',{},'ghost sm'):''}${btn('Import a save','importPick',{},'ghost sm')}
${settingsRow()}`); } function showWin(){setTimeout(()=>{const m=$('modalCard');if(m&&!m.querySelector('[data-act=share]'))m.insertAdjacentHTML('beforeend',`
${btn('Share my network','share',{},'pink')}
`);},0);openModal(`

You're a Tier 1!

${esc(S.name)} (AS${S.asn}) is transit-free. You peer with every giant on the planet and pay nobody to reach the internet. Took you ${S.day} days and ${S.stats.incidents} incidents.

${btn('Keep building','keepPlaying',{},'pink big')}`);sfx('coin');} @@ -2471,22 +2524,24 @@ function openLinkModal(a,b){ if(sub&&!cablesOk(a,b).length){const fr=[...new Set(CABLE_PAIRS.filter(c=>c.a===a||c.b===a).map(c=>CITY[c.a===a?c.b:c.a].name))];openModal(head+`

No subsea cable lands in both ${CITY[a].name} and ${CITY[b].name}. Cables from ${CITY[a].name} reach ${fr.join(', ')||'nowhere'}. Hop through one of those.

`);return;} if(isSub(a,b)&&S.ev.landban&&S.ev.landban.until>S.day&&[a,b].includes(S.ev.landban.city)){openModal(head+`

The landing permit dispute in ${CITY[S.ev.landban.city].name} blocks new subsea links for ${S.ev.landban.until-S.day} more days.

`);return;} if(uaePair(a,b)||andesPair(a,b))route+=`

${landWhy(a,b)}

`; + route+=`

📈 ${esc(marketNote(a,b,sub))}

`; const wr=waveRoute(a,b,mult,border); openModal(`${head}

Waves are leased at a flat monthly rate. Bigger and longer costs more, and subsea is 1.8×. First month is due now.

- ${pop?`

Includes a new POP in ${CITY[b].name} (${fmt$(popCost(b))}${ruCity(b)?', government box included':CITY[b].uae?', free-zone license included':''}).

`:''}${route}${viaSeg(a,b)} + ${pop?`

Includes a new POP in ${CITY[b].name} (${fmt$(popCost(b))}${ruCity(b)?', government box included':CITY[b].uae?', free-zone license included':CITY[b].saudi?', local telecom licence included':''}).

`:''}${route}${viaSeg(a,b)}
${LT.map((T,i)=>{const lc=Math.round(waveMo(wr.km,wr.sub,i)*wr.wm),c=lc+pop,ok=waveOk(a,b,i);return ``;}).join('')}
`); } function dfModalBody(a,b,km,pop){ - if(isSub(a,b))return `

Nobody sells dark fiber on a subsea cable here. Subsea capacity comes as leased waves.

`; + if(isSub(a,b)&&!subDfCable(a,b))return `

Nobody sells dark fiber on a subsea cable here. Subsea capacity comes as leased waves.

`; + const sc=isSub(a,b)?subDfCable(a,b):null;if(sc)km=sc.km; if(uaePair(a,b))return `

No dark fiber inside the UAE. Only the two licensed operators may run fiber here, and they only sell waves.

`; if(!dfAllowed(a,b))return `

Dark fiber across the Chinese border is not for sale. Buy a cross-border wave instead.

`; if(lvl()<2)return `

Dark fiber unlocks at customer level 2. You need the scale to justify buying your own optical gear.

`; - const src=UI.dfSrc==='build'&&lvl()>=3?'build':'lease',sys=DF_SYS[UI.dfSys]&&DF_SYS[UI.dfSys].lvl<=lvl()?UI.dfSys:'lite',amps=ampCount(km); + const src=UI.dfSrc==='build'&&lvl()>=3&&!sc?'build':'lease',sys=DF_SYS[UI.dfSys]&&DF_SYS[UI.dfSys].lvl<=lvl()?UI.dfSys:'lite',amps=ampCount(km); const up=(src==='build'?dfBuildCost(km):0)+DF_SYS[sys].cost+amps*AMP_COST+pop,mo=(src==='build'?Math.round(km*0.15):dfLeaseMo(km))+amps*AMP_MO; - const w=Math.round(waveMo(km,false,3)); + const w=Math.round(waveMo(km,false,4)); return `

A fiber pair of your own. The glass is cheap, the gear is not: you buy a line system with an amplifier every ${AMP_EVERY} km, then optics for each channel. Your gear can fail, and you fix it.

-

The glass

${btn(`Lease an IRU ${fmt$(dfLeaseMo(km))}/mo · ready in 30 days`,'dfSrc',{v:'lease'},src==='lease'?'pink':'ghost')}${btn(lvl()>=3?`Build your own ${fmt$(dfBuildCost(km))} · ~${dfBuildDays(km)} days`:'Build your own level 3','dfSrc',{v:'build'},src==='build'?'pink':'ghost',lvl()<3)}
+

The glass

${btn(`Lease an IRU ${fmt$(dfLeaseMo(km))}/mo · ready in 30 days`,'dfSrc',{v:'lease'},src==='lease'?'pink':'ghost')}${sc?btn('Build your own not under the sea','dfSrc',{v:'build'},'ghost',true):btn(lvl()>=3?`Build your own ${fmt$(dfBuildCost(km))} · ~${dfBuildDays(km)} days`:'Build your own level 3','dfSrc',{v:'build'},src==='build'?'pink':'ghost',lvl()<3)}
${sc?`

A fiber pair on ${esc(CAB[sc.cid].name)}, ${sc.km.toLocaleString()} km. It shares the cable with everyone else's waves, anchors included.

`:''} ${src==='build'?`

Your own trench: almost no rent, but permits and digging take forever, and delays happen.

`:''}

Line system

${Object.keys(DF_SYS).map(k=>btn(`${DF_SYS[k].n} ${DF_SYS[k].lvl>lvl()?'level '+DF_SYS[k].lvl:fmt$(DF_SYS[k].cost)}`,'dfSys',{v:k},sys===k?'pink':'ghost',DF_SYS[k].lvl>lvl())).join('')}

${esc(DF_SYS[sys].blurb)} Plus ${amps} in-line amplifier${amps===1?'':'s'} (${fmt$(AMP_COST)} each, ${fmt$(AMP_MO)}/mo for hut rent and power).

@@ -2749,8 +2804,8 @@ function endPtr(e){ if(d.mode==='pinch'){if(ptrs.size===0){UI.drag=null;UI.snap=null;cv.classList.remove('linking');}return;} if(d.mode==='link'){if(UI.snap&&UI.snap.id!==d.from){openLinkModal(d.from,UI.snap.id);sfx('click');}} else if(!d.moved&&S){const h=hitCity(e.clientX,e.clientY); - if(h){selectCity(h.id);sfx('click');} - else{const l=hitLink(e.clientX,e.clientY);if(l){UI.sel={type:'link',id:l};UI.confirm=null;renderPanel();sfx('click');}else{UI.sel=null;renderPanel();}}} + if(h){selectCity(h.id);renderLeft();sfx('click');} + else{const l=hitLink(e.clientX,e.clientY);if(l){UI.sel={type:'link',id:l};UI.confirm=null;if(isTablet())UI.leftOpen=false;renderPanel();renderLeft();sfx('click');}else{UI.sel=null;renderPanel();renderLeft();}}} UI.drag=null;UI.snap=null;cv.classList.remove('linking');cv.style.cursor='grab';renderHint(); } // A cancelled pointer (scroll takeover, palm rejection, system gesture) is not a tap or a drop. diff --git a/tests/regions.test.js b/tests/regions.test.js index 6e9f18d..0ec0e43 100644 --- a/tests/regions.test.js +++ b/tests/regions.test.js @@ -166,3 +166,66 @@ test('#8 ports can be split across both buildings, so one dark site only halves assert.ok(full > 0); assert.deepEqual(errors, []); }); + +test('routers: wave and port sizes match what the box can actually take', () => { + const { ev } = load(); + start(ev); + assert.equal(ev("LT.map(t=>t.n).join()"), '10G,100G,400G,800G,1.6T,6.4T'); + assert.equal(ev("PORT[RG[3].maxP].n"), '1.6T', 'the 1.6T router has 1.6T ports'); + assert.equal(ev("LT[RG[2].maxLT].n"), '800G', 'an 800G router stops at 800G waves'); + assert.equal(ev("LT[RG[3].maxLT].n"), '6.4T'); + // an old save with a 1.6T wave (old tier 3) keeps its 1.6T wave after migration + const old = ev("(()=>{const s=JSON.parse(JSON.stringify(S));delete s.ltv;s.links=[{id:'x',a:'fra',b:'ams',kind:'wave',tier:3,km:364,mo:1,cut:0}];s.pops.ams={day:0,routers:1};return JSON.stringify(s)})()"); + assert.equal(ev(`LT[migrate(JSON.parse(${JSON.stringify(old)})).links[0].tier].n`), '1.6T'); +}); + +test('London–Amsterdam: many cheap cables and dark fiber you can lease under the sea', () => { + const { ev, errors } = load(); + start(ev); + assert.ok(ev("cablesFor('lon','ams').length") >= 4); + assert.equal(ev("dfAllowed('lon','ams')"), true); + assert.equal(ev("dfAllowed('lon','nyc')"), false, 'not on long subsea routes'); + ev("ACT.buildPop({city:'lon'});ACT.buildPop({city:'ams'});UI.pending={a:'lon',b:'ams'};UI.lmode='df';UI.dfSrc='build';UI.dfSys='lite';ACT.orderDf();UI.lmode='wave'"); + const l = JSON.parse(ev("JSON.stringify(S.links.find(l=>l.kind==='df'))")); + assert.ok(l && l.sub && l.cable && !l.own, 'a subsea IRU, never self-built'); + assert.deepEqual(errors, []); +}); + +test('#10 your own IX fabric can be upgraded, and grows', () => { + const { ev, errors } = load(); + start(ev); + ev("ACT.buildPop({city:'mex'});ACT.foundIx({city:'mex'});compute()"); + assert.equal(ev("ixCap('mex')"), 400); + ev("ACT.myIxUp({city:'mex'});compute()"); + assert.equal(ev("ixCap('mex')"), 1600); + assert.equal(ev("myFab('mex').max"), 20); + ev("selectCity('mex');ACT.tab({t:'peer'})"); + assert.match(ev("document.getElementById('panelBody').textContent"), /Your own fabric · 1.6T/); + assert.deepEqual(errors, []); +}); + +test('wave prices follow regional markets and fall over time', () => { + const { ev } = load(); + start(ev); + const eu = ev("waveMarket('fra','ams',false).reg"), us = ev("waveMarket('nyc','ash',false).reg"), af = ev("waveMarket('lon','lag',true).reg"); + assert.ok(eu < us && us < af, `Europe ${eu} < US ${us} < Africa ${af}`); + const m0 = ev("waveMarket('fra','ams',false).m"); + ev("S.day=720"); + assert.ok(ev("waveMarket('fra','ams',false).m") < m0, 'two years later it is cheaper'); + assert.ok(ev("cablesFor('cai','dxb').length") > 0, 'Cairo–Dubai over the Red Sea'); + assert.match(ev("marketNote('fra','ams',false)"), /Europe/); +}); + +test('the Gulf: Saudi licences, and a spat that cuts Qatar off from its neighbours', () => { + const { ev, errors } = load(); + start(ev); + assert.equal(ev("popCost('ruh')-popCost('fra')"), ev('KSA_LIC')); + ev("ACT.buildPop({city:'doh'});ACT.buildPop({city:'ruh'});UI.via='land';openLinkModal('doh','ruh');ACT.buildLink({tier:1});closeModal()"); + const l = "S.links.find(l=>[l.a,l.b].includes('doh'))"; + assert.equal(ev(`linkDown(${l})`), false); + ev("S.ev.gulf=S.day+60"); + assert.equal(ev(`linkDown(${l})`), true, 'the border is closed'); + ev("ACT.startScn({id:'redsea',sure:1})"); + assert.equal(ev("cablesOk('cai','jed').length+cablesOk('jed','bom').length"), 0, 'the Red Sea crisis covers Egypt and Jeddah too'); + assert.deepEqual(errors, []); +});