5 ms·
I've never used Kivy. Is it really all that great? I mean, the last time I looked at it, it seemed like it has a lot of moving parts that are all pretty heavy
by thehardsphere 9y ago
I've never used Kivy. Is it really all that great?
I mean, the last time I looked at it, it seemed like it has a lot of moving parts that are all pretty heavy that you could just use directly if you really wanted to and still get similar results. Like how they were (didn't check if they still are) using pygame to interface with SDL to do rendering a lot of other things. I've seen other projects that used pygame on mobile devices that were able to do it without all of the extra complexity that Kivy layers on. Pygame isn't that hard to use, so if I know how to use it, why would I use Kivy?
- inclemnet 9y ago> Like how they were (didn't check if they still are) using pygame to interface with SDL to do rendering a lot of other things. Kivy only ever used Pygame for SDL's backend management, drawing has always used OpenGL. We actually no longer use Pygame by default, having moved instead to SDL2. There are also alternative backends for almost everything, e.g. a direct X11 window backend on Linux, or the rpi window backend that does not require X. > I've seen other projects that used pygame on mobile devices that were able to do it without all of the extra complexity that Kivy layers on Do you have any examples? I'm aware of almost none, or any active build tools for Pygame. I've been wondering if the best way to use Pygame on Android would be via pygame_sdl2 using Renpy or python-for-android, but it would be nice to find an alternative. > all of the extra complexity that Kivy layers on. Pygame isn't that hard to use, so if I know how to use it, why would I use Kivy? I'm not sure what is meant by 'extra complexity' unless you're referring to Kivy itself being an extra module to install. Kivy isn't a Pygame wrapper, but its own toolkit with a very different, OpenGL based drawing API. It's probably also more performant, especially when optimised (e.g. KivEnt http://kivent.org/ http://kivent.org/). Even ignoring performance etc., you'd want to use Kivy if you just prefer how it works (but you don't have to feel that way). Beyond this, Kivy doesn't just have the graphics API but an entire widget toolkit. It also directly supports both Android and iOS, although as above perhaps I'm not aware of current Pygame efforts.
- thehardsphere 9y ago>Kivy only ever used Pygame for SDL's backend management, drawing has always used OpenGL. We actually no longer use Pygame by default, having moved instead to SDL2. There are also alternative backends for almost everything, e.g. a direct X11 window backend on Linux, or the rpi window backend that does not require X. Ahh, OK. I'll have to check that again. It's been more than a few years since I last looked at it. I guess though I did find the idea of using pygame just for SDL to be kind of... blunt. Though there weren't very many other good python to SDL wrappers (which is like, not all of what pygame is used for). >> I've seen other projects that used pygame on mobile devices that were able to do it without all of the extra complexity that Kivy layers on >Do you have any examples? I'm aware of almost none, or any active build tools for Pygame. I've been wondering if the best way to use Pygame on Android would be via pygame_sdl2 using Renpy or python-for-android, but it would be nice to find an alternative. I was actually thinking of Renpy or python-for-android. Again, my initial impressions about this are several years old, and I didn't actually get that far past the initial evaluation of it for what I was thinking of using it for before moving on to other projects. > I'm not sure what is meant by 'extra complexity' unless you're referring to Kivy itself being an extra module to install. Kivy isn't a Pygame wrapper, but its own toolkit with a very different, OpenGL based drawing API. It's probably also more performant, especially when optimised (e.g. KivEnt http://kivent.org/ http://kivent.org/). Even ignoring performance etc., you'd want to use Kivy if you just prefer how it works (but you don't have to feel that way). I think I didn't at the time, because I already felt kind of comfortable with how SDL/pygame did things. But I should look into that again. >Beyond this, Kivy doesn't just have the graphics API but an entire widget toolkit. It also directly supports both Android and iOS, although as above perhaps I'm not aware of current Pygame efforts. Yeah, I didn't need the widgets at the time either, and mobile was only a secondary concern. I should look at Kivy again one of these days...
- inclemnet 9y ago> I guess though I did find the idea of using pygame just for SDL to be kind of... blunt Yeah, I think this was a pragmatic choice (it was before I was involved at all), but it was never that great. SDL2 has solved a lot of problems and is much easier to support. > I was actually thinking of Renpy or python-for-android. python-for-android is Kivy's own Android build tool, which nowadays is a separate project. It supports multiple backends, but doesn't really support pygame except as a Kivy backend (which is not maintained much any more). It does support SDL2, so you can use e.g. PySDL2 to make Android apps. I think Renpy also moved to SDL2, probably also due to issues supporting Pygame, although last I checked they use a fork of Kivy's older python-for-android toolchain.
- usmeteora 9y agoKivy has embedded Opengl, and is really easy to learn. You can make dashboards extremely easy, and video games with working physics engines in less than twenty minutes. Overall, its basic settings are beautiful. I havn't used Pygame but I don't consider Kivy to be heavy with alot of moving parts at all. Not to mention, unlike many Python libraries and platforms, this one has good documentation. Defined but simple and no handwaving techniques. if you are familiar with Javascript, Kivy employs similiar callback like ideas, but not specific mechanism, to animate physics engines based on WebGL, which bind very nicely to it's widget resources. In fact, if I had to choose a platform in which to teach middle school aged kids to code video games, Kivy would be it. That being said, I've only used it for a desktop app kind of like in sandbox a environment. But in regards to your heavy comments, when it comes to Python, I honestly have to say anything build in Python when it comes to any type of SDL rendering, even scaled webapps, are limited for distributed systems and exponential scaling. Python is great for learning, and college apps, and even dynamic languages for high level engineering analysis but when it comes to scaling for webapps or in maybe your case you are talking about RAM and power usage for phone apps, anything with Python is generally never a top choice. If you think Kivy is hard, I recommend downloading it and going through one of their two tutorials, a ping pong game and a paint app. I honestly can't see how you would think its heavy or overly complicated unless you are not familiar with widgets, or graphics period. in general, OpenGl and WebGl is a definite win over strictly javascript based graphical rendering so if that is the gap that makes it complex, read up on OpenGl and WebGL because that is where the future is going even on the web.
- thehardsphere 9y agoYeah, I didn't get the sense that it was hard or overly complicated in the sense that I couldn't understand it. It was more that my impression was Kivy was adding quite a bit more than I wanted for the project I was considering using it for. So when deciding between, SDL2 in C/C++ (which I could totally do, but this was a side project for fun, so would I really want to if I didn't have to?), Pygame (which didn't support SDL2 at the time, which was a small problem), some of the other smaller python game libraries which look dead now, and Kivy, I didn't necessarily see the point in using Kivy if mobile wasn't a priority for me, which it wasn't.