| ▲ | anonymous908213 4 hours ago |
| Interesting article which reinforces my decision to never engage with web development in any manner other than throwing WASM paint on a Canvas. > But a purpose-built game framework like Unity would have polyfill to protect you from more of these layout and audio problems Unity doesn't polyfill, it just relies on WASM for everything which results in significantly more consistent behaviour provided your browser supports WASM to begin with. > Unity and Godot might be better choices, but I have no experience with them and I assume they only make sense for games. Unity has been used for non-game purposes successfully, and there are also other WASM-compatible frameworks specifically targeting non-game GUI use cases. |
|
| ▲ | socalgal2 3 hours ago | parent | next [-] |
| Unity in the browser fails basic interactions like copy and paste. All WASM paint on an Canvas apps on the browser have similar issues with non-english input, accessability, integration with tihngs like dictionaries, password managers, etc... So, no, do not do Wasm + Canvas |
| |
| ▲ | anonymous908213 3 hours ago | parent [-] | | To be clear, I am not suggesting the WASM canvas approach for ordinary web pages. WASM is for things that are unto themselves full-fledged applications, with the convenience of instant access to running them in a sandbox on any platform. The game described in the article certainly makes more sense with WASM than HTML5, as it uses web APIs for doing something that isn't displaying a standard web page but instead needs to conform to a specific set of characteristics to provide a consistent and polished user experience. Also, while Unity doesn't, features like canvas copy-pasting can be implemented manually or by another framework. Non-English input works fine with WASM; if it doesn't render, it's because the application developer didn't include a font that supports those characters, since there's no fallback-font kind of thing going on. But this stuff is exactly the same as developing any kind of non-web application; if the framework doesn't provide a feature, you have to provide it yourself. It needs to be approached from an application development perspective rather than a web development perspective; you don't get the freebies of web, both the good and the bad, but this gives you much more control and capability. |
|
|
| ▲ | delifue 3 hours ago | parent | prev [-] |
| Unfortunately web API doesn't yet allow drawing multi-line text in canvas. To draw multi-line text in canvas you need a layouting library |