Book Image

Kivy Blueprints

Book Image

Kivy Blueprints

Overview of this book

Table of Contents (17 chapters)
Kivy Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
The Python Ecosystem
Index

Index

A

  • Adaptive Multi-Rate codec / Recording sound
  • adb logcat command / Reading logs from the device
  • Ad hoc, with GLSL
    • about / Ad hoc usage of atlases with GLSL
    • data structure, for UV mapping / Data structure for UV mapping
    • atlas loader, writing / Writing an atlas loader
    • sprites, rendering from atlas / Rendering sprites from atlas
  • Advanced Audio Coding / Recording sound
  • Android
    • emulating / Emulating Android
  • android.media.MediaRecorder$AudioEncoder class / Using the native API
  • android.media.MediaRecorder$AudioSource class / Using the native API
  • android.media.MediaRecorder$OutputFormat class / Using the native API
  • android.media.MediaRecorder class / Using the native API
  • android.os.Environment class / Using the native API
  • Android packages
    • URL / Major caveat – permissions
  • animated background, Flappy Bird game
    • creating / Creating an animated background
    • tileable textures, loading / Loading tileable textures
    • Background widget / The Background widget
    • implementing / Animating the background
  • animation
    • customizing / Customizing the animation
    • NoTransition / Customizing the animation
    • SlideTransition / Customizing the animation
    • SwapTransition / Customizing the animation
    • FadeTransition / Customizing the animation
    • WipeTransition / Customizing the animation
    • FallOutTransition / Customizing the animation
    • RiseInTransition / Customizing the animation
  • Animation API / Implementing the move() method
  • apktool
    • URL / Major caveat – permissions
  • app
    • testing, on Android / Testing on Android
  • application logic, of client
    • about / Application logic of the client
  • application structure, Starfield app / Application structure
  • artificial intelligence (AI) / What makes 2048 a good choice of project?
  • atlas
    • sprites, rendering from / Rendering sprites from atlas
  • atlas loader
    • writing / Writing an atlas loader

B

  • 2048 board game
    • about / About the game
    • URL / About the game
    • gameplay concepts / Gameplay concepts and overview
    • overview / Gameplay concepts and overview
    • random encounters / Randomness, or lack thereof
    • project outline / The 2048 project outline
    • features / What makes 2048 a good choice of project?, Simplicity as a feature
    • creating / Creating the 2048 board
    • Board widget, creating / Creating the 2048 board
    • resize() method / Creating the 2048 board
    • cells, reviewing / Going through cells
    • empty cells, rendering / Rendering empty cells
    • board data structure / Board data structure
    • passability, testing / Testing passability
    • tiles, creating / Making tiles
    • game logic, implementing / Implementing the game logic
  • background color
    • changing / Changing the background color
  • bcrypt / Concepts and parallelism
  • Bfxr
    • URL / Producing sound effects
    • about / Producing sound effects
    • usage / Producing sound effects
  • Board.move() method / Moving tiles
  • board data structure, 2048 board game
    • about / Board data structure
    • variable naming / Variable naming
    • reset(), calling / Calling reset()
  • border property / Using 9-patch images
  • BoxLayout container
    • about / The starting point
  • build() method / Application structure
  • bullets, game
    • creating / Making bullets
  • buttons
    • styling / Styling buttons
    • subclassing / Subclassing the buttons
    • coloring / Coloring buttons
    • new button class, creating / A new kind of button
    • palette, defining / Defining the palette
  • buttons, styling
    • 9-patch scaling / 9-patch scaling
    • 9-patch images, using / Using 9-patch images

