Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Multimedia Programming with Pure Data

You're reading from  Multimedia Programming with Pure Data

Product type Book
Published in Jul 2013
Publisher Packt
ISBN-13 9781782164647
Pages 350 pages
Edition 1st Edition
Languages
Author (1):
Bryan, Wai-ching CHUNG Bryan, Wai-ching CHUNG
Profile icon Bryan, Wai-ching CHUNG

Table of Contents (17) Chapters

Multimedia Programming with Pure Data
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Pure Data 2. Computer Graphics with the GEM Library 3. Image Processing 4. Interactivity 5. Motion Detection 6. Animation with Particle System 7. Audio Programming 8. Interface with the Outside World 9. Extending Pure Data Communities and References Index

Creating interactive animation


In the last section of this chapter, we are going to create an interactive animation. It is a simplified version of the classic Pong Game.

Before we get on with the Pure Data patch, we first draft a brief plan about the steps we have to do.

  • Animate the moving ball

  • Bounce the ball on the four margins

  • Create the paddle control

  • Keep and display the score

Animate the moving ball

We start with a ball that bounces around in the GEM window. Remember that we use the metro object to animate graphics in the Chapter 2, Computer Graphics with the GEM Library. To make a ball move, we change its position within the GEM window by using the translateXYZ object. Here is the first version of the patch Pong001.pd.

Changing the two number boxes for the translateXYZ object will move the ball around. In order to create an animation, we need to use the metro object to automate the changing of the numbers. In Chapter 2, Computer Graphics with the GEM Library, we have used a counter object...

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 $15.99/month. Cancel anytime}