Scrolling Platformer Tutorial | Part 10 | Wall Jumping

griffpatch · Beginner ·🛠️ AI Tools & Apps ·6y ago

Key Takeaways

This video tutorial demonstrates how to implement wall jumping in a scrolling platformer game using Scratch, and also addresses issues with falling through platforms and Scratch 3 slowdown. The tutorial covers scripting for wall jumping, fixing platform collision detection, and optimizing game performance by adding a blank sprite to reduce Scratch 3's rendering overhead.

Full Transcript

hi guys this is Griff patch welcome back to part 10 of our scrolling platform or tutorial for scratch in this episode we're looking at adding the much requested feature wall jumping luckily for us this is really quite easy to script mainly because we added in player momentum in the previous episode that was part 9 of this series right let's begin by moving over to the change player X by custom block then scroll down till you see the change Y by minus 12 okay we're going to add in an if/else block and in the top part we're going to add in if key pressed for the up arrow or ever key you're using for jump then we want another if-else in here and then check greater them and check the speed X it's greater than zero now we need a set and we're going to set speed X to be minus 16 and then below that in the else set it to 16 and we also underneath this if want to set in err to 0 now in the else we want to set speed X to 0 now drag this in just below the change Y by minus 12 like so just clean up these scripts ok so what's happening here this is in the change player X by custom block this is called when we move the player left and right so if we're touching a platform when we move left and right and we try first to see whether we can just move up and down which is if we're walking up a slope if it doesn't manage to do that so in other words we've hit a wall then we go back to where we were but then now when we hit a wall we're allowing us to wall jump so we checked if we're pressing up for a wall jump so if we've hit a wall and we press the up key we see which direction we were moving in if we were moving to the right we now jump to the left so reach yet set a speed to the left here if we were moving to the left we now set the speed to the right so we'll bounce to the right at the same time we set to say that we are now have been in the air for nothing which means we're actually starting a new jump and lastly if we're not jumping we set the speed to zero say we've hit a wall we don't want it to be moving in a direction and then we do the normal collision detection to push us out of the wall again so that should in theory be it let's give it a go so before we can do that we need to just make the level a little bit more interesting so we can actually do some wall jumps let's go into the main costume and let's make a new platform I'll make a wall that goes up here like so okay let's run that so here's my character's normal the wall and look at that we have basic wall jumping simple as that huh so with this wall jumping using course go completely wild and design this level exactly as you want it to be we can make it a bit more interesting and add in another wall up here like this let's try that now okay so now we go yeah that could be quite fun now let's see if I can reproduce something that people have noticed on this flat forming engine if I can jump high enough it's not sure you can see it but I can actually go slightly through the floor here in fact if I get fast enough I will actually be able to jump right through the floor which is obviously not a very good idea I don't think I'm going quite high enough at the moment to see that let's see if I can make the level even higher you okay let's try that okay here I go and we're going down there we go so what happened there was I actually was able to go right through the bottom of the level and it got very confused okay so we can solve that because the problem is we're going travelling so fast that it can't detect the platform as we go through it and that's easy to fix simply by going to the tick custom block here it is here we are we're changing speed Y by minus 2 this is we're adding gravity in all we need to do is add an if around that change s why I like this and then check to see that speed Y is greater than minus 20 this means if speed Y if it gets less than minus 20 it won't fall any faster so let's just try that again that's good brilliant and one more fix to make while we're still at it and this is actually a scratch three issue is that we can speed up our scripts quite a bit simply by adding a new sprite which we'll just call blank or that doesn't need we call that and then you just move that that's the very first sprite in the game there we go completely blank we could add a comment saying this is blank scratch three feature if you go back to the player sprite here what happens when you're playing a game is you'll see that here this right here has the yellow board around it showing that it's running and it takes scratch a bit of time to actually draw that yellow border and if your sprite that are your Coney selecting is the first sprite even if you're not playing it in the project editor like this the game runs slower because it's time to draw these yellow borders so by having a blank sprite I selected there's no scripts that need to be highlighted and the game runs as fast as it possibly can and you might find that as she helps speed up some of your games I have to go through a load of my old projects adding them into blank sprites and it helped me a lot so that's it have fun with that wall jumping and I'll see you next time for another tutorial subscribe to the channel like the video and physically fetch thanks for watching bye

Original Description