C

  • canvas
    • about / A very short introduction to the canvas
    • clearing / Clearing the canvas
  • chat log presentation
    • improving / Enhancements and eye candy
    • enhancing / Enhancements and eye candy
  • chatroom screen layout
    • about / Chatroom screen layout
    • overscroll modes / Overscroll modes
  • chat server
    • writing / Writing the chat server
    • protocol definition / The protocol definition
    • server source code / The server source code
    • principle, of operation / The principle of operation
    • testing / Testing the server
  • class hierarchy
    • about / Class hierarchy
    • PSWidget renderer class / The PSWidget renderer class
    • Particle class / The Particle class
  • clock
    • ticking / Making the clock tick
    • time, updating on screen / Updating the time on the screen
    • widgets binding, properties used / Binding widgets using properties
  • Clock.schedule_interval method / Making the clock tick
  • Clock.schedule_once method / Making the clock tick
  • Clock App
    • starting point / The starting point
  • clock design / Design inspiration
  • collision detection / Collision detection
  • color palette
    • about / The color palette
    • buttons, subclassing / Subclassing the buttons
    • deselect option, disabling / Taking away the ability to deselect
    • buttons, coloring / Coloring buttons
  • connection
    • establishing, with server / Bringing the app online
  • constants, ALL_CAPS
    • FLOOR / An overview of the pipe properties
    • PCAP_HEIGHT / An overview of the pipe properties
    • PIPE_GAP / An overview of the pipe properties
  • corresponding GLSL
    • writing / Writing a corresponding GLSL
  • cross-application interoperability
    • about / Cross-application interoperability
  • CSS (Cascading Style Sheets) / Reducing repetition
  • CSS colors
    • using / Changing the background color
  • custom fonts
    • loading / Loading custom fonts
  • custom shaders
    • using, in Kivy / Using custom shaders in Kivy
  • custom shaders, Kivy
    • about / Using custom shaders in Kivy
    • geometry, building / Building the geometry
    • OpenGL indices / Illustrating the Indices
    • GLSL, writing / Writing GLSL

D

  • dataReceived() method / The principle of operation
  • data structures, Starfield app / Data structures and initializers
  • data types, GLSL
    • float / Storage classes and types
    • vec2, vec3, vec4 / Storage classes and types
    • mat2, mat3, mat4 / Storage classes and types
    • sampler2D / Storage classes and types
  • Date.now() / Endless loop of screenshots
  • deselect option, simultaneously
    • disabling / Taking away the ability to deselect
  • device
    • logs, reading from / Reading logs from the device
  • Document Object Model (DOM) / Passing events
  • don't repeat yourself (DRY) / Reducing repetition
  • dots
    • connecting / Connecting the dots
  • DRY principle
    • about / Binding widgets using properties

E

  • embedded systems (ES) / Unscientific introduction to OpenGL
  • enemies, game
    • implementing / Implementing enemies
    • collision detection / Collision detection
  • EventLoop.ensure_window() function / Mouse cursor
  • events
    • passing / Passing events

F

  • files
    • deleting / Deleting files
  • finishing touches, game
    • about / Finishing touches
  • Flappy Bird game
    • project overview / Project overview
    • animated background, creating / Creating an animated background
    • pipes, creating / Making pipes
    • Kivy Bird, introducing / Introducing Kivy Bird
    • collision detection / Collision detection
    • game over state / Game over
    • sound effects, producing / Producing sound effects
  • Flask web server
    • about / The Flask web server
  • Flat UI color palette
    • using / Enhancements and eye candy
  • Flat UI style guide
    • URL / The color palette
  • Font Book / Using the icon font in Kivy
  • FontForge editor
    • URL / Loading custom fonts
  • Font Squirrel
    • URL / Rationale for using icon fonts
  • Font Squirrel library
    • URL / Design inspiration
  • fragment shader (pixel shader) / Concepts and parallelism

G

  • game
    • writing / Writing the game
    • stars, implementing / Implementing stars
    • spaceship, creating / Making a spaceship
    • trail of fire, creating / Creating a trail of fire
    • bullets, creating / Making bullets
    • enemies, implementing / Implementing enemies
  • game.atlas texture map
    • textures / Writing the game
  • game logic implementation, 2048 board game
    • about / Implementing the game logic
    • tiles, moving / Moving tiles
    • tiles, combining / Combining tiles
    • tiles, adding / Adding more tiles
    • game over state / Game over
    • improvements / Where to go from here
  • game over state, 2048 board game
    • about / Game over
    • winning condition / The winning condition
    • loss condition / The loss condition
  • Genymotion
    • URL / Emulating Android
  • get_color_from_hex function / Changing the background color
  • GLSL
    • about / Taking a closer look at GLSL
    • writing / Writing GLSL
  • GLSL, writing
    • storage classes / Storage classes and types
    • data types / Storage classes and types
    • basic shaders / Basic shaders
    • procedural coloring / Procedural coloring
    • colorful vertices / Colorful vertices
    • texture mapping / Texture mapping
  • Google Fonts
    • URL / Rationale for using icon fonts
  • grid structure
    • about / The grid structure
    • visual attributes / Visual attributes

