Story Details

  • Running Pong in 240 browser tabs

    Posted: 2025-02-20 19:33:28

    The author successfully ran 240 instances of a JavaScript Pong game simultaneously in separate browser tabs, pushing the limits of browser performance. They achieved this by meticulously optimizing the game code for minimal CPU and memory usage, employing techniques like simplifying graphics, reducing frame rate, and minimizing DOM manipulations. Despite these optimizations, the combined processing load still strained the browser and system resources, causing noticeable lag and performance degradation. The experiment showcased the surprising capacity of modern browsers while also highlighting their limitations when handling numerous computationally intensive tasks concurrently.

    Summary of Comments ( 24 )
    https://news.ycombinator.com/item?id=43119086

    Hacker News users generally expressed amusement and mild interest in the project of running Pong across multiple browser tabs. Some questioned the practicality and efficiency, particularly regarding resource usage. One commenter pointed out potential improvements by using Web Workers or SharedArrayBuffers for better performance and inter-tab communication, avoiding the limitations of localStorage. Others suggested alternative, more efficient methods for achieving the same visual effect, such as using a single canvas element and drawing the game state across it. A few appreciated the whimsical nature of the project, acknowledging its value as a fun experiment despite its lack of practical application.