Counter-Strike esports manager: career mode + LIVE tactical top-down simulation

- Full manager sim: 28 orgs / 168 players, calendar, transfers, youth scouting, loans, training, board confidence
- Simulation Mode with real-time micro-engine (live.js): A* pathfinding on map geometry, raycast ballistics (spread/falloff/armor/headshots), smokes/flashes/HE that matter, plant/defuse/retake AI, clutch detection
- Canvas renderer (viz.js): follow/radar cameras, HP bars, CS2-style kill feed, callouts, synthesized Web-Audio SFX, speed x1-x3, AUTO-SPECTATE hands-free series playback
- Round results flow from the firefight back into the career engine (score, economy, box score, MVP)
- Playwright + Node VM test suites included (test/, plus external pwtest harness)
This commit is contained in:
deepseek
2026-08-23 07:00:47 +00:00
commit 4c7fe1db4c
15 changed files with 4722 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
'use strict';
const fs=require('fs'),path=require('path'),vm=require('vm');
const ctx={console,Math,Date,JSON,Object,Array,Set,Map,Number,String,Boolean,RegExp,parseInt,parseFloat};
ctx.globalThis=ctx;
vm.createContext(ctx);
const dir=path.join(__dirname,'..','js');
for(const f of ['util.js','data.js','game.js','match.js']){
vm.runInContext(fs.readFileSync(path.join(dir,f),'utf8'),ctx,{filename:f});
}
vm.runInContext(`
Game.newWorld('normal');
Game.startWithTeam('t0');
G.calendar.forEach(e=>Game.registerEvent(e.id));
for(let d=0;d<26;d++){
const fx=Game.advanceOneDay();
if(fx){console.log('day',G.day,'USER FIXTURE vs',Game.team(fx.a===G.playerTeamId?fx.b:fx.a)?.tag);
MatchEngine.simulate(fx,G.calendar.find(e=>e.id===fx.evId));}
if(G.day>=14){
const ev=G.calendar[0];
console.log('day',G.day,'ev0:',ev.name,ev.status,'rounds:',ev.rounds.map(r=>r.name+'['+r.matches.map(m=>(m.a&&m.b?'AB':'..')+(m.winner?'W':'.')+':'+m.day).join(',')+']').join(' '));
}
}
`,ctx);