Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Kivy Blueprints

You're reading from   Kivy Blueprints Build your very own app-store-ready, multi-touch games and applications with Kivy!

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher Packt
ISBN-13 9781783987849
Length 282 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image