Monday, February 13th, 2012

First steps into Kivy

I just finished the Kivy tutorial on how to build a simple Pong Game. I must say, Kivy is a very interesting framework, and I plan on building some Android apps using it soon.

The framework makes heavy use of classes to describe each component of your application, and also has a simple language for rapidly building interfaces and binding them in Python. It has native support for multi-touch screens, which makes it an ideal platform to learn.

Tablets and smartphones are rather huge right now, and I don't see them going away anytime soon. Most users of a tablet or smartphone prefer an app over a website, I know I do. Kivy makes it relatively easy to create an app which is network connected, as it has native support for JSON calls, it manages the web request and decoding of the JSON object for you.

A small project I plan to implement using Kivy is a simple map viewer for the OHRRPGCE engine. I have previously created a full map editor in another language and understand the underlying file formats. I am curious how creating such an application in Kivy will fair. From what I have read in the documentations for Kivy, I will need to use a texture to map each map tileset onto. From these map tilesets, I would then blit the required tiles to a new texture for the actual map layers. I will use touch controls for panning the map around, similar to how Google maps works on a tablet. I hope to add features such as pinch to zoom and such, since Kivy does support scaling in OpenGL. I will explain the process throughout this blog for those who are interested in Kivy app development.

Another interesting project would be to create a Kivy app for this here blog, that way Android users can easily access this blog directly on their device using a nice user interface.

Comment #1: Posted 2 years, 9 months ago by Mathieu Virbel

You should check http://relet.github.com/kivyMaps/, it's a port of old maps in PyMT, done by an user. I don't know the status of this project, but it seem working in some way :)

http://www.youtube.com/watch?v=ugUxDY9Er9c

Comment #2: Posted 2 years, 9 months ago by Kevin Veroneau

Thank you, I will look into this project. I added KivyMaps to the Bookmarks section for future reference.

Comment #3: Posted 2 years, 4 months ago by pontus

Hey!
I just finished your pong tutorual and it was very good. I got a much better understanding for how Kivy works.

I am now trying to build it for Android. I have previously managed to build the painter tutorial (with some modifications) for Android so I know it works. But I can't get this build to work. It doesn't start. It looks like it starts and then immediately closes. But the app is still running. No window though.

Any ideas? Is there something I need?

About Me

My Photo
Names Kevin, hugely into UNIX technologies, not just Linux. I've dabbled with the demons, played with the Sun, and now with the Penguins.




Kevin Veroneau Consulting Services
Do you require the services of a Django contractor? Do you need both a website and hosting services? Perhaps I can help.

This Month

If you like what you read, please consider donating to help with hosting costs, and to fund future books to review.

Python Powered | © 2012-2014 Kevin Veroneau