/kivy-study

Re-learning Kivy

Primary LanguagePython

Kivy Study

Refreshing myself with the basics of Kivy once more.

Kivy Official Docs

Best for API references.

https://kivy.org/doc/stable/guide/basic.html

Projects

KV Lang

It's possible to add some "scripting" to our kv files using the the pyexpander module.

This will allow us to have dynamic elements added to our kv files much like any html templating language (i.e. Jinja2)

Inclem Kivy Crash Course

I've found these tutorials a better way to get introduced to working with Kivy vs the official docs.

http://inclem.net/pages/kivy-crash-course/

https://github.com/inclement/kivycrashcourse

Entity Component Systems

ECS seems like a very sound architecture for creating games. I like that it follows the seperation of concerns principle much like a typical MVC/MTV pattern widely used in web development.

Entity component systems and you: They're not just for game developers

Seba's Lab

Python implementations

Kivy Notes

KivEnt is a highly performant ECS game engine for Kivy. It appears to still be in active development however, if you're planning to release your kivy game for mobile, its p4a recipe is currently broken.

I've tried building it from the update_recipes branch of its source but it didn't work for me. I might be able to make it work if I fix the sys.path issues (there's an error about unable to import Kivy on the build step) I am getting but it is beyond my understanding at the moment.

Perhaps it would be nice to simply adopt its architecture using purely just Kivy?

Building for Mobile

Command reference (Android)

Buildozer requires that you have a main.py as your application's entrypoint.

You will need to run the ff. commands from within your kivy project.

Initialize

buildozer init

Then edit the buildozer.spec file.

Deploy and run

buildozer -v android debug deploy run

Troubleshooting

When buildozer does not auto-install the Android SDKs

buildozer appclean
buildozer distclean
buildozer android debug