Introducing Kivy Bird
Next on our list is the playable character, that is, the biologically improbable Kivy Bird:
There will be nothing fancy related to textures this time; in fact, the Bird
class will be derived from Kivy's Image
widget (kivy.uix.image.Image
) to completely avoid doing any clever rendering whatsoever.
In kivybird.kv
we need a bare minimum of properties involving the bird image depicted earlier; its initial position and size are given as follows:
Bird: id: bird pos_hint: {'center_x': 0.3333, 'center_y': 0.6} size: (54, 54) size_hint: (None, None) source: 'bird.png'
This is the initial implementation ...
Get Kivy Blueprints now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.