Scrolling Platformer Tutorial | Part 10 | Wall Jumping
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
Playlist
Uploads from griffpatch · griffpatch · 25 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
▶
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Burrow Blitz - A game by Griffpatch
griffpatch
Burrow Blitz Level 1 Speed Run!
griffpatch
Scratch Messaging Extension (for chrome & firefox)
griffpatch
Scrolling Platformer Tutorial | Part 1 | Get Scrolling
griffpatch
Scrolling Platformer Tutorial | Part 2 | Gravity
griffpatch
Scrolling Platformer Tutorial | Part 3 | Platform Detection
griffpatch
Scrolling Platformer Tutorial | Part 4 | Off Screen Sprites and Player Death
griffpatch
Scrolling Platformer Tutorial | Part 5 | Collectables
griffpatch
Scrolling Platformer Tutorial | Part 6 | Danger Sprites (Bug fix)
griffpatch
Scrolling Platformer Tutorial | Part 7 | Exit Portal
griffpatch
Scratch 3 | Box2d | Physics Extension
griffpatch
Scrolling Platformer Tutorial | Part 8 | Vertical Scrolling
griffpatch
Zombie Cube | Speedrun challenge
griffpatch
Scratch 3 | Physics Extension | Version 2
griffpatch
Top Down Scroller | E1 - Scrolling | Scratch Tutorial
griffpatch
Top Down Scroller | Part 2 | Enemy AI
griffpatch
Top Down Scroller | Part 3 | Enemy Clones & List
griffpatch
Top Down Scroller | Part 4 | Live Die Repeat (Game Over)
griffpatch
Top Down Scroller | Part 5 | You've Won!
griffpatch
Cloud Game Tutorial | Part 1 | The Basics
griffpatch
Cloud Game Tutorial | Part 2 | Encoding and Decoding
griffpatch
Scratch 3 Dev Tools Browser Extension by griffpatch
griffpatch
Cloud Game Tutorial | Part 3 | Multiplayer
griffpatch
Scrolling Platformer Tutorial | Part 9 | Momentum
griffpatch
Scrolling Platformer Tutorial | Part 10 | Wall Jumping
griffpatch
Cloud Game Tutorial | Part 4 | Auto Game Joining
griffpatch
Game Preview - "Getting Over It" with Griffpatch - A fan recreation in Scratch
griffpatch
Speed Run with Outtakes | Getting Over It | 4 minutes 30 seconds
griffpatch
Griffpatch's Live Stream
griffpatch
MMO Platformer Speedrun Challenge
griffpatch
Appel Platformer | Scratch Game Blog
griffpatch
Cloud Game Tutorial | Part 5 | Smooth Movement
griffpatch
How to Design a Level for Appel
griffpatch
Fastest Appel Speedruns | Jan 2021
griffpatch
Tile Scrolling Platformer (Mario) | 1. Setup
griffpatch
Tile Scrolling Platformer | 2. Grid List
griffpatch
Tile Scrolling Platformer | 3. Tile Collisions
griffpatch
Tile Scrolling Platformer | 4. Platforming Scripts
griffpatch
Tile Scrolling Platformer | 5. The Level Editor
griffpatch
Tile Scrolling Platformer | 6. Level Codes
griffpatch
Tile Scrolling Platformer | 7. Drop Through Platforms
griffpatch
How to make Physics in Scratch | Full Tutorial
griffpatch
Tile Scrolling Platformer | 8. Enemy Clones
griffpatch
Simple Pathfinding Tutorial
griffpatch
Tile Scrolling Platformer | 9. Enemies in Level Editor
griffpatch
Simple Maze Generation | Scratch Tutorial
griffpatch
Tile Scrolling Platformer | 10. Mystery Blocks
griffpatch
Simple Car Steering Simulation | Scratch Tutorial
griffpatch
Simple Background Scrolling Tutorial
griffpatch
Tile Scrolling Platformer | 11. Death, Background & Sound
griffpatch
Mid Week Update & Channel Membership
griffpatch
Simple Grid List Tutorial with Image Scanning
griffpatch
Tile Scrolling Platformer | 12. Auto Arranging Tiles
griffpatch
Code a Fun Space Shooter Game 🚀 | 1. Move & Shoot | Scratch Tutorial
griffpatch
Space Shooter 2 - Enemy Collisions
griffpatch
Tile Scrolling Platformer | 13. Level Progression & Editor Improvements
griffpatch
Space Shooter 3 - Camera Shake & FX
griffpatch
Tile Scrolling Platformer | 14. Sloping Tiles
griffpatch
Pathfinding a Maze using Lists
griffpatch
Tile Scrolling Platformer | 15. Crouch & Slide
griffpatch
More on: AI Productivity Tools
View skill →Related Reads
📰
📰
📰
📰
Salesforce wants to charge for AI outcomes, but first it needs to figure out how
The Register
ARTIFICIAL INTELLIGENT TECHNOLOGY BEHIND DIGITAL WORLD.
Medium · Machine Learning
Cancel Your AI Subscriptions and Pay Only for What Your Product Actually Uses
Dev.to AI
Why Managing Multiple AI API Keys Is Slowing You Down
Dev.to AI
🎓
Tutor Explanation
DeepCamp AI