Side Projects have Projects as Side Effects
I went and did a thing. But why, why?
When I started playing with the idea of doing a sort-of-retro-80s-programming-environment called CobraPy I suspected one of the problems would be finding a graphics library that did what I wanted and had good performance.
I have used PyGame a little in the past but never liked it too much, so I tried Pyglet and it was working great ... until I tried to add something as simple as a widget to enter text. It doesn't really do widgets, for that you apparently use glooey
But glooey is ... I don't like it. And then I ran into a bug where you can either clean the contents of an EditableLabel
and set it to
focused without it crashing deep in its bowels. I worked around it by using fake mouse events to focus. And then noticed you can't type a
double quote in one of those widgets. So, I got pissed.
It literally took me less time to find a nice C game library, read a tutorial on CFFI, do minimal edits to its header file, learn how to use invoke and write my first program using it than I wasted chasing that glooey bug.
I may have hated pyglet + glooey so much I just went and looked for a nice C game library and did a wrapper in 10 minutes using cffi. pic.twitter.com/fEamIs5zQz
— Roberto H. Alsina (@ralsina) October 7, 2020
And now, the questions:
- Does it work well? How could I know, I only wrote the binding, I have not used it yet!
- Will I maintain it? I don't think it requires much maintaining.
- Will I release it? Maybe. It's here, mixed up with other stuff
... aaaaand someone else had already done it. https://pypi.org/project/raylib/ But that's raylib 2.6, current is 3.0 :-)