|
|
|
|
|
by ziaddotcom
1978 days ago
|
|
Fair enough. I think you've called me out reasonably there. I still don't think you've addressed my core point, and it's quite probable I wasn't clear enough to make that possible. My white pixel example was referencing the talk, where I interpreted Jonathan saying almost verbatim about the barriers to just lighting up a single pixel on a modern computer. I made the assumption that everything he opines on publicly is in the context of him making games. Is this whole stack overflow thread just a bunch of masochistic programmers, or is it needly complex to achieve consensus on how to plot a pixel in a browser canvas? I'll take responsibility for begging the question in jest.
https://stackoverflow.com/questions/4899799/whats-the-best-w... If one wants to start the game they are going to make in the same engine the are going to finish making it in, for most people, unity is going to be worth the gigabyte download. If you just want to teach kids html/css, the server stack in python, and how to change the color of one pixel in the browser is lesson one day one on a raspberry pi, fantastic. If one wants to write a mario clone and ship it in electron, bravo. |
|
I actually did this whilst playing about with Zig a while ago. I made an offscreen buffer, rendered pixels to a frame buffer array in WASM and then copied them into the offscreen buffer. Not going to win speed awards but it worked, was fast enough and was super simple. Also it meant I could scale the canvas to scale my image. This was for a very small screen representing windows in a building. My proof of concept was approximately 30 lines of JS and the same again in Zig. Most of the latter is type definitions.
Although given that Canvas is supposed to be a friendly abstraction it definitely feels like a weird oversight. Personally for pixel sized things I love PICO-8.