# 60 Essential Scratch Game Mechanics & How to Code Them > Master 60 reusable Scratch game mechanisms—from hitboxes, scrolling cameras, timers, and lives to combo multipliers, save codes, and single-tick engines. 60 practical Scratch game mechanics with clean block patterns, principles, pitfalls, and practice challenges. ## Browse All 60 Game Mechanisms Every great game combines a handful of clean, reusable mechanics. Pick any mechanism below to learn both how it works and why it stays bug-free. - [Accurate Hit Detection & Hitbox Swapping](/en/mechanisms/hit-detection/): Separate visual costumes from rectangular collision hitboxes for fair hits. - [Horizontal Scrolling Camera (Camera X)](/en/mechanisms/horizontal-scroll/): Keep the player centered while scrolling wide stages with (worldX - camX). - [Vertical Scrolling Camera (Camera Y)](/en/mechanisms/vertical-scroll/): Build tower climbers and vertical space shooters with Camera Y tracking. - [Countdown Round Timer & Time-Up Trigger](/en/mechanisms/timer-limit/): Count down seconds cleanly and broadcast time-up at zero. - [Extra Lives & Respawn System](/en/mechanisms/extra-lives/): Decrement lives on hit, respawn safely, and trigger game over at 0. - [Multi-Level Stage Progression (Level 1 -> 2 -> 3)](/en/mechanisms/level-progression/): Advance levels with a level variable and a single load-level broadcast. - [Fair Random Spawning (Avoid Clustering)](/en/mechanisms/random-spawning/): Re-roll spawn x positions that land too close to the previous spawn. - [Hit Combo Score Multiplier](/en/mechanisms/combo-multiplier/): Scale score rewards on rapid hits and reset when the combo timer expires. - [Impact Knockback & Recoil Physics](/en/mechanisms/knockback-recoil/): Push sprites away from the attacker with directional x and y velocity. - [Camera Screen Shake on Explosions & Hits](/en/mechanisms/screen-shake-fx/): Apply brief random camera offsets for punchy arcade feedback. - [Invincibility Frames (i-Frames) & Blinking](/en/mechanisms/invincibility-blink/): Protect the player for 1 second after damage with ghost-effect flashing. - [Wall Slide & Wall Kick Platformer Mechanic](/en/mechanisms/wall-slide-jump/): Cap falling speed against walls and launch diagonally on jump press. - [Slippery Ice Floor & Surface Friction](/en/mechanisms/ice-friction/): Switch horizontal friction coefficients between 0.78 (normal) and 0.95 (ice). - [Hold-to-Charge Power Shot](/en/mechanisms/charge-attack/): Increment a charge variable while holding space and fire scaled shots on release. - [Corner Minimap & Live Radar](/en/mechanisms/minimap-radar/): Scale world coordinates by 1/12 to plot live positions inside a HUD box. - [Copyable Save Code (Password System)](/en/mechanisms/save-password/): Encode level and coins into a joined string so players can resume anytime. - [Clean Pause & Resume Toggle](/en/mechanisms/pause-resume/): Skip movement, AI, and timers cleanly while paused = 1. - [Dynamic Difficulty Scaling Curve](/en/mechanisms/difficulty-scaling/): Shorten spawn delays as score climbs while enforcing a fair minimum cap. - [Ability Cooldown Timer](/en/mechanisms/cooldown-gauge/): Prevent special-move spam with a ticking cooldown variable. - [Stamina Drain & Auto-Regeneration](/en/mechanisms/stamina-bar/): Drain stamina during sprints and regenerate smoothly while walking. - [Ammo Counter & Timed Reloading](/en/mechanisms/ammo-reload/): Track remaining shots and pause briefly to reload at zero. - [Breakable Energy Shield (Hit Counter)](/en/mechanisms/shield-durability/): Absorb 3 hits on shield durability before HP takes damage. - [Smooth Curved Homing Steering](/en/mechanisms/homing-steering/): Turn gradually toward target angles each frame for realistic missiles. - [Progressive Enemy Wave Director](/en/mechanisms/wave-director/): Monitor enemies-remaining and launch escalating waves automatically. - [Multi-Phase Boss Fight (50% HP Shift)](/en/mechanisms/boss-phases/): Trigger faster attacks and visual changes when boss HP drops below half. - [Weighted Enemy Loot Drop Table](/en/mechanisms/loot-drop-table/): Roll 1–100 to drop coins, hearts, or rare power-ups on defeat. - [Tiered Upgrade Shop (Lv1 -> Lv5)](/en/mechanisms/shop-upgrade/): Scale upgrade cost and power cleanly with each level purchased. - [List-Based Item Inventory & Consumption](/en/mechanisms/inventory-slots/): Add picked-up items to a list and delete on use to trigger effects. - [2-Ingredient Crafting System](/en/mechanisms/crafting-combine/): Check list membership for two materials and craft a new item. - [Branching Choice Dialogue System](/en/mechanisms/dialogue-branch/): Wire player choice buttons to distinct story broadcasts and flags. - [4-State Quest Tracker (Available -> Complete)](/en/mechanisms/quest-tracker/): Track quest status (0–3) and objective counters cleanly. - [In-Game Day/Night Clock & Lighting](/en/mechanisms/day-night-cycle/): Cycle time 0–24 with brightness shifts and nighttime spawns. - [Dynamic Weather System (Sun / Rain / Snow)](/en/mechanisms/weather-system/): Switch weather states periodically with matching particles and friction. - [Real-Time Clock & Day-of-Week Events](/en/mechanisms/day-of-week-event/): Use sensing current hour/day blocks for morning and weekend greetings. - [Speed-Based Turn Order Queue](/en/mechanisms/turn-order-queue/): Compare agility stats to decide who acts first each RPG turn. - [Tile-Snapped Grid Movement (32px Steps)](/en/mechanisms/grid-path-move/): Move smoothly in 8×4px increments locked to a clean tile grid. - [Sokoban Crate-Pushing Collision](/en/mechanisms/push-block/): Check one tile beyond the crate before moving player and crate together. - [Multi-Switch & Linked Door System](/en/mechanisms/switch-door-link/): Use a door-state list (0/1) so each color switch controls its matching door. - [Conveyor Belt Moving Floor](/en/mechanisms/conveyor-belt/): Add constant horizontal push whenever the sprite touches belt tiles. - [Trampoline / Spring Bounce Pad](/en/mechanisms/spring-bounce/): Set high upward y-velocity and play a bounce animation on contact. - [Crumbling Platform with Respawn](/en/mechanisms/crumbling-floor/): Shake for 0.6s, hide collision, and reappear after 3 seconds. - [Circular & Ping-Pong Trap Paths](/en/mechanisms/moving-saw-path/): Drive spinning hazards along sin/cos circles or linear tracks. - [Two-Way Warp Portal with Cooldown](/en/mechanisms/portal-teleport/): Prevent infinite teleport loops with a 0.5-second warp lock. - [Mid-Level Checkpoint Flag](/en/mechanisms/checkpoint-flag/): Overwrite respawnX and respawnY when passing a checkpoint banner. - [Time-Attack Ghost Replay System](/en/mechanisms/ghost-recording/): Record best-run x/y lists and replay them as a translucent ghost sprite. - [Smooth Lerp Camera Zoom](/en/mechanisms/camera-zoom-smooth/): Ease zoom scale toward a target multiplier for dramatic scenes. - [Multi-Layer Parallax Depth Scrolling](/en/mechanisms/parallax-layers/): Scroll sky at 0.2×, hills at 0.5×, and foreground at 1.0× camera speed. - [Gravity Particle Burst & Confetti](/en/mechanisms/particle-burst/): Give cloned particles random vx/vy and fade ghost effect to 100. - [Floating Damage Number Popups](/en/mechanisms/floating-damage-num/): Float cloned hit numbers upward while fading out over 0.5s. - [Custom Stamped Sprite Score Counter](/en/mechanisms/custom-digit-hud/): Stamp 0–9 digit costumes inside a no-refresh custom block. - [Single-Pen Smooth Health Bar](/en/mechanisms/pen-health-bar/): Draw a gray track and proportional green fill bar with zero costumes. - [Typewriter Dialogue with Voice Blips](/en/mechanisms/typewriter-sfx/): Play a short blip on every non-space character revealed. - [Automatic Line-Wrapping Text Renderer](/en/mechanisms/auto-wrap-text/): Reset x and drop y when line character count exceeds the box width. - [Undo History Stack Using a List](/en/mechanisms/undo-redo-stack/): Push state snapshots before each move and pop the last entry on Undo. - [Weighted Rarity Probability Rolls](/en/mechanisms/weighted-gacha/): Use clean cumulative thresholds (1–3 Rare, 4–18 Uncommon, 19–100 Common). - [No-Duplicate Deck Draw System](/en/mechanisms/no-dup-shuffle/): Delete drawn indices from a working list for guaranteed unique draws. - [Separate BGM & SFX Volume Channels](/en/mechanisms/audio-channel-mix/): Isolate music and sound effects on separate sprites for independent sliders. - [On-Screen Touch Controls for Tablets](/en/mechanisms/touch-dpad-mobile/): Combine touch button variables with keyboard keys via OR blocks. - [Delta-Time Sync (30 FPS & 60 FPS Safe)](/en/mechanisms/fps-delta-sync/): Multiply speeds by timer delta so games feel identical in Scratch & TurboWarp. - [Single Tick Broadcast Game Engine](/en/mechanisms/single-tick-engine/): Order movement, collision, camera, and rendering from one master loop. Updated: 2026-11-23 Author: [Takamasa Suzuki](https://scratch.gmnavi.jp/about/author/) Japanese Edition: https://scratch.gmnavi.jp/mechanisms/ [Scratch Daizen (English)](https://scratch.gmnavi.jp/en/)