2 ms·
Though each "Tetris" game is incredibly simple (no holds, no lookahead, no SRS rotations / TSpins), this is a basic Tetris-like game written in GLSL shaders. T
by dragontamer 5y ago
Though each "Tetris" game is incredibly simple (no holds, no lookahead, no SRS rotations / TSpins), this is a basic Tetris-like game written in GLSL shaders.
The entire state of each board is stored in 3x24-bit pixels, processed by GLSL shaders and rendered using WebGL. Each "step" of the Tetris game can be seen as the GPU processing the pixels (the many 3x24 bit states) and outputting a new image (where the new image is the new state to work with).
The blog talking about this is here: https://medium.com/geekculture/launching-619-thousand-tetris-on-gpu-their-rendering-and-a-simple-bot-f2449b607db1 https://medium.com/geekculture/launching-619-thousand-tetris...
There's a bot in the Youtube video playing all of the GLSL games in parallel: over 600,000+ games executing in parallel thanks to the magic of GPGPUs.
The GUI then takes the "images" (a giant block of 3x24-bit pixels) and renders them in the scrollable GUI you see in this WebGL demo. The .exe file probably does larger files, but the WebGL demo linked here should be sufficient for most modern browsers.
------
For the WebGL demo, go to "common" and edit out the "#define no_AI" line to re-enable the (really really dumb) AI so that all the boards can be simultaneously active.