Open rubyFeedback opened 2 years ago
Thanks for bringing glimmer to my attention. Also happy to see that it is a decade old by now, according to the oldest git tags, so it probably won't go away in the blink of an eye.
I'd be glad to have a solid UI solution for use with Gosu, but I also feel that this is an area that would be relatively easy for external contributors to work on (unlike Gosu's internal C++ RenderState architecture and all that). I'm so short on hobby hacking time these days that I'm trying to focus on the C++ core and nothing else.
Even though I'd prefer any code to land in an external repository, I'll leave this ticket open as an invitation for others to work on.
Hey there Julian,
I have been playing with gosu a few months ago; then I made a stop mostly to focus on other things.
I did test quite many games. Some are quite nice, like that billiard game from that japanese dev. :D
Anyway...
There is a general GUI project called "glimmer", by Andy. Note: I am not affiliated with Andy, but I do give feedback (even if he doesn't want it :D). glimmer is a general purpose DSL for GUI-related widgets.
For those unaware, see https://github.com/AndyObtiva/glimmer.
It has support for gtk, libui (which, by the way, works out-of-the-box on windows), opal/rails (I think rails too, but mostly opal I guess), tk, and some java thingy, jwt or swt or something like that.
I half-jokingly suggested to Andy a few months ago to add support for gtk, and he kind of did! \o/ Some things are missing as of right now compared to tk, but by and large it did not take him long to add support for gtk. Hopefully if he ever gets to read this here, he will extend support for gtk :D (right now he focuses mostly on libui for various reasons; solid windows support is one thing, but also because I think he invested quite a lot of work to get libui up-to-par, whereas gtk was mostly based on an ad-hoc issue - at the least to get the basic stuff to work, such as buttons ... and it works! So a bit like a demo-concept right now, in regards to gtk. tk and libui work very well though).
I also suggested to add support for gosu one day. :D
Here I remembered that Julian added a few GUI "widgets" to gosu, such as an entry field (user input field), we also have buttons, we can respond to key events, we can draw ... so in theory, glimmer should support this one day (hopefully; evidently Andy has only a finite amount of time available, as most of us do I guess).
So, the FIRST goal of this issue is to get Julian and everyone else to hear about glimmer, if you guys didn't know it yet.
BUT!
There is a SECONDARY goal too ... I'd love to see gosu-support for (and in) glimmer one day.
I don't know how much work it would be. While Andy is super-efficient, a day has only 24 hours, and we all don't know how much time he will have available at any given time in the future (nor Julian or anyone else, I totally get it. Right now Andy is super-active but who knows what will be in 3 months from now, so ... we can not be certain of the future).
Hopefully glimmer would have support for gosu one day.
But I think what would be nice to have is if there could be code added to gosu that makes sense for a GUI-related widget toolset. Perhaps an API specifically for that.
I don't have any preference here, but, for instance, when I use buttons, I tend to do this:
So kind of like a mini-DSL.
I think any support within gosu directly may be useful here. Again, the above is just an example; I think if Julian or others read the glimmer DSL then they may get an idea what could be useful in this regard. And, perhaps "bridge the gap", e. g. if some "official" widgets would be part of gosu that would be great. One I could think of is anything that allows for scolling widgets, e. g. you have text, then you click a button or on a scroll-wheel, and it can scroll down or up. Things like that.
So another goal of this issue request here is to ask Julian whether he thinks this would be useful. Now, I don't expect lots of people to use gosu+SDL in this regard, other than perhaps linux users (windows users probably will use libui, because this works after you do "gem install libui", whereas getting gosu to work on windows is perhaps a bit more effort - not sure), but it would be nice if glimmer could offer simple support for gosu as-is. Just to see how far glimmer can get us. :D (It would be even cooler if we could use that to autogenerate and then compile C code. Now THAT would be epic ... write ruby, create C, enjoy the speed and power of C ...)
Actually Andy also added two basic games, tetris and snake, so it would be cool if these work on gosu eventually. But anyway, I will stop here - this is mostly to get Julian to know about glimmer, and who knows! Perhaps one day we may have glimmer + gosu unite as a big-fat-toolkit for GUI stuff in ruby. (I'd even love to see qtruby get back to life, but when qt5 came out the devs who worked on that became inactive ... :( )