Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python, Kivy and Android Game [closed]

I want to create a game for Android and want to try something new.

I really love python and want to use it for developing an Android game.

Game is not simple, it would be 3D RPG game. I found Kivy Crossplatform Framework and PyGame. I really liked both but I'm not sure if Python would be the right for me.

  • Is it easy to deploy python games on android?
  • Can Pygame handle 3D action game on android?
like image 401
Irakli Lekishvili Avatar asked Nov 29 '13 07:11

Irakli Lekishvili


People also ask

Why Python Kivy is not popular?

basically runs on donation from people like you and me and some organisations and this is unlike other frameworks that are (or were) backed by giants like google or Facebook. So, kivy might lack marketing funds, making it less popular among other frameworks but it's still a preferred choice in python ecosystem.

Can Kivy apps run on Android?

You can run Kivy applications on Android, on (more or less) any device with OpenGL ES 2.0 (Android 2.2 minimum). This is standard on modern devices; Google reports the requirement is met by 99.9% of devices.

Is BeeWare better than Kivy?

BeeWare and Kivy are the two best Python mobile application development frameworks. Both frameworks have acceptable GUI frameworks. However, the real difference appears in the look and feel of the final product. Kivy is a mature framework, whereas BeeWare is young and still in the development phase.

Can I use Kivy with Android studio?

The widgets added in Kivy could be handled within Android Studio. Moreover, Android views could be added to enrich the Kivy application. The resulting Android application created with Kivy can be hosted on Google Play to download and install as a regular Android application.


1 Answers

I don't think there is a python solution with strong 3d support at the moment, and certainly not with strong ready-rolled tools to make a complex 3d game easy.

Basic pygame doesn't really have 3d support - you can see this previous question for some specific answers, but essentially it's mostly a wrapper for the 2d sdl graphics library. Of course you can do pseudo-3d by managing all the 2d projection yourself (expect this to be slow though), and I think in principle you can directly call opengl and display the results (there are a few examples), but pygame doesn't offer much help to you there.

Kivy works by doing everything in opengl, and in principle does support access to the 3d opengl es api, including fully three dimensional vertex manipulation, as well as shaders etc.. For instance, one of its examples is a 3d rotating monkey head. However, in its current state the framework works almost entirely in 2D, there is no abstraction of apis like camera, lighting. It should be possible to add them with enough effort and there has been a little work on it recently, but it doesn't exist right now. You can do a youtube search for kivy 3d for some simple examples of 3d stuff in kivy. On the flip-side, kivy is quite powerful and easy to use for deploying python apps on android, so that part at least is covered.

So, neither of these provide all the tools you need for a complex 3d game, though I think kivy is closer. If anything, your best bet might be to integrate kivy with an external graphics library if possible. For instance, this video shows a kivy app using the pandas 3d game engine for a fully 3d interactive city model in a museum. Something like this might let you do what you want on android, but I really don't know (it's just conjecture), and even if it's technically possible there would be lots of complexity on the way like integrating the library with kivy and compiling it for android - if the latter is even possible.

I don't want to sound pessimistic, but I think none of this is an easy project. However, I also don't have a strong idea of what would be involved if just using java and an existing popular game engine, and I don't know a lot about the details of kivy's opengl potential. If you're interested I suggest asking at the kivy mailing list or irc channel - even if you get the same answer, you can probably get someone who can answer more confidently than me!

like image 103
inclement Avatar answered Oct 21 '22 01:10

inclement