3 ms·
Hey Kostas here (one of the 3 people we did this). We are actually using a WASM port of chocolate-doom from which we are getting the frame buffer from WebGL. We
by kpelelis 5y ago
Hey Kostas here (one of the 3 people we did this). We are actually using a WASM port of chocolate-doom from which we are getting the frame buffer from WebGL. We use 256 time series to represent each color, and then we are using an algorithm to map pixel data to their corresponding time series. Since doom uses more than 256 colors, we are using a redmean approximation to find the closest match
- tanduv 5y agoI understand that the game is being "run" client side... how are the other components (health, ammo counters) talking to each other? Very cool btw!
- kpelelis 5y agoThanks a lot :) That was literally a last 30 minute hack. We wrote some dirty code that exposes player stats into the javascript space and then it was a matter of forwarding them into the data source.
- paulryanrogers 5y agoActually in DOS Doom only uses 256 colors for rendering and its palette.
- corysama 5y ago256 at any one time. But, the game has different palletes on different levels. I guess they have to map each pallete to a single display method.
- boomlinde 5y agoAll levels use the same set of palettes. Aside from the normal palette, there are palettes representing various levels of color tinting for pickup/pain/berserk effects, and a slightly green tinted one for the radiation suit.
- gadders 5y agoHold on - so this isn't an April Fool's joke?
- kpelelis 5y agoNo, it is not :D It was part of an internal hackathon. You can actually try it (there are links on the blog post)