Build OrbitRun with Smart Shape | Part 5: Find the flow
Logo

Try holding all the way up a hill. The ship loses speed when you want it to climb. In this part, you’ll make the difference between a good release and a late one easier to feel. Then you’ll give high flights more room on screen and let the pace rise during a run.

Continue from Part 4, or open OrbitRun-15-recovery.tap from the checkpoint pack. You’ll change some earlier settings here. Play between changes so you can feel which ones help.

The movement and camera lessons take inspiration from Andreas Illiger's Tiny Wings browser demo and the gameplay video. OrbitRun keeps its own original art and audio.

A downhill collection followed by a high glide and camera zoom in the completed rebuild

Recorded from the completed checkpoint, including the batteries added in Part 6. Watch the ship shrink and the visible stretch of terrain grow as it rises.

In the diagrams, REUSE means use the behavior you already added. For a reminder of the gestures, see connecting behaviors in Part 1. You can tap an image to open it at full size.

16. Make the downhill heavy and the uphill light

The useful release point is the valley, when the slope starts rising. Holding all the way to the crest spends the climb fighting the stronger gravity.

  1. Open Skimmer's behaviors. Select Generate and change the terrain settings below.
  2. Change Dive, Release, and Launch to the new values.
  3. Update both sides of the assist and cap pairs: the comparison and the velocity they apply must agree.
  • Generate: height 14 m, spacing 24 m, variation 28%, friction 0. The slopes redirect momentum into a climb.
  • Launch: X velocity 28 m/s, Y 0, for a stronger start.
  • Dive: object gravity X 0, Y −60, for a strong downhill pull.
  • Release: object gravity X 0, Y −4, for more time in the air.
  • Slow Check and Assist: if X velocity < 18, set X to 18; Maintain Y On. This helps recover from poor landings.
  • Fast Check and Speed Limit: if X velocity > 58, set X to 58; Maintain Y On. Good landings can build speed up to this cap.

New terrain settings applied while rebuilding the flight-feel lesson

  1. Change Dive Cue to DIVING / RELEASE AS THE HILL TURNS UP, and Glide Cue to GLIDING / PRESS INTO THE NEXT DOWNSLOPE.
  2. Update the title instructions to Hold on the downhill. Release on the uphill. Build speed, then soar.

Fly once without touching. On your next run, press downhill and lift at the valley. Watch how much higher you climb. Now try holding up the slope: you should feel the ship struggle against the stronger downward pull.

The hill redirects the ship’s motion as it slides along the surface. Easing gravity for the climb lets it carry more of that motion upward.

To tune the feel, change one value at a time. Try Release at −6 for a shorter flight, or Dive at −45 for a gentler press. Keep Flight Tick at 0.05 seconds while you compare. These gravity settings suit this ship and course; another game may need different ones.

17. Give the player room to see a landing

You need to see the next hill before you reach it. Move the ship toward the left of the screen, then pull the camera back during high flights.

Establish the framing

Keep Screen to Object and Zoom Screen open while adjusting this view.

  1. Select Camera, the Screen to Object behavior created in step 5. Target Skimmer, duration 0. Open its Anchor settings and set relative X to 450%, Y to 50%. This offset centers a point ahead of the ship, placing the ship toward the left side of the screen.
  2. Keep the existing connection from Camera’s bottom circle to Follow, using Screen Follow on Skimmer, both X and Y enabled. Screen Follow preserves the framing established by Screen to Object.

Screen to Object with the Anchor popover open: X 450%, Y 50%

  1. Set the initial Zoom Screen behavior, alias Zoom, to 75%, duration 0. Keep the HUD on Scene UI.

Calculate a zoom target from height

Add a new commented group, 17 Frame the landing and ease the zoom, following the diagrams below.

  • Camera Height (Get Position): Skimmer, Screen Coordinates Off
  • Camera Denominator (Add Values): A = Camera Height's Y Position; B = 2
  • Camera Ratio (Divide Values): A = 1800; B = Camera Denominator's result
  • Camera Near (If): Camera Ratio's result > 75
  • Camera Near Zoom (Zoom Screen): Zoom 75%, duration 0.45 s
  • Camera Far (If): Camera Ratio's result < 22
  • Camera Far Zoom (Zoom Screen): Zoom 22%, duration 0.45 s
  • Camera Air Zoom (Zoom Screen): Zoom from Camera Ratio's result, duration 0.45 s

Follow the guides below and leave the Zoom Screen outputs unconnected. Hud Tick will start each new camera update.

Read the ship’s height and calculate the zoom target on each HUD update.

Animated connection guide: Calculate the zoom target

  1. Reuse Hud Tick.
  2. Add Get Position named Camera Height. Connect a free bottom white circle on Hud Tick to Camera Height.
  3. Add Add Values named Camera Denominator. Connect a free bottom white circle on Camera Height to Camera Denominator.
  4. Add Divide Values named Camera Ratio. Connect a free bottom white circle on Camera Denominator to Camera Ratio.
  5. Add If named Camera Near. Connect a free bottom white circle on Camera Ratio to Camera Near.

If the target exceeds 75%, use 75%. Otherwise, check the other limit.

Animated connection guide: First, check the near limit

  1. Reuse Camera Near.
  2. Add Zoom Screen named Camera Near Zoom. Connect Camera Near’s bottom (true) circle to Camera Near Zoom.
  3. Add If named Camera Far. Connect Camera Near’s right (false) circle to Camera Far.