H

  • Hypertext Transfer Protocol (HTTP) / The server

I

  • icon fonts / Icon fonts
  • initializers, Starfield app / Data structures and initializers
  • input-output (IO) / Writing platform-dependent code
  • iOS 7 color swatches
    • URL / The color palette

J

  • $() jQuery function / Endless loop of screenshots
  • Java classes
    • loading / Loading Java classes
  • JavaScript client
    • about / JavaScript client
    • continuous screencast, displaying / Endless loop of screenshots
    • clicks, passing to host / Passing clicks to host
  • JavaScript Object Notation (JSON) / Atlas structure
  • jQuery / JavaScript client

K

  • Kivy
    • tags / Formatting text
    • features / Writing platform-dependent code
    • URL / Emulating Android
    • icon font, using / Using the icon font in Kivy
    • custom shaders, using / Using custom shaders in Kivy
  • Kivy Bird
    • introducing to Flappy Bird game / Introducing Kivy Bird
  • Kivy Bird implementation, Flappy Bird game
    • revised application flow / Revised application flow
    • user input, accepting / Accepting user input
    • gravity, implementing / Learning to fly straight down
    • Flappy Bird-style jumpy flight, implementing / Remaining in flight
    • bird, rotating / Rotating the bird
  • Kivy documentation
    • URL / Formatting text
  • Kivy GitHub account
    • URL / Major caveat – permissions
  • Kivy integration, with Twisted
    • about / Kivy integration with Twisted
    • ChatClient / ChatClient and ChatClientFactory
    • ChatClientFactory / ChatClient and ChatClientFactory
  • Kivy language
    • self / Stopwatch controls
    • root / Stopwatch controls
    • app / Stopwatch controls
  • Kivy manual
    • URL / Implementing the move() method
  • Kivy Remote Desktop app
    • about / Kivy Remote Desktop app
    • login form / The login form
    • remote desktop screen / The remote desktop screen
    • continuous screenshots, displaying / Loop of screenshots in Kivy
    • clicks, sending / Sending clicks
    • new features, implementing / What's next

L

  • layout
    • about / Layout basics
    • finalizing / Finalizing the layout
    • repetition, reducing / Reducing repetition
  • line thickness
    • setting / Setting the line thickness
    • line width, changing / Changing the line width
  • line width
    • changing / Changing the line width
  • load_atlas() function / Rendering sprites from atlas
  • login screen layout / Login screen layout
  • logs
    • reading, from device / Reading logs from the device
  • lower_len property / An overview of the pipe properties

M

  • matrices
    • URL / Basic shaders
  • mesh / Concepts and parallelism
  • Metro UI
    • about / Metro UI
    • features / Metro UI
    • buttons / The buttons
    • grid structure / The grid structure
    • scalable vector icons / Scalable vector icons
  • MicroSoft Developer Network (MSDN)
    • URL / Emulating clicks
  • model / Concepts and parallelism
  • Modern Pictograms font
    • URL / Using the icon font in Kivy
  • Modern UI
    • about / Modern UI
    • clock design / Design inspiration
    • custom fonts, loading / Loading custom fonts
    • text, formatting / Formatting text
    • background color, changing / Changing the background color
  • mouse cursor, Paint app / Mouse cursor
  • multitouch emulation, Paint app / Multitouch emulation

N

  • named classes / Named classes
  • native API
    • using / Using the native API
    • Java classes, loading / Loading Java classes
    • storage path / Looking up the storage path
    • sound, recording / Recording sound
    • sound, playing / Playing sound
    • files, deleting / Deleting files
  • new button class
    • creating / A new kind of button
  • Node.js
    • about / Writing the chat server

O

  • OOP (object-oriented programming) / Subclassing the buttons
  • OpenGL
    • unscientific introduction / Unscientific introduction to OpenGL
    • unscientific introduction / Unscientific introduction to OpenGL
    • concepts / Concepts and parallelism
    • parallelism / Concepts and parallelism
    • performance gains / Performance gains, or lack thereof
    • performance, improving / Improving performance
    • GLSL / Taking a closer look at GLSL
  • OpenGL indices / Illustrating the Indices
  • overscroll modes, chatroom screen layout / Overscroll modes
    • ScrollEffect / Overscroll modes
    • DampedScrollEffect / Overscroll modes
    • OpacityScrollEffect / Overscroll modes

