I built a live multiplayer world map war about which way toilet paper should hang

Wait 5 sec.

You pick Over or Under once, then click hexagons anywhere on the world map to flip toilet rolls to your team, live against everyone else. 8,000 hexagons, 25,000 rolls, 183 cities. You hold 10 flips and get one back every 4 seconds, and rolls you hold earn points until someone flips them back. Some things I learned building it: - No WebSockets, no Node. It runs on plain PHP + MySQL on cheap shared hosting. Every browser asks for "what changed in second X", and since everyone asks for the same URL, Cloudflare answers almost all of it from cache. The server sees about one request per second no matter how many people watch. - The server owns all the counting, so the browser console can't cheat. 30 flips fired at the same instant still give exactly 10. - Taps feel instant because the flip shows on screen right away; taps get sent in batches and the server can still say no. - The map is made from Natural Earth data. My first version painted each country in its own color to look up borders, and blended border pixels put Vienna in Myanmar. Now it uses the real border geometry. Over is winning right now. Under needs help. Happy to answer anything about how it works.   submitted by   /u/otoreview [link]   [comments]