TutorialsPush Lab

1  A Prepared Workshop

Goal

Build the chamber and place both carts at rest on their rails.

The game as it is at the end of this chapter. Click the game to play.

Push Lab - Discovery Workshop, Chapter 1 finishedMyth project · 2.0 MB

To open it, start Myth Engine, choose File › Open Project... and pick the downloaded file.

1.1 The Idea

The lamp is lit above a wooden bench. Two rails cross the chamber, and each has a cart waiting near its left end. The dial and printer belong to the painted room for now. They don’t respond yet.

This chapter gives that room its working pieces, before any push arrives. You can build the bench and run it. The carts will wait.

Each cart is an Object, a piece you can place in the game. Its Sprite supplies the picture, while its Collider supplies the shape that other bodies can meet. Those jobs stay separate. Changing a picture’s size doesn’t resize its Collider.

The pieces live in a Scene, the room Myth runs. A cart’s Scene position places the whole cart; its Sprite’s position places the picture inside it. Think of moving a picture inside its frame. The frame carries it.

Copper’s load pictures wait above its body. The pictures belong to Copper Cart, so later they can move with it. For now, you’ll see them waiting on the lower rail.

For this chapter, Making what a card shows covers the cards under Set up and Object and components. Its Logic passages will come into use next chapter.

1.2 The Plan

Chamber supplies the room’s picture. Tracks and stops give its painted rails physical shapes. Blue Cart and Copper Cart sit between the stops, while front lips cover the edges beneath them.

The Scene’s placement list brings those pieces together. No Logic runs yet.

1.3 Set Up

Make a new Blank 2D project named Push Lab - Discovery Workshop. Install the Starter Kit into this empty project with Add to This Project. The kit supplies every picture these cards ask for, including the small strips along the rails.

Push Lab - Discovery Workshop Starter KitMyth Pack · 1521 KB · every picture and sound

To install it, open Myth Engine, choose File › Install Myth Pack... and pick the downloaded file.

Rename the blank project’s Scene to Lab. The card’s Scene Lab (new) means this renamed starting Scene. Enter the card’s Game Settings from top to bottom, setting Pixels per Meter before the reference resolution. That order gives the Scene the same bottom edge as this workshop.

The placement list is for the Objects you’ll build below. Keep it beside you. After making each Object, place it in Lab using that row’s X and Y.

Set upWhat this chapter adds
ART (sprites, from the starter kit)
Chamber Art
Track Art
Stop Art
Blue Cart Art
Workshop blue-lip
Copper Cart Art
Workshop copper-lip
Workshop weight-2
Workshop weight-5
GAME SETTINGS > General > World Scale
Pixels per Meter40
GAME SETTINGS > Display > Reference Resolution
X960
Y640
GAME SETTINGS > Display > Rendering
Texture FilteringSmooth Textures
SCENELab (new)
Background Color#2C190F
GAME SETTINGS > General > Startup
Start SceneLab · 2D
SCENE Lab: PLACE THESE
ObjectXY
Chamber128
Blue Track13.37510.275
Blue Left Stop3.72510.975
Blue Stop2310.975
Blue Cart6.7510.975
Blue Track Front Lip13.310.5125
Copper Track13.3757.5
Copper Left Stop3.7258.2
Copper Stop238.2
Copper Cart6.758.2
Copper Track Front Lip13.37.7375

1.4 The Room

1.4.1 Chamber

The bench needs its room around it. Chamber Art carries the wood, glass and instruments in a single picture, with spaces for the moving pieces.

The Chamber Object holds that picture behind the apparatus. Its Bounding Box describes the Object’s extent; the Sprite’s Transform describes the picture itself. Match both sizes on the card.

ObjectChamber
Transform
Bounding Box > SizeX 24, Y 16
Sprite
Z Index Within Object-20
SpriteChamber Art
Transform > SizeX 24, Y 16

Run the Scene, and the room appears around the empty places where the carts will sit.

1.5 The Upper Rail

1.5.1 Blue Track