P

  • 9-patch images
    • using / Using 9-patch images
  • 9-patch scaling / 9-patch scaling
  • Paint app
    • root widget / Setting the stage
    • screen, clearing / Clearing the screen
    • dots, connecting / Connecting the dots
  • Paint app, appearance
    • about / Fine-tuning the looks
    • visual appearance / Visual appearance
    • window size / Window size
    • mouse cursor / Mouse cursor
    • multitouch emulation / Multitouch emulation
  • palette
    • defining / Defining the palette
  • Particle class / The Particle class
  • permissions, sound
    • URL / Major caveat – permissions
  • Personal Home Page (PHP)
    • about / Advanced server functionality – taking screenshots
  • Pillow
    • about / Advanced server functionality – taking screenshots
    • URL / Advanced server functionality – taking screenshots
  • pipes, Flappy Bird game
    • creating / Making pipes
    • pipe properties / An overview of the pipe properties
    • texture coordinates, setting / Setting texture coordinates
    • implementing / Implementing pipes
    • spawning / Spawning pipes
    • moving / Moving and recycling pipes
    • recycling / Moving and recycling pipes
  • pip reference
    • URL / The server
  • platform-dependent code
    • writing / Writing platform-dependent code
    • Pyjnius, defining / Introducing Pyjnius
    • Android, emulating / Emulating Android
  • principle, of operation
    • about / The principle of operation
  • procedural coloring, GLSL / Procedural coloring
  • project overview, Flappy Bird game
    • about / Project overview
    • background / Project overview
    • obstacles (pipes) / Project overview
    • playable character (the bird) / Project overview
  • properties
    • used, for binding widgets / Binding widgets using properties
  • protocol definition / The protocol definition
  • PSWidget renderer class / The PSWidget renderer class
  • Pygame documents
    • URL / Mouse cursor
  • pygame_compile_cursor() function / Mouse cursor
  • Pyjnius
    • defining / Introducing Pyjnius
    • URL / Introducing Pyjnius
  • Python
    • features / Writing platform-dependent code
  • Python client
    • building / Building a simple Python client
  • Python standard library reference
    • URL / Updating the time on the screen

R

  • #RRGGBB color format
    • URL / Changing the background color
  • raster images / Rationale for using icon fonts
  • ratio property / An overview of the pipe properties
  • Remote Desktop app
    • server / The server
    • JavaScript client, developing / JavaScript client
    • Kivy Remote Desktop app / Kivy Remote Desktop app
  • repetition
    • reducing / Reducing repetition
    • named classes / Named classes
  • Requests library
    • URL / Sending clicks
  • reset() method / The Particle class
  • reusable particle system
    • designing / Designing a reusable particle system
    • class hierarchy / Class hierarchy
  • root widget / Setting the stage
  • rounds per second (RPS) / Making bullets

