Kivy – Interactive Applications and Games in Python - Second Edition
eBook - ePub

Kivy – Interactive Applications and Games in Python - Second Edition

Roberto Ulloa

Share book
  1. 206 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Kivy – Interactive Applications and Games in Python - Second Edition

Roberto Ulloa

Book details
Book preview
Table of contents
Citations

About This Book

About This Book

  • Utilize the power of Kivy to develop applications that run on all the major platforms
  • Build user interfaces (UI) and control multi-touch events to improve the user experience (UX)
  • A comprehensive tutorial with simplified code and lots of tips and tricks

Who This Book Is For

If you are a Python developer who wants to create exciting and dynamic UI/UX applications that are compatible with multiple platforms, then this is the book for you. No prior experience with Kivy is required, although you should be familiar with Python and have a fair understanding of software engineering concepts such as inheritance, classes, and instances.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on β€œCancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Kivy – Interactive Applications and Games in Python - Second Edition an online PDF/ePUB?
Yes, you can access Kivy – Interactive Applications and Games in Python - Second Edition by Roberto Ulloa in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Python. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781785284380
Edition
2

Kivy – Interactive Applications and Games in Python Second Edition


Table of Contents

Kivy – Interactive Applications and Games in Python Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. GUI Basics – Building an Interface
Basic interface – Hello World!
Basic widgets – labels and buttons
Layouts
Embedding layouts
PageLayout – swiping pages
Our project – Comic Creator
Summary
2. Graphics – the Canvas
Understanding the canvas
Drawing basic shapes
Adding images, colors, and backgrounds
Structuring graphic instructions
Rotating, translating, and scaling the coordinate space
Comic Creator: PushMatrix and PopMatrix
Summary
3. Widget Events – Binding Actions
Attributes, ID, and root
Basic widget events – dragging the stickman
Localizing coordinates – adding stickmen
Binding and unbinding events – sizing limbs and heads
Binding events in the Kivy language
Creating your own events – the magical properties
Kivy and its properties
Summary
4. Improving the User Experience
ScreenManager – selecting colors for the figures
Color control on the canvas – coloring figures
StencilView – limiting the drawing space
Scatter – multi-touching to drag, rotate, and scale
Recording gestures – line, circle, and cross
Recognizing gestures – drawing with the finger
Behaviors – enhancing widget's functionality
Style – decorating the interface
Factory – replacing a vertex instruction
Summary
5. Invaders Revenge – an Interactive Multi-touch Game
Invaders Revenge – an animated multi-touch game
Atlas – An efficient management of images
Boom – simple sound effects
Ammo – simple animation
Invader – transitions for animations
Dock – automatic binding in the Kivy language
Fleet – infinite concatenation of animations
Scheduling events with the clock
Shooter – multi-touch control
Invasion – moving the shooter with the keyboard
Combining animations with '+' and '&'
Summary
6. Kivy Player – a TED Video Streamer
Video – play, pause, and stop
AsyncImage – creating a cover for the video
Subtitles – tracking the video progression
Control bar – adding buttons to control the video
Slider – including a progression bar
Animation – hiding a widget
Kivy inspector – debugging interfaces
ActionBar – a responsive bar
LoadDialog – displaying a directory of files
ScrollView – displaying a list of videos
Search – query the TED Developer API
Summary
Index

Kivy – Interactive Applications and Games in Python Second Edition

Copyright Β© 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2013
Second edition: June 2015
Production reference: 1240615
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-692-6
www.packtpub.com

Credits

Author
Roberto Ulloa
Reviewers
Takumi Adachi
Philip Bjorge
Joe Dorocak
Vijay Mahrra
Edward C. Delaporte V
Commissioning Editor
Nadeem N. Bagban
Acquisition Editor
Nikhil Karkal
Content Development Editor
Amey Varangaonkar
Technical Editor
Ankur Ghiye
Copy Editor
Adithi Shetty
Project Coordinator
Suzanne Coutinho
Proofreader
Safis Editing
Indexer
Priya Sane
Graphics
Sheetal Aute
Disha Haria
Jason Monteiro
Production Coordinator
Nitesh Thakur
Cover Work
Nitesh Thakur

About the Author

Roberto Ulloa has a diverse academic record in multiple disciplines within the field of computer science. Currently, he is working with artificial societies as part of his PhD thesis at the University of Western Ontario. He obtained an MSc degree from the University of Costa Rica and taught programming and computer networking there. He has earned a living as a web developer, working with Python/Django and PHP/Wordpress. He collaborates with various researchers while also working on his own projects, including his blog (http://robertour.com). He constantly worries that the Internet has already become aware of itself and that we are not able to communicate with it because of the improbability of it being able to speak any of the 6,000-plus odd human languages that exist on the planet.

Table of contents