Hello, I'm looking for simple GUI and/or graphic l...
# education
m
Hello, I'm looking for simple GUI and/or graphic library. I really like Compose but I think it is not ideal for beginners but I will use it with more experienced pupils. I also tried the Java library laterna. It like that it is really simple. Obviously the results are not appealing. I also think that Swing and JavaFX are not very easy to use. Do you have a hint for a library for very simple use cases like programming an arcade game(snake, pong..) or an currency-converter? I only need this library to draw rectangles, show text and get input from the user.
g
Hi! Have you tried OPENRNDR? It is used for creative coding. It is not simple in configuration, but you can just open official example and modify already existing sample.
👍 1
a
@MaximilianH what kind of framework do you want? Drawing buttons and drawing games is quite different. If you want a game, then indeed OpenRNDR or Korge will do nicely. If you want an interface with buttons and databinding, you can use something build atop of Compose or JavaFX. It is also quite easy to render SVG in a notebook like I've done here https://www.youtube.com/live/ypxFTLuo6ao?si=g3B_SrLzPgRutCSG. But it is not easy to geed signals back.
👍 1
m
I will have al deeper look at Korge an OpenRNDR. Can you explain what you mean by build atop of Compose?
The problems I see with Compose an OpenRNDR are that the are frameworks and a lot of pupils have problems to understand basic concepts like functions and loops.
g
It seems to me that designers have a problem with large frameworks as well. That's why OPENRNDR's "getting started" tutorial looks like "just clone the template and don't understand what's inside". And that's why they even have "What's Gradle?" section. I don't know how to setup OPENRNDR manually as well. But it was very easy for me to start using OPENRNDR with the template set up ignoring everything out of
src/main/kotlin
(except for directories with resources, obviously).
a
@MaximilianH like https://kobweb.varabyte.com/ Also you could look at https://github.com/nacular/doodle. I never tried it. But it seems to have your problem in mind.
m
@altavir Thank you very much for this link.
@Gleb Minaev I really like what openRNDR can produce but I I don't like its heaviness for working with beginners. I think the ideal beginner library for graphics is something like ncurses or turtle graphics but thats not very appealing.
a
@MaximilianH Another idea for you is just to create a starter wrapper on top of OpenRNDR. You can even do it via notebook plugin.
m
@altavir Thank you very much. Can you give me a small expample of how such a wrapper coulb be implemented?
a
@MaximilianH Sorry for the late reply, I was on a short vacation. The documentation is rather good: https://github.com/Kotlin/kotlin-jupyter/blob/master/docs/libraries.md We use jupyter plugins for Plotly: https://github.com/SciProgCentre/plotly.kt/blob/master/plotlykt-jupyter/src/jvmMain/kotlin/space/kscience/plotly/PlotlyIntegration.kt and VisionForge. There is also this video, where I show basics of UI functionality using SVG canvas: https://www.youtube.com/live/ypxFTLuo6ao?si=9lNpLLZayGee49lQ
103 Views