If the target is below 22%, use 22%. Otherwise, use the calculated value.

Animated connection guide: Then check the far limit

  1. Reuse Camera Far.
  2. Add Zoom Screen named Camera Far Zoom. Connect Camera Far’s bottom (true) circle to Camera Far Zoom.
  3. Add Zoom Screen named Camera Air Zoom. Connect Camera Far’s right (false) circle to Camera Air Zoom.

Let height control the zoom

Select the receiving behavior, drag the source output into Zoom (%), choose final value, and check the resulting reference

After you drop it, Zoom (%) contains Camera Ratio · final value. Set duration to 0.45 seconds.

Camera Air Zoom takes the Camera Ratio result and eases over 0.45 seconds

The relationship is target zoom = clamp(1800 / (world Y + 2), 22, 75). You build it with the behaviors in the list; do not paste that expression into a numeric input.

  • 22 m: 75% after the upper bound
  • 40 m: About 43%
  • 60 m: About 29%
  • 90 m: 22% after the lower bound

Watch the ship near the hills, then during a high glide. The course should occupy less of the screen as the ship rises. The score, energy, and buttons should remain the same size. If the HUD shrinks, it is on a world layer instead of Scene UI.

Hud Tick gives the camera a new target every 0.2 seconds. Each 0.45-second transition eases toward that target, so the zoom follows the climb smoothly. The limits keep the ship readable.

The formula assumes this course’s height and position. If you move the course down near or below Y −2, change the offset and guard against division by zero.

18. Increase the pace as the run continues

Add cruiseSpeed using the Object Attributes workflow shown in Part 1. Read it with Get Attribute.

Base the pace on elapsed time. Part 6 will add batteries that extend the flight. They should give the player more time at the current difficulty.

  1. Add an object attribute on Skimmer named cruiseSpeed, with initial value 18.
  2. Build the two groups shown below: calculate the pace, then apply it to the velocity checks.
  • Pace Progress (Multiply Values): A = Seconds' result; B = 0.12
  • Pace Base (Add Values): A = Pace Progress's result; B = 18
  • Pace Clamp (If): Pace Base's result > 36
  • Pace Max (Set Attribute): Skimmer, cruiseSpeed = 36
  • Pace Current (Set Attribute): Skimmer, cruiseSpeed = Pace Base's result
  • Pace Read (Get Attribute): Read Skimmer's cruiseSpeed
  • Pace Cap (Add Values): A = Pace Read's Attribute Value; B = 40
  1. The first guide gives Pace Progress two triggers: Seconds updates it during play; Generate initializes it at launch.
  2. Remove Velocity’s direct execution wires to Slow Check and Fast Check. The second guide routes both checks through Pace Read. Keep the existing rotation and feedback connections.
  3. Set Slow Check's second value and Assist's X velocity to Pace Read’s Attribute Value output.
  4. Set Fast Check's second value and Speed Limit's X velocity to Pace Cap’s result output. Keep Maintain Y On on both Set Velocity behaviors.

Calculate the minimum speed at launch and after every elapsed second.

Animated connection guide: Raise the cruise speed

  1. Reuse Seconds.
  2. Reuse Generate.
  3. Add Multiply Values named Pace Progress. Connect a free bottom white circle on Seconds to Pace Progress. Connect a free bottom white circle on Generate to Pace Progress.
  4. Add Add Values named Pace Base. Connect a free bottom white circle on Pace Progress to Pace Base.
  5. Add If named Pace Clamp. Connect a free bottom white circle on Pace Base to Pace Clamp.
  6. Add Set Attribute named Pace Max. Connect Pace Clamp’s bottom (true) circle to Pace Max.
  7. Add Set Attribute named Pace Current. Connect Pace Clamp’s right (false) circle to Pace Current.

Read the new minimum before checking the ship’s velocity.

Animated connection guide: Apply the changing pace

  1. Reuse Velocity.
  2. Add Get Attribute named Pace Read. Connect a free bottom white circle on Velocity to Pace Read.
  3. Reuse Slow Check. Connect a free bottom white circle on Pace Read to Slow Check.
  4. Add Add Values named Pace Cap. Connect a free bottom white circle on Pace Read to Pace Cap.
  5. Reuse Assist. Keep the existing true/bottom connection from Slow Check to Assist.
  6. Reuse Fast Check. Connect a free bottom white circle on Pace Cap to Fast Check.
  7. Reuse Speed Limit. Keep the existing true/bottom connection from Fast Check to Speed Limit.

Feed the new pace into assist

Select the receiving behavior, drag the source output into X velocity, choose attributeValue, and check the resulting reference

After you drop it, X velocity contains Pace Read · attributeValue. Keep Maintain X off and Maintain Y on.

Your minimum speed is 18 m/s at launch, 21.6 after 30 s, 25.2 after 60 s, and 28.8 after 90 s. It stops rising at 36 m/s. The horizontal speed limit stays 40 m/s above that minimum, reaching 76 m/s. A good downhill can carry the ship faster than the minimum.

Play long enough to feel the pace change. Later hills give you less time to react, but a good landing can still take you above the minimum speed.

The minimum helps the ship recover from poor landings. Lower its growth rate if the game gets difficult too soon. Keep the upper limit so a long run has a pace you can test and tune.

Next: Part 6: Battery pickups. Checkpoint 18-rising-pace contains everything in this part.