In this video
- Adding a Physics Pile and fitting its box
- Settled while you edit, dropping in Play - the same heap
- Pieces: round, square, mixed; colours; glossy; how many; size; size variety
- Your own pictures (up to six)
- Drop in or start piled; gravity, bounce, grip and drop rhythm
- Touch: tap scatters, tap pops one, no tap; grab and throw
- The Pile Settled event
- Three tips
About this video
The Physics Pile is an object for playable ads built from scratch: a box of real rigid bodies - coins, candies, gems or the product itself - that drop in when the scene starts, collide and settle into a heap, and react to the viewer's touch. Its box is the floor and the walls, sizes are shares of that box, and the heap you see while editing is the heap the exported ad settles into. This tutorial builds a jackpot reward screen and changes every setting while the pile plays, so each one is seen dropping. It finishes with the Pile Settled event, which fires when every piece is at rest.
Playable Ads Maker - build playable ads and end cards, export to 13 ad networks.
Transcript
Gems that pour in, pile up and settle - then scatter when you tap them, and fly when you throw one. That's one object, running real physics, with no code.
That's the Physics Pile. In this video: every setting - the pieces and your own pictures, gravity, bounce and grip, how they drop, what a tap does, and the event that fires when the pile comes to rest.
Here's a reward screen I started from scratch. Add New Object, Physics Pile.
Read the full transcriptShow less
Its box is the floor and the two walls, and the top is open. I'll fit it over this glass tray: X 30, Y 170, 315 wide and 320 tall.
While you edit, the pile is drawn already settled, and clicking it doesn't knock it over - so it never gets in the way of your layout.
Press Play, and it drops in from above. And the heap it lands in is the one you saw while editing, piece for piece, on every phone.
Here's the useful part: while it plays, every change you make drops the pile again. So let's go through the settings, one drop at a time.
Pieces sets the shape. Square pieces stack and tip over. Mixed throws in both. Round rolls and spreads out.
With no pictures, each piece is a colour drop, in up to six colours. I'll turn the red one gold.
Glossy adds the shine. Switch it off for a flat, cartoon look - then back on.
How many sets the number of pieces, up to 50. Forty makes it a proper treasure pile.
Piece size is a share of the box's width. Big pieces make a chunky pile. Small ones pour like sand. I'll settle in between.
Size variety mixes big and small. At zero every piece is identical. Turned up, it looks like a handful of loose change.
Now your own pictures: coins, candy, your product. Click a slot and upload. Up to six, cycled across the pieces - and they replace the colours.
Four gems, and the jackpot looks like a jackpot.
Drop in pours the pieces from above when the scene starts. Start piled shows the heap already there, waiting to be scattered.
Gravity sets how fast they fall. Turned down, they drift in like snow. Turned right up, they slam into the tray.
Bounce is how lively a landing is. At 90%, every gem springs back up before it settles.
Grip is friction. With none, the pieces slide into a flat, level layer. With a lot, they catch on each other, and the top of the heap stays lumpy.
Drop rhythm is the gap between pieces. At zero they all fall at once, in one burst. Longer gives a steady trickle, like a slot machine paying out.
Then touch. Tap scatters sends every piece near your finger flying.
Tap pops one flicks just the piece you touched up into the air.
No tap makes the pile pure decoration: a tap does nothing.
And with this box ticked, a piece can be grabbed and thrown. It knocks the others as it lands. Untick it, and a drag is just a tap.
The Events tab has Pile Settled. It fires once every piece has come to rest - so the reward lands before anything else moves. I'll give the title a Feel Effect: Punch.
Press Play. The gems land, the pile goes still, and the title punches. Scatter it, and when it settles again, it fires again.
And like any object, the pile has an Animate tab, for an entrance, a loop or an exit.
Three tips. One: twenty to forty pieces looks full. Fifty is the most, and every piece is work for the phone.
Two: pick pictures with a compact shape. A piece collides as a circle or a square, so a long, thin picture leaves gaps around it.
Three: give the pile a reason. It reads as a reward, so drop it at the moment the player earns one.
Next up: Play Sound Effect - instant game sounds, with no audio file.
That's the Physics Pile. See you in the next video!