S

  • scalable vector icons
    • about / Scalable vector icons
    • icon fonts / Icon fonts
    • raster images / Rationale for using icon fonts
    • icon font, using in Kivy / Using the icon font in Kivy
  • screen
    • time, updating on / Updating the time on the screen
    • touches, displaying on / Displaying touches on the screen
    • clearing / Clearing the screen
    • events, passing / Passing events
    • canvas, clearing / Clearing the canvas
  • screen manager
    • about / Screen manager
    • animation, customizing / Customizing the animation
    • login screen layout / Login screen layout
    • chatroom screen layout / Chatroom screen layout
  • server, Remote Desktop app
    • about / The server
    • Flask, installing / The server
    • Flask web server / The Flask web server
    • advanced server functionality / Advanced server functionality – taking screenshots
    • clicks, emulating / Emulating clicks
  • server source code / The server source code
  • shoot-em-up game
    • limitations / Limitations of the project
  • Simple DirectMedia Layer (SDL) / Mouse cursor
  • size_hint property / Finalizing the layout
  • Skeuomorphism
    • about / Modern UI
  • sound
    • recording / Recording sound
    • playing / Playing sound
  • sound, recording
    • permissions / Major caveat – permissions
  • sound effects, Flappy Bird game
    • producing / Producing sound effects
    • Kivy sound playback / Kivy sound playback
    • adding / Adding sound to the Kivy Bird game
  • spaceship, game
    • creating / Making a spaceship
  • special syntax
    • about / Escaping the special syntax
  • sprites
    • rendering, from atlas / Rendering sprites from atlas
  • StackOverflow thread
    • URL / Clearing the canvas
  • Starfield.update_glsl() method / Advancing the scene
  • Starfield app
    • creating / Making the Starfield app
    • application structure / Application structure
    • data structures / Data structures and initializers
    • initializers / Data structures and initializers
    • scene, advancing / Advancing the scene
    • corresponding GLSL, writing / Writing a corresponding GLSL
  • Starfield class / Application structure
  • stars, game
    • implementing / Implementing stars
  • stopwatch
    • time, formatting for / Formatting the time for stopwatch
    • placing / Putting a stopwatch in place
    • controls / Stopwatch controls
  • storage classes, GLSL
    • attribute / Storage classes and types
    • uniform / Storage classes and types
    • varying / Storage classes and types
  • storage path, native API
    • about / Looking up the storage path
    • logs, reading from device / Reading logs from the device
  • strftime formatting essentials
    • %S / Updating the time on the screen
    • %M / Updating the time on the screen
    • %H / Updating the time on the screen
    • %I / Updating the time on the screen
    • %d / Updating the time on the screen
    • %m / Updating the time on the screen
    • %B / Updating the time on the screen
    • %Y / Updating the time on the screen
  • strftime function
    • limitations / Formatting the time for stopwatch

T

  • Tango palette
    • URL / The color palette
  • text
    • formatting / Formatting text
  • texture atlases
    • about / Texture atlases at a glance
    • creating / Creating an atlas
    • structure / Atlas structure
    • Kivy atlases, using / Using Kivy atlases in an easy way
    • Ad hoc, using with GLSL / Ad hoc usage of atlases with GLSL
  • tile movement, 2048 board game
    • implementing / Moving tiles
    • iteration sequence, controlling / Controlling the iteration sequence
    • move() method, implementing / Implementing the move() method
    • touch controls, binding / Binding touch controls
    • turns, synchronizing / Synchronizing turns
  • tiles, 2048 board game
    • creating / Making tiles
    • font_size parameter / Tile initialization
    • number parameter / Tile initialization
    • color parameter / Tile initialization
    • number_color parameter / Tile initialization
    • initializing / Tile initialization
    • resizing / Resizing tiles
  • time
    • updating, on screen / Updating the time on the screen
    • counting / Counting time
    • formatting, for stopwatch / Formatting the time for stopwatch
    • values, computing / Computing values
    • stopwatch, placing / Putting a stopwatch in place
  • time to live (TTL) / Creating a trail of fire
  • ToggleButton behavior
    • overriding / Overriding the standard behavior
  • touch.ud property / Connecting the dots
  • touches
    • displaying, on screen / Displaying touches on the screen
  • touches, drawing
    • canvas / A very short introduction to the canvas
  • touches, Paint app
    • drawing / Drawing touches
  • trail of fire, game
    • creating / Creating a trail of fire
  • Twisted framework
    • about / Writing the chat server
  • tx_pcap property / An overview of the pipe properties
  • tx_pipe property / An overview of the pipe properties

U

  • UI integration
    • about / UI integration
  • uniforms / Concepts and parallelism
  • upper_len property / An overview of the pipe properties
  • upper_y / An overview of the pipe properties
  • UV mapping
    • data structure, used for / Data structure for UV mapping

V

  • values
    • computing / Computing values
  • vCenter attribute / Data structures and initializers
  • vertex format
    • vCenter / Rendering sprites from atlas
    • vPosition / Rendering sprites from atlas
    • vTexCoords0 / Rendering sprites from atlas
  • vertex shader / Concepts and parallelism
  • vertices / Concepts and parallelism
  • visual appearance, Paint app / Visual appearance
  • visual attributes / Visual attributes
  • VM package
    • installation / Emulating Android
  • vPosition attribute / Data structures and initializers
  • vScale attribute / Data structures and initializers
  • vTexCoords0 attribute / Data structures and initializers

W

  • widgets
    • binding, properties used / Binding widgets using properties
  • window size, Paint app / Window size