5 ms·
maybe the most important improvement will be direct memory access to the canvas bitmaps for super fast game rendering.
by singularity2001 8y ago
maybe the most important improvement will be direct memory access to the canvas bitmaps for super fast game rendering.
- vanderZwan 8y agoAssuming that also implies access to typed arrays in general, then applications that involve number crunching become a lot more feasible in JS too.
- mrec 8y agoHuh? We've had typed arrays in JS for years. I think they originally went in to support WebGL, but you can use them for other stuff too. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- vanderZwan 8y agoDirect access to typed arrays from WASM without having to copy them over whole first, or use the memory buffer of the WASM module. You can't really write a "true" generic in-place sort in WASM right now, so to speak, because there is always a copying back and forth step.
- bschwindHN 8y agoWouldn't "super fast game rendering" be done by the GPU via WebGL?
- ranwired 8y agoA lot of game logic also runs on the CPU
- TazeTSchnitzel 8y agocanvas bitmaps are only useful for rendering though.
- rafaelvasco 8y agoFor 2D games it's much more convenient to pixel push directly than to deal with vertex buffers, index buffers, shaders... Unfortunately graphics cards are not optimized for that scenario.
- bschwindHN 8y agoConvenient, but "super fast"? And though it's a matter of opinion, I disagree. The GPU is easier for me to use for things like screen-space shading, alpha blending, sprite transformations and distortions, and it all performs much faster than the equivalent CPU render code.