Geometry Dash levels not showing up - spike costume follows player and other levels disappear
Esta página aún no está disponible en tu idioma.
💡 Having trouble with Scratch block assembly? Don’t know how to implement code logic? 🚀 Get Help Now
GeometryGameDev_Pro
Posted on July 23, 2025 • Advanced
🎮 Geometry Dash levels not displaying properly
Hey everyone! I’m building a Geometry Dash-style game following Griffpatch’s tutorials, but I’m running into some really frustrating issues:
- 🔺 Costume 2 has a spike that follows the player everywhere
- 👻 Costumes 3, 4, 5… don’t show up at all
- 🎭 Only 1-2 costumes display, then nothing else appears
- 🔄 Manual costume switching doesn’t work
- 🚩 Even “when green flag clicked → set costume to level” fails
I manually created each level as a costume (level1, level2, level3…) in one sprite. I’ve tried:
- ✅ Switch costume to (level)
- ✅ Next costume blocks
- ✅ Manual costume switching
- ✅ Setting costume on green flag
I’ve spent days on this and really don’t want to start from scratch! Has anyone experienced this before? 😰
ScratchFencing_Expert
Replied 2 days later • ⭐ Best Answer
Excellent question @GeometryGameDev_Pro! You’ve encountered the classic “fencing” problem in Scratch. This is a well-known limitation that affects many platformer games. Let me explain what’s happening and how to fix it:
🔍 Understanding the Fencing Problem
Here’s what’s causing your issues:
🔧 Solution 1: Anti-Fencing Technique
Here’s the classic anti-fencing method that works in regular Scratch:
// Anti-fencing setup when flag clicked forever // Step 1: Switch to blank costume switch costume to [blank v] // Create a completely transparent costume // Step 2: Set size to infinity set size to ((1) / (0)) % // This creates infinite size // Step 3: Switch to filled costume switch costume to [solid v] // Create a completely filled costume // Step 4: Do your movement (sprite can now go anywhere) change x by [-5] // Your level scrolling movement // Step 5: Switch back to normal costume and size switch costume to (join [level] (current level)) set size to [100] % wait [0.016] seconds // ~60 FPS end
🚀 Solution 2: Modern Approach with TurboWarp
If you can use TurboWarp, enable the “Remove Sprite Fencing” option:
// In TurboWarp with fencing disabled when flag clicked forever // Your original code works perfectly! repeat until <(x position) < [-480]> change x by [-5] // Level scrolling logic end // Switch to next level change [current level v] by [1] switch costume to (join [level] (current level)) go to x: [480] y: [0] end
🎯 Solution 3: Redesigned Level System
For the most reliable solution, redesign your level system:
// Level Manager Sprite when flag clicked set [Level X v] to [0] set [Current Level v] to [1] forever // Move level position instead of sprite change [Level X v] by [-5] // Check if level is complete if <(Level X v) < [-480]> then set [Level X v] to [0] change [Current Level v] by [1] broadcast [next level v] end end // In Level Sprite when I receive [next level v] switch costume to (join [level] (Current Level)) when flag clicked forever go to x: (Level X) y: [0] end
🔧 Solution 4: Clone-Based Levels
Use clones for each level section to avoid fencing entirely:
// Level Generator Sprite when flag clicked set [Section Count v] to [0] repeat [10] // Create 10 level sections create clone of [Level Section v] change [Section Count v] by [1] end // In Level Section Clone when I start as a clone switch costume to (join [section] (Section Count)) go to x: ((Section Count) * (480)) y: [0] forever change x by [-5] // Scroll left if <(x position) < [-600]> then delete this clone end end
🐛 Debugging Your Current Project
To fix your existing project immediately:
// Quick fix for your current code when flag clicked set [Level v] to [1] forever // Anti-fencing before movement switch costume to [blank v] set size to ((1) / (0)) % switch costume to [solid v] // Your movement code if <(x position) > [-480]> then change x by [-5] else // Reset for next level set [Level v] to ((Level) + (1)) go to x: [480] y: [0] end // Restore normal appearance switch costume to (join [level] (Level)) set size to [100] % end
The key insight is that Scratch prevents sprites from moving outside the visible stage area (“fencing”), which breaks infinite scrolling games. The anti-fencing technique temporarily makes the sprite infinitely large so it can move anywhere!
GeometryGameDev_Pro
Replied 1 hour later
@ScratchFencing_Expert This is absolutely amazing! Thank you so much! 🎉
I implemented the anti-fencing technique and it works perfectly! The spike no longer follows my player and all my levels show up correctly now.
I had no idea about the fencing limitation in Scratch. This explanation makes so much sense - my repeat loop was getting stuck because the sprite couldn’t move past the stage edge!
You’ve saved me from starting over. My Geometry Dash game is finally working! 🚀
TurboWarp_Helper
Replied 2 hours later
Great solution! Just wanted to add that if you’re using TurboWarp, you can also enable these helpful options:
- 🚫 “Remove Sprite Fencing” - Fixes your exact problem
- ⚡ “60 FPS” - Makes games smoother
- 🖥️ “High Quality Pen” - Better graphics
- 🔧 “Disable Limits” - Removes various Scratch restrictions
TurboWarp is perfect for advanced games like Geometry Dash clones! 🎮
PlatformerGuru_Mike
Replied 1 day later
Fantastic explanation! For anyone building platformers, here’s a pro tip:
// Create these costumes for anti-fencing: // 1. 'blank' - completely transparent 1x1 pixel // 2. 'solid' - completely filled rectangle // 3. Your normal level costumes // This makes the anti-fencing technique work reliably!
Also, consider using separate sprites for different game elements (player, obstacles, background) rather than putting everything in one sprite. It makes debugging much easier! 🎯
Vibelf_Community
Pinned Message • Moderator
🎮 Master Advanced Game Development!
Excellent problem-solving everyone! Fencing is one of the most challenging aspects of Scratch game development. For those ready to create professional-quality games, our community can help you master:
- 🚀 Advanced platformer mechanics
- 🎯 Professional game architecture
- ⚡ Performance optimization techniques
- 🎨 Advanced visual effects and animations
📚 Related Discussions
- Advanced platformer game mechanics
- Solving common Scratch limitations
- Professional game development techniques
Ready to build amazing games that push Scratch to its limits? Get personalized guidance from our expert game development tutors in the Vibelf app!