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

Creating an animated background

We are going to use the following images to create the background for our game:

Creating an animated background

Images for the background

Note that all of these can be seamlessly tiled horizontally—this isn't a strict requirement, but a desirable property nonetheless, as the background looks nicer this way.

As mentioned in the description, the background is always in motion, disconnected from the rest of the game. This effect can be achieved in at least two ways:

  • Using the straightforward approach, we can just move a huge textured polygon (or any number of polygons) in the background. Creating seamless looping animation in this case may require a bit of work.
  • A more efficient way to achieve the same visual effect is to create a number of static polygons (one per layer) that span the whole viewport, and then animate just texture coordinates. With a tileable texture, this approach produces seamless and visually pleasing results, and amounts to less work overall—there is no need...
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