The upper rail is already painted into Chamber Art. Blue Track adds a shape along that rail, without drawing the same picture again.

Its Sprite stays invisible, while its Collider remains available for contact. The track stays stationary because Physics Object is Off, even after a moving cart reaches its shape. The track can stay still while a cart moves above it.

ObjectBlue Track
Transform
Bounding Box > SizeX 19.25, Y 0.5
Physics > Physics ObjectOff
Sprite
VisibleOff
Z Index Within Object-1
SpriteTrack Art
Transform > SizeX 19.25, Y 0.5
Collider
Shape and Transform > SizeX 19.25, Y 0.5

1.5.2 Blue Left Stop

The cart needs a boundary behind its starting place. Blue Left Stop puts a narrow shape at the rail’s left end, matching the stop already in the painting.

Its picture stays hidden too. Look for the Collider’s size and the stationary Transform setting on its card.

ObjectBlue Left Stop
Transform
Bounding Box > SizeX 0.45, Y 1.75
Physics > Physics ObjectOff
Sprite
VisibleOff
Z Index Within Object3
SpriteStop Art
Transform > SizeX 0.45, Y 1.75
Collider
Shape and Transform > SizeX 0.45, Y 1.75

1.5.3 Blue Stop

At the far end, Blue Stop closes the other side of the rail. Its picture stays hidden.

The rail now has a physical boundary at each end, ready to stop the cart later.

ObjectBlue Stop
Transform
Bounding Box > SizeX 0.45, Y 1.75
Physics > Physics ObjectOff
Sprite
VisibleOff
Z Index Within Object3
SpriteStop Art
Transform > SizeX 0.45, Y 1.75
Collider
Shape and Transform > SizeX 0.45, Y 1.75

1.5.4 Blue Cart

Now the upper rail gets its cart. Blue Cart Art supplies the blue body, and the Collider fits around that body.

This Object keeps its starting Physics Object setting on. It has no push yet, so running the Scene leaves it at rest. Later, native physics will move it.

ObjectBlue Cart
Transform
Bounding Box > SizeX 3.6, Y 0.9
Sprite
Z Index Within Object3
SpriteBlue Cart Art
Transform > SizeX 3.6, Y 0.9
Collider
Shape and Transform > SizeX 3.6, Y 0.9

1.5.5 Blue Track Front Lip

The rail’s front edge belongs in front of the cart’s lower edge. Blue Track Front Lip draws that thin strip over the join, so the cart sits inside the apparatus.

Its Z Index Within Object puts the strip in front. This lip needs no Collider.

ObjectBlue Track Front Lip
Transform
Bounding Box > SizeX 18.85, Y 0.075
Sprite
Z Index Within Object4
SpriteWorkshop blue-lip
Transform > SizeX 18.85, Y 0.075

The blue cart is on its rail.

1.6 The Lower Rail

1.6.1 Copper Track

The lower rail gives the Copper Cart its own lane. Copper Track works like Blue Track: a hidden picture, a stationary shape, and its own place in Lab.

You’ve already built this arrangement on the upper rail.

ObjectCopper Track
Transform
Bounding Box > SizeX 19.25, Y 0.5
Physics > Physics ObjectOff
Sprite
VisibleOff
Z Index Within Object-1
SpriteTrack Art
Transform > SizeX 19.25, Y 0.5
Collider
Shape and Transform > SizeX 19.25, Y 0.5

1.6.2 Copper Left Stop

Copper Left Stop waits behind the lower cart. Its size matches the upper lane’s left boundary; its Scene position puts it on this rail.

The card keeps its Sprite hidden. The stop you see on screen still comes from the chamber’s larger picture.

ObjectCopper Left Stop
Transform
Bounding Box > SizeX 0.45, Y 1.75
Physics > Physics ObjectOff
Sprite
VisibleOff
Z Index Within Object3
SpriteStop Art
Transform > SizeX 0.45, Y 1.75
Collider
Shape and Transform > SizeX 0.45, Y 1.75

