- Learn
- Tutorials
- Physics Labs
- Push Lab
- 1 A Prepared Workshop
1 A Prepared Workshop
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.
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.
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.
40960640Smooth Textures#2C190FLab · 2D1.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.
X 24, Y 16-20Chamber ArtX 24, Y 16Run 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.
X 19.25, Y 0.5OffOff-1Track ArtX 19.25, Y 0.5X 19.25, Y 0.51.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.
X 0.45, Y 1.75OffOff3Stop ArtX 0.45, Y 1.75X 0.45, Y 1.751.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.
X 0.45, Y 1.75OffOff3Stop ArtX 0.45, Y 1.75X 0.45, Y 1.751.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.
X 3.6, Y 0.93Blue Cart ArtX 3.6, Y 0.9X 3.6, Y 0.91.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.
X 18.85, Y 0.0754Workshop blue-lipX 18.85, Y 0.075The 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.
X 19.25, Y 0.5OffOff-1Track ArtX 19.25, Y 0.5X 19.25, Y 0.51.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.
X 0.45, Y 1.75OffOff3Stop ArtX 0.45, Y 1.75X 0.45, Y 1.751.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.
X 0.45, Y 1.75OffOff3Stop ArtX 0.45, Y 1.75X 0.45, Y 1.751.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.
X 3.6, Y 0.9103Copper Cart ArtX 3.6, Y 0.9X 3.6, Y 0.9Rear LoadWorkshop weight-26.04X -1.125, Y 0.825X 0.625, Y 0.95Middle LoadWorkshop weight-26.05X -0.375, Y 0.825X 0.625, Y 0.95Front LoadWorkshop weight-56.08X 0.375, Y 0.9X 0.75, Y 1.11.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.
X 18.85, Y 0.0754Workshop copper-lipX 18.85, Y 0.0751.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.
