A Guide to the Phaser Tween Manager (The Book + Code)
A Guide to the Phaser Tween Manager
About the Book
Tweens have long been a staple of games. Used for all kinds of things, from making scenes fade out, to bouncing in logos to blending sounds. Phaser has a built in Tween Manager capable of doing these things and a lot more. This guide details in depth the different aspects of the Tween Manager, creating and using Tweens, setting all of their properties and lots more. You can see the full table of contents list below.
I have to confess that when I started out writing this book I had no idea it would end-up being quite as large as it turned out. I mean you're probably thinking you already know how to use tweens pretty well, and why would you possibly need a book about it?! But the tween system changed significantly in Phaser 2.2. It gained a lot of interesting new features and in order to explain it all properly, with plenty of interesting examples, I ended-up writing 120+ pages worth of content.
There is also an optional source code package available with over 65 example pieces of source code, in easy ready to run html files. Please see this forum thread for details and screen shots.
It covers using tweens in ways you may not have considered before, how to use the new tween timeline system in Phaser 2.2, how to chain multiple tweens together, respond to their events and cache them for re-use. The final section goes through 8 complete source examples and a full game.
Hopefully by the end of it you'll be left with lots of ideas that will inspire you to use them in more creative and unusual ways.
Happy tweening!
Packages
The Book
PDF
EPUB
WEB
English
The Book + Code
This bundle includes the book and full source code archive.
PDF
EPUB
WEB
English
Table of Contents
- Welcome
- What are tweens?
-
How Phaser manages tweens internally
- Source Files
-
Creating a Tween
- The Target Object to be Tweened
- Tween.to
- Tween.from
- TweenData Objects
-
Tween Settings
- Tween Properties
- Tween Duration
- Tween Ease
- Phaser.Easing method to short-code table
- Tween autoStart
- Tween Delay
- Tween Repeat
- Tween Yoyo
-
Easing
- Linear
- Back
- Bounce
- Circular
- Cubic
- Elastic
- Exponential
- Quadratic
- Quartic
- Quintic
- Sinusoidal
-
Tween Events
- onStart
- onRepeat
- onLoop
- onChildComplete
- onComplete
-
The Tween Timeline
- Repeat the whole timeline
- Looping the whole timeline
- Reverse the timeline during playback
- Adjusting the playback time scale
-
Tweening multiple properties
- Multi-tween Timelines
-
Chaining multiple Tweens
- Long Chains
- Generate Tween Data
-
Source Code Examples
- Example 1 - Position
- Example 2 - Scale
- Example 3 - Alpha
- Example 4 - Rotation
- Example 5 - Game Scores
- Example 6 - TileSprite Position and Scale
- Example 7 - WebGL Shaders / Filters
- Example 8 - Colors
- Full Game Example
- Credits
Other books by this author
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them