A Guide to the Phaser Tween Manager
A Guide to the Phaser Tween Manager (The Book + Code)
$10.00
Minimum price
$15.00
Suggested price
A Guide to the Phaser Tween Manager

Last updated on 2014-12-19

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!

About the Author

Richard Davey
Richard Davey

Richard Davey is the lead developer of the Phaser game framework and long-time HTML5 gaming advocate.

Packages

The Book + Code

This bundle includes the book and full source code archive.

  • English

  • PDF

  • EPUB

  • MOBI

  • APP

$10.00
Minimum price
$15.00
Suggested price
The Book
  • English

  • PDF

  • EPUB

  • MOBI

  • APP

$5.00
Minimum price
$10.00
Suggested price

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

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. Free App. 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), EPUB (for phones and tablets), MOBI (for Kindle) and in the free Leanpub App (for Mac, Windows, iOS and Android). 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

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub