Create Shark Game in Scratch: Duplicate Sprites & Adjust Speeds
Building Your Predator-Prey Game Mechanics
Creating multiple interactive elements is crucial for engaging gameplay. In predator-prey games like our shark example, duplicating sprites saves development time while allowing customization. The core process involves:
- Right-clicking your base sprite (e.g., edible fish)
- Selecting "Duplicate" from the context menu
- Modifying attributes for each new instance
Sprite Duplication Workflow
Duplication clones both the visual asset and its scripts. For our fish:
- After duplicating Sprite2, you instantly get identical fish behavior
- Each clone operates independently with its own movement logic
- No need to rebuild collision detection or scoring systems
Critical adjustment: Always reposition duplicates to prevent overlapping spawns. Drag them to new starting coordinates before testing.
Customizing Movement Parameters
Varying enemy speeds creates dynamic challenge levels. Modify the move [ ] steps block in each sprite:
| Speed Type | Step Value | Gameplay Effect |
|---|---|---|
| Slow Fish | 2 steps | Easier targets |
| Medium Fish | 5 steps | Balanced challenge |
| Fast Fish | 10 steps | High-difficulty prey |
Pro Tip: Test speed extremes first. If 10-step fish move too fast, players get frustrated. If 2-step fish are too slow, gameplay feels sluggish.
Implementing Scoring Systems
When your shark sprite touches fish:
- Use
when I receive [eat_fish]event - Increment
scorevariable by +1 - Hide the fish sprite with
hideblock - Trigger repositioning logic
when I receive [eat_fish]
change [score v] by (1)
hide
go to x: (random position) y: (random position)
show
Advanced Game Design Techniques
Beyond basic duplication, enhance gameplay with these professional methods:
Variable Difficulty Scaling
Make fish progressively faster as score increases:
- Create
difficultyvariable - Set fish movement to
move (5 + difficulty) steps - Increase difficulty by 0.2 whenever score increases by 5
Why this works: Players stay engaged through escalating challenges without abrupt difficulty spikes.
Unique Enemy Behavior Patterns
Differentiate duplicates beyond speed:
- Add zig-zag movement to some fish
- Make certain fish change direction when near edges
- Create "smart fish" that swim away from shark
if <distance to [Shark v] < 50> then
point in direction ((direction) + 180)
move 10 steps
end
Essential Testing Checklist
Before publishing your game:
- Verify all fish respawn after being eaten
- Confirm scoring increments only on collisions
- Test minimum/maximum speed values
- Ensure no overlapping spawn points
- Check variable reset on game restart
Recommended Learning Resources
Scratch Game Design Handbook: Covers advanced cloning techniques
Pixel Art for Beginners: Create custom sprites
Game Balance Fundamentals: Master difficulty curves
Your shark game now has layered mechanics through strategic duplication. What enemy behavior will you implement next? Share your creative variations below!
"The real magic happens when identical assets evolve into unique gameplay elements through simple parameter tweaks." - Game Design Principle