4 ms·
Funny, my first attempt at a real-time web app was also a Deathmatch Rock Paper Scissors server. But it was 1997, so the spock version wasn't yet invented. Pi
by jasonkester 14y ago
Funny, my first attempt at a real-time web app was also a Deathmatch Rock Paper Scissors server. But it was 1997, so the spock version wasn't yet invented.
Picking a technology for the 2-way comm was tough back then, since Layers only worked on Netscape and IFrame was IE only. I ended up going with a frameset and zero-height frame at the bottom of each screen. When you input your move, it'd submit a form on the frame and update the state on the server. And the frames would periodically poll to see if the opponent had given his move.
Once both moves were available, it'd run its little Mortal Kombat pixel art animation and crush the opponent's scissors with its fist. It was start of the art at the time. I hadn't ever seen anybody do real time web stuff at that point.
As I find happens with most "build something silly while slacking off at work" scenarios, we ended up shipping it a few months later. One of our products looked like it could actually benefit from the ability to real-time update one of its components, so I tore out the fighting and used the RPS comm stuff.