1.6.3 Copper Stop

Copper Stop closes the lower rail’s far end. This is the same stationary boundary again, placed beside the Copper Cart’s lane.

The lower lane has both ends.

ObjectCopper Stop
Transform
Bounding Box > SizeX 0.45, Y 1.75
Physics > Physics ObjectOff
Sprite
VisibleOff
Z Index Within Object3
SpriteStop Art
Transform > SizeX 0.45, Y 1.75
Collider
Shape and Transform > SizeX 0.45, Y 1.75

1.6.4 Copper Cart

The Copper Cart arrives. The body is its first Sprite, and the load pictures are additional Sprites on the same Object.

Their names are Rear Load, Middle Load and Front Load. Give each added Sprite its own name and fields from the card. Their positions are local to the cart, so you don’t place them separately in Lab.

Blue keeps its starting Mass. The pictures let you see the difference before the first experiment measures it.

ObjectCopper Cart
Transform
Bounding Box > SizeX 3.6, Y 0.9
Physics > Mass10
Sprite
Z Index Within Object3
SpriteCopper Cart Art
Transform > SizeX 3.6, Y 0.9
Collider
Shape and Transform > SizeX 3.6, Y 0.9
Sprite(additional component)
NameRear Load
SpriteWorkshop weight-2
Z Index Within Object6.04
Transform > PositionX -1.125, Y 0.825
Transform > SizeX 0.625, Y 0.95
Sprite(additional component)
NameMiddle Load
SpriteWorkshop weight-2
Z Index Within Object6.05
Transform > PositionX -0.375, Y 0.825
Transform > SizeX 0.625, Y 0.95
Sprite(additional component)
NameFront Load
SpriteWorkshop weight-5
Z Index Within Object6.08
Transform > PositionX 0.375, Y 0.9
Transform > SizeX 0.75, Y 1.1

1.6.5 Copper Track Front Lip

The last strip covers the lower cart’s join with its rail. Copper Track Front Lip gives this lane the same finished edge as the upper one.

Place it using its own setup row. The finished strips now tuck both carts into the rails painted across the chamber.

ObjectCopper Track Front Lip
Transform
Bounding Box > SizeX 18.85, Y 0.075
Sprite
Z Index Within Object4
SpriteWorkshop copper-lip
Transform > SizeX 18.85, Y 0.075

1.7 Play It!

Run Lab and look closely.

  • Blue Cart waits on the upper rail, and Copper Cart waits below it.
  • The load pictures sit above Copper Cart, rather than at the Scene’s center.
  • Both carts remain at rest while you wait. Neither sinks through its rail.
  • Clicking the dial or pressing Space leaves the carts where they are. Those controls come later.
  • The front lips cover the rail joins without hiding the carts’ bodies.

1.8 How It Works

The chamber draws the room. The carts supply separate bodies. Tracks and stops supply stationary shapes, and the lips finish their edges.

A picture and a physical shape do different work. Keeping them separate lets the room look complete while its moving parts remain individual Objects. On this bench, rest is the first observation.

1.9 If It Didn’t Work

A cart seems to vanish? Start by comparing the Scene position with the setup card, before changing anything inside the cart. Find its row in the setup card and compare X and Y. Run Lab again; the cart should be back on its rail.

A rail looks doubled? Its painted version is already inside Chamber Art. Check Visible on the track’s Sprite, and keep that switch Off. Leave the Collider in place.

The Copper load sits away from its cart? Select Copper Cart’s additional Sprite and compare its local Transform with the card. Those positions belong inside the Object. Once corrected, the pictures sit together again.

An empty Scene can mean the Objects exist only in Resources. Open Lab and check its placement list. Add the missing Object there, then give it the setup row’s position.

1.10 Challenge

Choose another starting position for Blue Cart. Keep it between its stops, then run Lab and see the cart waiting where you chose. Restore the card’s position before continuing.

The finished bench holds both carts at rest, with the apparatus waiting around them. Next, your hand can move a cart.