4 ms·
Oh, ok I thought the demo was a picture because nothing happended when you clicked the thing... The JS version has very high latency. How does it work under th
by bullen 3y ago
Oh, ok I thought the demo was a picture because nothing happended when you clicked the thing...
The JS version has very high latency. How does it work under the hood?
Can the same pipeline port Java Applets to WASM/JS?
- gavinray 3y agoIt literally is the first thing you see. The docs at https://minigdx.github.io/tiny/ https://minigdx.github.io/tiny/ have a demo "BREAKOUT" game embedded in the page under the first paragraph with a link to the source code lol Screenshot for reference: https://i.imgur.com/TVzQwiu.png https://i.imgur.com/TVzQwiu.png
- bullen 3y agoI think it would be more interesting to expose how the bytecode becomes JS. But I guess I'll dig through at some point... nm, that breakout (that you could run on a 6502) maxxes a 15W modern CPU core. That's 10.000x less efficient.
- gavinray 3y ago> I think it would be more interesting to expose how the bytecode becomes JS. There's no bytecode emitted -- Kotlin is unique among JVM languages in that it acts more like a frontend, similar to LLVM or GCC. The Kotlin code is translated from an IR/AST into JS directly. The JS is one of many target languages for the Kotlin compiler. Kotlin Source Code | Kotlin Compiler | IR / / \ \ JVM WASM Native JS
- lmm 3y ago> Kotlin is unique among JVM languages in that it acts more like a frontend, similar to LLVM or GCC. "Unique among JVM languages" lol. Like most of the good parts of Kotlin, this was actually copied from Scala.
- MrBuddyCasino 3y agoScala has good parts?
- nottorp 3y agobrowser games no have fps limiter and/or vsync? oh i forgot, 2000 fps is good for bragging rights
- gavinray 3y ago> How does it work under the hood? The Kotlin is transpiled to JavaScript by the Kotlin compiler: https://kotlinlang.org/docs/js-overview.html https://kotlinlang.org/docs/js-overview.html
- kaba0 3y agoNot sure about Kotlin, but there is alreadt CheerpJ that can run Java applets unmodified both as normal JS, or as WASM. For non-applets there is even more possibilities: there is google’s closure compiler and teawm, both can produce really great code!