新 探索 Scratch 積木辭典、核心概念、專題教學與課堂教學指南

開始學習 →

Scratch 實作解法:How to Make a Character Jump with Gravity in Scratch

📌 本頁學習重點

先完成最小可運作版本,確認邏輯正確後再加入美術、音效與關卡變化。 Use a y-velocity variable and constant gravity pull for smooth parabolic jumping.

核心觀念與實作步驟: Minimal Working Block Recipe

先完成最小可運作版本,確認邏輯正確後再加入美術、音效與關卡變化。

Use a y-velocity variable and constant gravity pull for smooth parabolic jumping.

Test this minimal version first, then tune numbers like speed, gravity, or timing to match your game feel.

Make a Character Jump with Gravity script
  1. when green flag clicked
  2. set [y vel] to 0
  3. forever
  4. if <key [space] pressed? and touching [Ground]?> then set [y vel] to 14
  5. change [y vel] by -1
  6. change y by y vel

動手試試看: The sprite arcs smoothly upward and lands cleanly on the ground.

測試檢查與延伸練習: Debugging Checklist & Next Steps

按下綠旗前先預測結果,並觀察變數與座標數值是否符合預期。

If it behaves unexpectedly, verify initial variable resets on the green flag and check that continuous checks sit inside a forever loop.

All 120 Scratch How-To Recipes Return to the reverse lookup index. 查看詳情 →

測試檢查與延伸練習

按下綠旗前先預測結果,並觀察變數與座標數值是否符合預期。

返回分類總覽 Scratch 目的反查辭典 查看詳情 → 關於 Scratch大全(編輯方針與品質標準) 認識 Scratch大全 如何在10種語言中提供系統化的 Scratch 積木辭典、教科書、實作專案與開放教學資料。 查看詳情 →

本指南僅供學習參考。Scratch 介面與使用條款可能會隨版本更新而變動,請一併參考 Scratch 官方網站說明。