If you ship a Phaser, PixiJS, Cocos Creator (web), or Construct game, players already have your scripts. Opening DevTools β Sources is enough to read economy formulas, unlock flags, and anti-cheat stubs. Reskins on portals are not theoretical β they happen.
This post is a practical playbook: what to protect, what to leave alone , why VM-based protection has a real performance cost, and how to wire a selective pipeline. I'll use VEILVM (a browser JSVMP workspace I built) as the example tool, but the selective-protection idea applies even if you use something else.
The threat model (be honest)
Anything that runs on the player's device can eventually be reversed. Obfuscation and VM protection raise time and cost ; they do not make code unbreakable.β¦