Open soywiz opened 2 years ago
Any update on this?KorGE would definitely need a editor integrated with the IDE and other things like a panel with resources, and a previw of game in a split window
JCEF would require an extra layer, compiling Kotlin.JS, we would need to solve interoperability. Not reflection on JS like on JVM, so most of the features are not available. This has been a long standing problem when switched from JTransc to Kotlin multiplatform, and since the Kotlin Compiler doesn't provide an standard stable API, making a compiler plugin seemed pretty risky and a lot of work.
Could for example run the code on the JVM, and have a AG implementation that redirects to JS via JS calls or a socket. But JCEF runs at 30fps and I was not able to get better performance, which is a pretty bad user experience.
Also updating the intellij plugin is time-consuming because each experiment requires a re-run, and there is no hot reloading.
And building with VSCode...? It have instantaneus reloading... it is pure HTML and JS and VSCode have Kotlin extensions already https://github.com/fwcd/kotlin-language-server + https://github.com/fwcd/vscode-kotlin
Hey man. So you are proposing using VSCode instead of IntelliJ for the editor? I tried VSCode sometime ago and the experience was really limited and didn't work properly at least with multiplatform projects, so I'm not sure. Maybe worth exploring, since that would be aligned with the direction I wanted of going to open web standards specially now that we have WASM & soon WebGPU, but I don't know. Having code + editor/running gamewindow with hotreloading in split window would be awesome indeed, and being able to develop the IDE stuff with hotreloading would be awesome too. In any case my current bandwidth is really really limited and it is going to last at least a couple of months so I won't have that much time in the short term to do an spike in that direction. But maybe we can explore that later, thanks for the idea.
Anyway, it has been a while, wanna meet this Saturday? ping me if so, I have some news to share :)
Since IDEA 2022.2 it uses JDK 17 and on mac it uses metal, and right now it crashes. Since JCEF is in newer versions, by using an HTML editor we could avoid all kind of issues and focus on full window rendering getting more time to implement metal. We should expose an external interface to the editors to have bidirectional communication between the plugin and the editor. We could also export the editor in a web page and/or as an application.