This is part 10 of this tutorial series where we are building a scrolling platformer game together in Scratch. (Part 1 can be found here: https://youtu.be/sebnyhBsXug). In this episode we quickly implement wall jumping, and also fix falling through platforms and also address the scratch 3 slow down bug! 🚀 *Boost Your Creativity with Griffpatch* The Griffpatch Academy will take you from "Gamer to Game Creator" Learn more at 👉 https://griffpatch.academy 👈 😺 Scratch was developed by the Lifelong Kindergarten Group at the MIT Media Lab. See http://scratch.mit.edu #scratch #griffpatch #scrolling #platformer #programming #wall jumping #speed #coding #fun
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from griffpatch · griffpatch · 25 of 60

1 Burrow Blitz - A game by Griffpatch
Burrow Blitz - A game by Griffpatch
griffpatch
2 Burrow Blitz Level 1 Speed Run!
Burrow Blitz Level 1 Speed Run!
griffpatch
3 Scratch Messaging Extension (for chrome & firefox)
Scratch Messaging Extension (for chrome & firefox)
griffpatch
4 Scrolling Platformer Tutorial | Part 1 | Get Scrolling
Scrolling Platformer Tutorial | Part 1 | Get Scrolling
griffpatch
5 Scrolling Platformer Tutorial | Part 2 | Gravity
Scrolling Platformer Tutorial | Part 2 | Gravity
griffpatch
6 Scrolling Platformer Tutorial | Part 3 | Platform Detection
Scrolling Platformer Tutorial | Part 3 | Platform Detection
griffpatch
7 Scrolling Platformer Tutorial | Part 4 | Off Screen Sprites and Player Death
Scrolling Platformer Tutorial | Part 4 | Off Screen Sprites and Player Death
griffpatch
8 Scrolling Platformer Tutorial | Part 5 | Collectables
Scrolling Platformer Tutorial | Part 5 | Collectables
griffpatch
9 Scrolling Platformer Tutorial | Part 6 | Danger Sprites (Bug fix)
Scrolling Platformer Tutorial | Part 6 | Danger Sprites (Bug fix)
griffpatch
10 Scrolling Platformer Tutorial | Part 7 | Exit Portal
Scrolling Platformer Tutorial | Part 7 | Exit Portal
griffpatch
11 Scratch 3 | Box2d |  Physics Extension
Scratch 3 | Box2d | Physics Extension
griffpatch
12 Scrolling Platformer Tutorial | Part 8 | Vertical Scrolling
Scrolling Platformer Tutorial | Part 8 | Vertical Scrolling
griffpatch
13 Zombie Cube | Speedrun challenge
Zombie Cube | Speedrun challenge
griffpatch
14 Scratch 3 | Physics Extension | Version 2
Scratch 3 | Physics Extension | Version 2
griffpatch
15 Top Down Scroller | E1 - Scrolling | Scratch Tutorial
Top Down Scroller | E1 - Scrolling | Scratch Tutorial
griffpatch
16 Top Down Scroller | Part 2 | Enemy AI
Top Down Scroller | Part 2 | Enemy AI
griffpatch
17 Top Down Scroller | Part 3 | Enemy Clones & List
Top Down Scroller | Part 3 | Enemy Clones & List
griffpatch
18 Top Down Scroller | Part 4 | Live Die Repeat (Game Over)
Top Down Scroller | Part 4 | Live Die Repeat (Game Over)
griffpatch
19 Top Down Scroller | Part 5 | You've Won!
Top Down Scroller | Part 5 | You've Won!
griffpatch
20 Cloud Game Tutorial | Part 1 | The Basics
Cloud Game Tutorial | Part 1 | The Basics
griffpatch
21 Cloud Game Tutorial | Part 2 | Encoding and Decoding
Cloud Game Tutorial | Part 2 | Encoding and Decoding
griffpatch
22 Scratch 3 Dev Tools Browser Extension by griffpatch
Scratch 3 Dev Tools Browser Extension by griffpatch
griffpatch
23 Cloud Game Tutorial | Part 3 | Multiplayer
Cloud Game Tutorial | Part 3 | Multiplayer
griffpatch
24 Scrolling Platformer Tutorial | Part 9 | Momentum
Scrolling Platformer Tutorial | Part 9 | Momentum
griffpatch
Scrolling Platformer Tutorial | Part 10 | Wall Jumping
Scrolling Platformer Tutorial | Part 10 | Wall Jumping
griffpatch
26 Cloud Game Tutorial | Part 4 | Auto Game Joining
Cloud Game Tutorial | Part 4 | Auto Game Joining
griffpatch
27 Game Preview - "Getting Over It" with Griffpatch - A fan recreation in Scratch
Game Preview - "Getting Over It" with Griffpatch - A fan recreation in Scratch
griffpatch
28 Speed Run with Outtakes | Getting Over It | 4 minutes 30 seconds
Speed Run with Outtakes | Getting Over It | 4 minutes 30 seconds
griffpatch
29 Griffpatch's Live Stream
Griffpatch's Live Stream
griffpatch
30 MMO Platformer Speedrun Challenge
MMO Platformer Speedrun Challenge
griffpatch
31 Appel Platformer | Scratch Game Blog
Appel Platformer | Scratch Game Blog
griffpatch
32 Cloud Game Tutorial | Part 5 | Smooth Movement
Cloud Game Tutorial | Part 5 | Smooth Movement
griffpatch
33 How to Design a Level for Appel
How to Design a Level for Appel
griffpatch
34 Fastest Appel Speedruns | Jan 2021
Fastest Appel Speedruns | Jan 2021
griffpatch
35 Tile Scrolling Platformer (Mario) | 1. Setup
Tile Scrolling Platformer (Mario) | 1. Setup
griffpatch
36 Tile Scrolling Platformer | 2. Grid List
Tile Scrolling Platformer | 2. Grid List
griffpatch
37 Tile Scrolling Platformer | 3. Tile Collisions
Tile Scrolling Platformer | 3. Tile Collisions
griffpatch
38 Tile Scrolling Platformer | 4. Platforming Scripts
Tile Scrolling Platformer | 4. Platforming Scripts
griffpatch
39 Tile Scrolling Platformer | 5. The Level Editor
Tile Scrolling Platformer | 5. The Level Editor
griffpatch
40 Tile Scrolling Platformer | 6. Level Codes
Tile Scrolling Platformer | 6. Level Codes
griffpatch
41 Tile Scrolling Platformer | 7. Drop Through Platforms
Tile Scrolling Platformer | 7. Drop Through Platforms
griffpatch
42 How to make Physics in Scratch | Full Tutorial
How to make Physics in Scratch | Full Tutorial
griffpatch
43 Tile Scrolling Platformer | 8. Enemy Clones
Tile Scrolling Platformer | 8. Enemy Clones
griffpatch
44 Simple Pathfinding Tutorial
Simple Pathfinding Tutorial
griffpatch
45 Tile Scrolling Platformer | 9. Enemies in Level Editor
Tile Scrolling Platformer | 9. Enemies in Level Editor
griffpatch
46 Simple Maze Generation | Scratch Tutorial
Simple Maze Generation | Scratch Tutorial
griffpatch
47 Tile Scrolling Platformer | 10. Mystery Blocks
Tile Scrolling Platformer | 10. Mystery Blocks
griffpatch
48 Simple Car Steering Simulation | Scratch Tutorial
Simple Car Steering Simulation | Scratch Tutorial
griffpatch
49 Simple Background Scrolling Tutorial
Simple Background Scrolling Tutorial
griffpatch
50 Tile Scrolling Platformer | 11. Death, Background & Sound
Tile Scrolling Platformer | 11. Death, Background & Sound
griffpatch
51 Mid Week Update & Channel Membership
Mid Week Update & Channel Membership
griffpatch
52 Simple Grid List Tutorial with Image Scanning
Simple Grid List Tutorial with Image Scanning
griffpatch
53 Tile Scrolling Platformer | 12. Auto Arranging Tiles
Tile Scrolling Platformer | 12. Auto Arranging Tiles
griffpatch
54 Code a Fun Space Shooter Game 🚀 | 1. Move & Shoot | Scratch Tutorial
Code a Fun Space Shooter Game 🚀 | 1. Move & Shoot | Scratch Tutorial
griffpatch
55 Space Shooter 2 - Enemy Collisions
Space Shooter 2 - Enemy Collisions
griffpatch
56 Tile Scrolling Platformer | 13. Level Progression & Editor Improvements
Tile Scrolling Platformer | 13. Level Progression & Editor Improvements
griffpatch
57 Space Shooter 3 - Camera Shake & FX
Space Shooter 3 - Camera Shake & FX
griffpatch
58 Tile Scrolling Platformer | 14. Sloping Tiles
Tile Scrolling Platformer | 14. Sloping Tiles
griffpatch
59 Pathfinding a Maze using Lists
Pathfinding a Maze using Lists
griffpatch
60 Tile Scrolling Platformer | 15. Crouch & Slide
Tile Scrolling Platformer | 15. Crouch & Slide
griffpatch

This tutorial teaches how to implement wall jumping in a scrolling platformer game using Scratch, and also covers optimizing game performance and fixing platform collision detection issues. By following this tutorial, viewers can learn how to create a more engaging and responsive game.

Key Takeaways
  1. Create a new platform in the game
  2. Add an if/else block to the change player X by custom block
  3. Set speed X to minus 16 or 16 depending on the direction of the jump
  4. Add a check for the up arrow key press to enable wall jumping
  5. Fix platform collision detection by adding an if statement to check for speed Y
  6. Optimize game performance by adding a blank sprite to reduce Scratch 3's rendering overhead
💡 Adding a blank sprite as the first sprite in the game can significantly improve game performance by reducing Scratch 3's rendering overhead.

Related Reads

Up next
How to Get Your Brand Cited by ChatGPT, Claude and Gemini
Arvow
Watch →