Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Kivy Blueprints
  • Toc
  • feedback
Kivy Blueprints

Kivy Blueprints

By : Vasilkov
3.7 (10)
close
Kivy Blueprints

Kivy Blueprints

3.7 (10)
By: Vasilkov

Overview of this book

This book is intended for programmers who are comfortable with the Python language and who want to build desktop and mobile applications with rich GUI in Python with minimal hassle. Knowledge of Kivy is not strictly required—every aspect of the framework is described when it's first used.
Table of Contents (12 chapters)
close
10
A. The Python Ecosystem
11
Index

Making the Starfield app


Armed with our newfound knowledge of GLSL, let's build a starfield screensaver, that is, a non-interactive demonstration of stars fleeing from the center of the screen to its sides, under the influence of an imaginary centrifugal force or something.

Tip

As dynamic visual effects are hard to describe unequivocally and screenshots aren't very helpful in this regard either, run the code that accompanies the chapter to get a better idea of what's going on.

Conceptually, each star goes through the same action sequence:

  1. It spawns randomly near the center of the screen.

  2. The star moves in the opposite direction from the screen center until it's no longer visible.

  3. Then it respawns, going back to square one.

We will also make stars accelerate and grow in size as they approach the edges of the screen to simulate the faux depth.

The following screenshot attempts (or, to be more specific, fails due to the highly dynamic nature of the demo) to illustrate what the end result will look...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete