Sprites Behind Walls (Depth Sorting) | E4. Crazy Fun Raycasting

  Рет қаралды 461,389

griffpatch

griffpatch

Күн бұрын

How to depth sort entities in a raycast 3d scratch game. In episode 4 we learn to raycast to a list, depth sort that list shuffling in our entities as we go, and then draw from our list to render the scene. Wow - and it's looking real spooky! This is an awesome tutorial for creating that 3d game you've all been wanting to make!
👀 Next Episode #5 - • Collectables & Enemies... (Early Access)
🔥 Bug Fixes - • Quick Fixes for Raycas...
Don't forget to submit your projects to the studio linked below by commenting the project URL in the studio comments.
My tutorials are for all budding game & software developers using Code Blocks. Scratch On guys!
🚀 Boost Your Creativity with Griffpatch
The Griffpatch Academy will take you from "Gamer to Game Creator"
Learn more at 👉 griffpatch.academy 👈
😺 Scratch was developed by the Lifelong Kindergarten Group at the MIT Media Lab. See scratch.mit.edu
🐱 Scratch Studio for this tutorial - scratch.mit.edu/studios/31052...
👀 Part 1 - • Crazy Simple Raycastin...
👀 Full Episode Playlist - • Crazy Fun Raycasting (...
👀 Quick and Fun Tutorials - • Quick and Fun Scratch ...
❤️ Scratch Addons - scratchaddons.com/
📹 Video Editing Software - techsmith.pxf.io/c/2682566/50...
-------------Video Chapters-------------
0:00 Intro
0:42 Behind a Wall…?
1:38 Raycast into a list
7:22 Drawing the Scene from the Lists
11:29 Ordering the lists by Distance
13:35 Insertion Sort
18:04 Include Entities in the Sort
20:20 Handle Entity Drawing from the List
24:34 Entity Brightness
25:43 More Entities
29:41 Fixing the Level Colors
30:27 Outro

Пікірлер: 2 200
@nguyentram1483
@nguyentram1483 2 жыл бұрын
Scratch:fun coding for kids Griff:reality can be whatever i want
@MonkeJesus
@MonkeJesus 2 жыл бұрын
Hes got a point
@wojtekgame
@wojtekgame Жыл бұрын
Griffpatch goes really on board!
@frchoco
@frchoco Жыл бұрын
I bet he can make the next scratch fortnite
@vaguedestruction
@vaguedestruction Жыл бұрын
This tutorial is made for kids to be able to follow, but yeah i see what you mean
@UnmaskedHistory
@UnmaskedHistory Жыл бұрын
@@vaguedestruction this is impossible
@gdb5549
@gdb5549 2 жыл бұрын
scratch: Doesn't allow pen layering Griffpatch: Fine, I'll do it myself
@funraven659
@funraven659 2 жыл бұрын
griffpatch is so smart, he can bypass a whole "no" from scratch
@ricardosantos2599
@ricardosantos2599 2 жыл бұрын
2160-12-31 23:57 2160-12-31 23:58 2160-12-31 23:59 1960-01-01 00:00
@ricardosantos2599
@ricardosantos2599 2 жыл бұрын
0000-00-00 00:00
@gdb5549
@gdb5549 2 жыл бұрын
@@ricardosantos2599 yes, ZERO
@wojtekgame
@wojtekgame 2 жыл бұрын
No memes here
@fuzzy2107
@fuzzy2107 Жыл бұрын
scratch: helps kids problem solve griffpatch: helps scratch problem solve
@DaAlphaDawg
@DaAlphaDawg 8 ай бұрын
lol
@Potaszium
@Potaszium 6 ай бұрын
lol
@sudsy716
@sudsy716 Ай бұрын
So true 🤣
@ChezRatChez
@ChezRatChez Жыл бұрын
Next, he's going to make it 4d
@coolgameriguess
@coolgameriguess 8 ай бұрын
It’s getting more and more real at the moment 💀
@tonyaarnett2655
@tonyaarnett2655 7 ай бұрын
You mean 9885659466485935D?
@InvertedByDefault
@InvertedByDefault 6 ай бұрын
bruh wat@@tonyaarnett2655
@valdemarandersson3234
@valdemarandersson3234 5 ай бұрын
@@tonyaarnett2655 Our little comedian 😂😐
@A_youtuber2023
@A_youtuber2023 5 ай бұрын
⁠​⁠@@valdemarandersson3234who said he’s joking…. Griffpatch 2045 WHATS UP GUYS TODAY WE DO 4040404943838383838399D IN SCRATCH LETS GET SCRATCHING imagine tho
@ranvirchoudhary929
@ranvirchoudhary929 2 жыл бұрын
Hey griffpatch. Your platformer series helped me make a game for my school's coding competition! i put my own twist on it ofc. but i hope i win! fingers crossed! :)
@coolswag352
@coolswag352 2 жыл бұрын
good for you :D
@pieceofbogus110
@pieceofbogus110 2 жыл бұрын
➡️ 🍀 ⬅️ here you go
@reddaveishere9881
@reddaveishere9881 2 жыл бұрын
🤲🏻🍀🍀🍀🍀🤲🏻
@donkookies
@donkookies 2 жыл бұрын
which one?
@androidmode8757
@androidmode8757 2 жыл бұрын
Plz win
@LilyTheCuteKitty432
@LilyTheCuteKitty432 Жыл бұрын
<a href="#" class="seekto" data-time="1547">25:47</a> Watch, as the wild programmer changes his emotions in less than a second. Incredible! These creatures can change their emotions at command.
@theone.whoasked
@theone.whoasked 2 жыл бұрын
Well now I can make a horror game thanks to you Griffpatch! hopefully scratch moderation spares me 😅
@ShowtimeMx
@ShowtimeMx Жыл бұрын
im making 1 TOO !
@MagicMaskedMonkey
@MagicMaskedMonkey Жыл бұрын
same?
@coolrb99
@coolrb99 Жыл бұрын
Same as well! have you heard of baldi's basics plus? in the game there was a field trip when you go to a corn maze however if you don't escape the maze a GIANT gotta reap reap will reap all the corn leading Baldi to catch you and teleport to you to the bus when you left off. It's kinda like that but you need to find 9 corn in the corn maze while avoiding Baldi.
@theone.whoasked
@theone.whoasked Жыл бұрын
@@coolrb99 This comment is old I already gave up making said game stop replying
@DaAlphaDawg
@DaAlphaDawg 8 ай бұрын
lol same
@xamtastic
@xamtastic 2 жыл бұрын
Nice to see you uploading griffpatch! You've been a massive inspiration for the Scratch community for years
@griffpatch
@griffpatch 2 жыл бұрын
Hey, thanks!
@landnpr3414
@landnpr3414 2 жыл бұрын
@@griffpatch hey help me pls im having a problem to where m height block is 3 and then the sprites size is 3 pls respond quick
@Seven71987
@Seven71987 2 жыл бұрын
Scrappy Doo says "Do you know Yamaha, both music and motorcycles? What about Yoshi & Pikachu?"
@MatoStato2010
@MatoStato2010 2 жыл бұрын
Hi, I animate too
@listed7568
@listed7568 2 жыл бұрын
@@griffpatch Hi Grifffpatch. I need help. At the end of the video chapter "Drawing the scenes from the List" I tested out the game, and then I was stuck under the ground, and nano disappeared. Can you help?
@zmggames
@zmggames 2 жыл бұрын
Wow! I’ve always wanted to know how to place sprites behind pen and this was super helpful! Maybe you could talk about how to texture the walls into simple patterns like bricks? Thanks for all your videos!
@VALLUM38
@VALLUM38 Ай бұрын
guess what
@boltyplays
@boltyplays Жыл бұрын
<a href="#" class="seekto" data-time="1685">28:05</a> Scratch: No, I won't let you use the "touching (Entities)?" boolean block in the sprite Entities Griffpatch: Ok fine, I'll do it myself Scratch: WHA-
@zekeggy
@zekeggy 8 ай бұрын
man, your tutorials are so good that i don't even have to watch the video to follow i can just listen keep up the good work man
@epicgarbgehere2011
@epicgarbgehere2011 2 жыл бұрын
this man is awesome, like he created a literal 3D game in a 2D program, MY MAN JUST ADDED SOME DEPTH TO SCRATCH BRO
@YusafAnimations
@YusafAnimations 2 жыл бұрын
Ikr!
@archusrtm6325
@archusrtm6325 2 жыл бұрын
Its not true 3d though. While griffpatch has done a great tutorial raycasting is nothing new. Before true 3d games like “half life” came out most 3d games looked like the original doom or wolfenstein games. Raycasting is just creating the illusion that a 2d map is 3d
@ArchedRocket
@ArchedRocket Жыл бұрын
So he killed a man with a healing potion🤣
@Scyr0
@Scyr0 3 ай бұрын
OMG its Fat Garbage Shrek @epicgarbagehere2011
@backtoq670
@backtoq670 2 жыл бұрын
I just coded this onto a project and it was really fun and a bit educational! Can't wait for episode 5!
@-_lIl_-
@-_lIl_- Жыл бұрын
<a href="#" class="seekto" data-time="655">10:55</a> that public announcement edit had me laughing, especially because of the way it was said 😂
@TotallyNotDehansa
@TotallyNotDehansa Жыл бұрын
I absolutely love your tutorials! You can teach coding in a fun, cool and interesting way and it is easy to understand and the end results are unbelievable! Thanks for the awesome tutorials griffpatch!
@jayplayday8941
@jayplayday8941 2 жыл бұрын
Now we need to have enemies that can follow us around the map, and this is a great tutorial series!
@uxw05
@uxw05 2 жыл бұрын
THIS IS SO COOL! I mean, I did have to split my projects’ updates in 2 (except for fnaf 3), but it was WORTH IT! Thank you so much Griffpatch!
@Scyr0
@Scyr0 3 ай бұрын
Bro this tutorial is about A maze like backrooms not Freddy Fazbears Pizzeria dont know griffpatch does not know about Fnaf YOu Idiot William Afton
@lumpstergash2380
@lumpstergash2380 2 жыл бұрын
Surprisingly, over 1000 entities fit into my level. It was pure chaos and I loved it.
@Devappl187
@Devappl187 11 ай бұрын
I love the little smiley face in the captions :D
@frankytrews3953
@frankytrews3953 2 жыл бұрын
You could use the path finding algorythme in this project for the enemies!
@undertalerandomvideos5222
@undertalerandomvideos5222 2 жыл бұрын
And quite possibly the random maze generator for the level itself
@morveman_yt9567
@morveman_yt9567 2 жыл бұрын
By the way the pathfinder is quite slow when you are moving around but it works and for the maze generator form griffpatch, the problem is they used pen and not sprite but it could be very fun to have that stuff
@1080GBA
@1080GBA 2 жыл бұрын
@@undertalerandomvideos5222 the stamp in level generation breaks the project
@esthermoriarty7211
@esthermoriarty7211 2 жыл бұрын
*algorithm
@gamerz_rule7140
@gamerz_rule7140 Жыл бұрын
@@undertalerandomvideos5222 Impossible Since both require pen, You would need to hide the map but there is no "if touching pen" block So It is a scratch impossibility; Just sayin'
@mcsuperplayer
@mcsuperplayer 2 жыл бұрын
Idea: when key M is pressed, the Level and player sprite have their ghost effect set to 90 instead of 100 Essentially giving a map of the level
@griffpatch
@griffpatch 2 жыл бұрын
Ha, I already have that added to the next episode scripts :) great minds!
@Speed-TV
@Speed-TV 2 жыл бұрын
Hey you stole that idea from my game >:(
@LitoMike
@LitoMike 2 жыл бұрын
yes
@snufkin8940
@snufkin8940 2 жыл бұрын
@@Speed-TV a lot of people did that
@noobyplays3981
@noobyplays3981 2 жыл бұрын
​@@griffpatch i did that back when we hid the levels, where i made it if [set {ghost} effect to (40)] else [set {ghost} effect to (100)]
@thatmarioguytmg369
@thatmarioguytmg369 2 жыл бұрын
The things you do in scratch are things I never thought to be possible in scratch.
@martijnbruins6732
@martijnbruins6732 Жыл бұрын
<a href="#" class="seekto" data-time="1680">28:00</a> scratch be like: we won't let you select another entity griffpatco be like: fine. ill do it my own way
@lesslieadams4028
@lesslieadams4028 3 ай бұрын
Ah yes, "griffpacho." Definitely a name.
@polypinesnek3744
@polypinesnek3744 2 жыл бұрын
Amazing tutorial! Even created my own “Sensitivity” variable at the beginning so it was easier to control how fast I looked around.
@ballsucker89
@ballsucker89 2 жыл бұрын
thats a really good idea man! is it alright if i use it in my game?
@polypinesnek3744
@polypinesnek3744 2 жыл бұрын
@@ballsucker89 yes of course! don’t worry I didn’t invent the idea of sensitivity
@ballsucker89
@ballsucker89 2 жыл бұрын
@@polypinesnek3744 thank you! this idea is so good and yet so easy to make
@srevia
@srevia 2 жыл бұрын
i did that already lol
@PatPatYT
@PatPatYT 2 жыл бұрын
I did too
@ineselkirat2659
@ineselkirat2659 Жыл бұрын
Bravo for all your projects, they are amazing, it's even better with all the help on KZfaq that you offer. You're just a PROFESSIONAL! Thanks a lot! 👍👏
@theoriginaldrdust
@theoriginaldrdust 2 жыл бұрын
I already have a million ideas that I could make with this alone, can’t wait for part 5!
@funraven659
@funraven659 2 жыл бұрын
Who can wait for part 5? He's so good we beg for part [current part] + 1
@theoriginaldrdust
@theoriginaldrdust 2 жыл бұрын
@@funraven659 Lets say ‘Current part = X’. X+1 is what we always want. We also need an average time between parts, lets say ‘T’. What we want is Tx0 and X+1. Sadly this is impossible, so we need a work-around. Make a new scratch block. Lets call it ‘Condense Time’. Run without screen refresh. Okay! Now move this into some free space and apply the following: [REDACTED]. Now if we run this script… voilà! We now have a new episode. Rinse and repeat. Read this in griffpatch’s voice.
@funraven659
@funraven659 2 жыл бұрын
Ok, @@theoriginaldrdust
@Official_zaDpi
@Official_zaDpi 2 жыл бұрын
Omg I can't wait to finish watching this series, then I could maybe use your multiplayer tutorial to add multiplayer 0-0
@thecrap-crap2414
@thecrap-crap2414 5 ай бұрын
I made the mistake of putting the skeleton sprite as my "Nano" and let me just tell you that the sprite is terrifying and the fact that it can just now teleport and clone itself basically is awesome, as fun as this tutorial is, my nightmares are going to be even more fun!!
@vVearon
@vVearon 2 жыл бұрын
i can imagine scratch shorts where griffpatch teaches something as fast as possible. but since he has to make it fast everyone already knows it but still enjoy
@lynx.ver1fied
@lynx.ver1fied 2 жыл бұрын
I've learned so much from you griffpatch! Great work!!
@sirborkyes
@sirborkyes 2 ай бұрын
I've said it before, and I'll say it again: Griffpatch is the most friendly, welcoming, and fun person I've ever seen in YT tutorials. I do have an issue, though, if by any chance someone sees this and can help I am making an FPS in the game, and the weapon animations heavily rely on fast rendering and FPS, since it is like a stop-motion gif for each weapon. How can I better optimize the rendering that removes the lag? Before this episode, the stop-motion animations for each weapon were running fine, but now they are slowed down a little.
@sethcushman5454
@sethcushman5454 2 жыл бұрын
A trick I recently learned in scratch: if. you divide anything by zero, you get infinity, which does work with > and < blocks. So I just set a variable infinity to 1/0 when the flag is clicked, and I can use it whenever.
@danielszap6794
@danielszap6794 2 жыл бұрын
This is so cool. I am really glad we have been able to do all of this in our 3D project. I can’t wait to explore everything else there is to see about this 3D world. Especially entity movement and collectibles. Best series in all of KZfaq. Thanks so much GriffPatch.
@deeveeisfearless
@deeveeisfearless 2 жыл бұрын
yeah
@SUPY_
@SUPY_ 2 жыл бұрын
You should add jumping, and actuall floor collision,and render script (make platforms in the air). I would really want to learn that. Also, there is a way too make entitys look 3D with some maths and pen.
@thatreddinosaurguy
@thatreddinosaurguy 2 жыл бұрын
Dev, I was thinking about jumping!!!
@preloadingwastaking
@preloadingwastaking 2 жыл бұрын
I'm afraid, with the system currently, it is impossible (without making the game unplayible and glitch a lot) This is projecting a 2d world as if it was 3d Jumping is possible as an optical illusion
@jlewwis1995
@jlewwis1995 2 жыл бұрын
@@preloadingwastaking well it wouldn't be that difficult to add a Z height to entities even if the world is 2d, though like I said the world is entirely 2d so its not like there would be a point to doing that but it could be done
@preloadingwastaking
@preloadingwastaking 2 жыл бұрын
@@jlewwis1995 You are aware that you would need to do almost 200 more raycasters just for it, Raycasting is only meant for 2 cords. If you do make one that does it without remaking the whole system I'll take my words back (and it has to be playable)
@jlewwis1995
@jlewwis1995 2 жыл бұрын
@@preloadingwastaking uh no? Just move the entities up and down on the screen based on their height l? And implement y-shearing so the player can look up and down, obviously it isn't true looking up and down but that's beside the point, either way problem solved :p
@bigbubba111
@bigbubba111 2 жыл бұрын
Used this in a school project, and everyone loved it!
@orrinpants
@orrinpants 2 жыл бұрын
I thought about how the next episode would make all entities enemies and collectibles, so I decided to change to Tera because the characters other than Scratch Cat have expressions such as mad.
@PercydeRoloFangirl
@PercydeRoloFangirl 7 ай бұрын
I'm going to make custom enemy sprites later but for now using a placeholder
@chelseagonzales4294
@chelseagonzales4294 Ай бұрын
@@PercydeRoloFangirlI’m just using a bean as a placeholder
@hi_beemo1808
@hi_beemo1808 2 жыл бұрын
suggestion: it'll be so cool if you add a mini map on one of the corners that rotates with the player's direction 😉👌
@PabTSM-OfficialChannel
@PabTSM-OfficialChannel 2 жыл бұрын
just make the map visible when you press the m key, also make the player visible as well
@wohao_gaster7434
@wohao_gaster7434 2 жыл бұрын
@@PabTSM-OfficialChannel or make mini sprites to not f up the collisions when your resize it
@super_manul1167
@super_manul1167 2 жыл бұрын
its difficult trust me we tried
@jyke321
@jyke321 2 жыл бұрын
@@super_manul1167 what if you stamped a shrunk version, and then reverted it before doing collisions
@TheOfficialSocksNSandals
@TheOfficialSocksNSandals 2 жыл бұрын
@@jyke321 PLS DO
@Amalya_DSG
@Amalya_DSG 2 жыл бұрын
You might want to cap off the entity brightness by using an if statement and a greater than block to prevent them from getting brighter than the original sprite.
@thejustlexa
@thejustlexa 2 жыл бұрын
this is a smart idea but its impossible, considering the brightness effect isnt a variable, so you cant input into an if statement. well, unless there's some work around for that i just dont know about
@js62926
@js62926 2 жыл бұрын
@@thejustlexa you take the brightness setting code and check if its not over 0, and if it isnt then do the basic brightness setting code. else, simply set brightness to 0
@thejustlexa
@thejustlexa 2 жыл бұрын
@@js62926 thats... not how it works? theres no way to check what the brightness effect is set to?
@js62926
@js62926 2 жыл бұрын
@@thejustlexa if ( not ( ( 40 - ( Distance / 1.5 ) ) > 0 ) ) then set brightness effect to ( 40 - ( Distance / 1.5 ) ) else set brightness effect to ( 0 ) end
@foxxitatoriguess
@foxxitatoriguess 2 жыл бұрын
@@js62926 you could also just make it change a variable which brightness gets set to?
@theexplosivesnatchers9969
@theexplosivesnatchers9969 6 ай бұрын
man i stay up for so long doing your tuts, I LOV ETHESE!!
@meatygameplay
@meatygameplay Жыл бұрын
scratch: intended for kids 4 - 8 griff: I DONT CARE, I CAN DO WHAT I WANT
@user-dk8yz9io4h
@user-dk8yz9io4h 3 ай бұрын
3 to 17
@ruchikataria1594
@ruchikataria1594 2 жыл бұрын
Awesome tutorial! Also can't wait for procedural world generation and the next mario episode!
@dittomario
@dittomario 2 жыл бұрын
damn, i really love this, its the best scratch raycaster tutorial series so far! keep going! i suggest add a jumping mehcanic, textured walls or multicolored walls, and as a bonus, a path finding algorithm for the enitites!
@ES_Alt3
@ES_Alt3 10 ай бұрын
Bro just predicted the future 💀
@dittomario
@dittomario 10 ай бұрын
​@@ES_Alt3lmaoo💀💀💀
@mathiasbartl9393
@mathiasbartl9393 Жыл бұрын
Thank you for this tutorial, I had a fun session debugging the insertion sort algorithm because I used the 'item #' instead of the 'item' block. One comment unless you got another optimisation in mind inserting the sprites intpo the draw list should use a search by bisection.
@connorhgames5403
@connorhgames5403 2 жыл бұрын
Hey griffpatch this is going to help show how good i gotten at scratch for school so i can show my teachers
@ktlknss
@ktlknss 2 жыл бұрын
Idea: Camera movement up and down would be very cool
@ballsucker89
@ballsucker89 2 жыл бұрын
would probably be hard, but would be very cool, especially for cutscenes and stuff
@v0calgiant12
@v0calgiant12 2 жыл бұрын
Griffpatch: "Wow, this represents a distance that is far, far away, much further than any well we'll ever draw." ( <a href="#" class="seekto" data-time="835">13:55</a> ) Me: "MY GOALS ARE BEYOND YOUR UNDERSTANDING"
@NeekBot5000
@NeekBot5000 Жыл бұрын
For the part <a href="#" class="seekto" data-time="308">5:08</a>, if I used a custom color that isnt a number, instead used with the color palette (in the pen block), how do I put that there?
@BUNUforReal
@BUNUforReal 6 ай бұрын
Hey, i have a problem with this and idk why. I am half this video and after remaking the coding for the pen (before pen layering) when i run it a line is put under the entity for some reason, when it is lower than a wall. Any fix?
@mroofity6594
@mroofity6594 2 жыл бұрын
Hey Griffpatch, I believe I’ve figured out how to add verticality to the camera! When messing around with base ray tracing code trying to add jump, I accidentally stumbled on it. I’m awful at explaining things but I’ll attempt to: Create a new costume in the Raytracing sprite. Make that sprite absolutely massive. The bigger a sprite, the further it can go off screen from what I’ve seen. Create a new variable to represent vertical looking directions(would suggest adding a cap to it of 400. It moves 4x as slow as normal directions from what I’ve tried)[I’ll be calling the variable *up* ) Then, where the normal bricks for raytracing is, replace the bottom of the wall generation with this [switch costume to (Huge)] [go to x: (x) y: (height - up)] [if(y > -180){ [Pen Down] [Change y by (height*-2)] [Pen Up] }] [switch costume to (hitbox)] This is probably a bad explanation lol. If wanted, I can send a turbowarp link with the vertical stuff,(unsure with how it mixes with enemies and other things yet) Also Griff, massive thank you for the tutorials and everything else you have done for the scratch community. Your work is truly amazing mate
@FlummoxTheMagnificent
@FlummoxTheMagnificent 2 жыл бұрын
Oh, I simply did it by adding scratches mouse y variable to the height. I did the same thing with mouse x for turning, and now it feels like a proper first person game!
@TheAccursedEyeball
@TheAccursedEyeball 2 жыл бұрын
A turbowarp link would be nice.
@actisgone2992
@actisgone2992 2 жыл бұрын
Make it so that we can transfer into different levels of the game because this seems like a perfect way to make a 3d horror game in scratch! Reminds me of IMSCARED
@robpk168
@robpk168 2 жыл бұрын
To change levels, just switch the Level and Level Color sprites when you touch an entity.
@-Fidelis-
@-Fidelis- 10 ай бұрын
Griffpatch doesn't fall, he makes the universe move around him.
@uitoll5314
@uitoll5314 2 жыл бұрын
<a href="#" class="seekto" data-time="750">12:30</a> Idk why but this pop sound with nano is so sweet
@WylderGaming
@WylderGaming 2 жыл бұрын
Awesome tutorial, a tutorial on how to make the entities move/chase you would be very cool too!
@DudeSusIsTaken
@DudeSusIsTaken 2 жыл бұрын
how was this 2 days ago the video literally just came out lol
@nicularstar
@nicularstar 2 жыл бұрын
@@DudeSusIsTaken Joining to Griffpatch's Membership allows members to get early access on his videos
@xioana
@xioana 2 жыл бұрын
Make a sprite named bot and make another raycaster, except for the bot. Also make sure in the player raycaster you add the ability to look at the bot, Add a if inside the bot raycaster that checks if touching player (also make sure it has level too lol) and broadcast touching player, In a when i receive block point towards player and move 5 steps. There you go. (sorry i dunno how to do it with the 2d sprites)
@iozok
@iozok 2 жыл бұрын
Also like the idea of having enemies chase you!
@1080GBA
@1080GBA 2 жыл бұрын
Emperorororororoz55
@hermenthicclol1848
@hermenthicclol1848 2 жыл бұрын
yea
@coolswag352
@coolswag352 2 жыл бұрын
well if you want to just do what i tell you make sure you do this in the entity's step1: put a put a move [ the speed you want ] block in a forever loop step2: add a look at block of the input of player ya done
@jumpwithkarl
@jumpwithkarl 2 жыл бұрын
@@coolswag352 the only real downside is that they move through walls, they could work with ghost related enemies
@1080GBA
@1080GBA 2 жыл бұрын
@@jumpwithkarl ghost in among us
@il.yso_
@il.yso_ 2 жыл бұрын
embarrassingly, I managed to mess up the coding, so I go back and keep try to fix it, but it was no use. I’ve come back to watch this video for the 3rd time. Wish me luck!
@salih2d486
@salih2d486 2 жыл бұрын
griffpatch: are you touchin yourself? the scratch servers just being confused haha
@lanied09
@lanied09 2 жыл бұрын
I’d like to recommend something. I saw a video that you made nine months ago where it makes its own maze what if there’s people who want to have replayability in their games so hopefully you can make a tutorial on how to make a 3-D game that makes its own layout.
@RaharOfficial
@RaharOfficial 2 жыл бұрын
BIG thanks for the tutorial! This is a lot helped me!
@griffpatch
@griffpatch 2 жыл бұрын
No problem!
@tadking8130
@tadking8130 2 жыл бұрын
Thanks for tutorial now i can make my dream arena shooter!
@vas-poenitentiae-08
@vas-poenitentiae-08 2 жыл бұрын
I've had a small problem with this. I set the pen colour to something specific, using the tool that lets you use the eyedropper. When I changed it to the pen colour block that uses numbers instead, the walls didn't generate. Is there any way for me to do this in another way that might work?
@gdb5549
@gdb5549 2 жыл бұрын
I have added a few custom features to my game, like a brightness cap to the sprites, and fps counter, and a telescope
@thecrimsonring2507
@thecrimsonring2507 2 жыл бұрын
How
@RhinoDudeWozz
@RhinoDudeWozz 2 жыл бұрын
Griffpatch could is suggest you do a part 5 on Textured walls And btw Your content is amazin keep up the good work! :)
@MOMKUNG999
@MOMKUNG999 2 жыл бұрын
it is part 7 btw
@RhinoDudeWozz
@RhinoDudeWozz 2 жыл бұрын
@@MOMKUNG999 loL
@ncjdwincwjqi
@ncjdwincwjqi Жыл бұрын
hello griff, know im a bit late but as soon as i ran the project after the insertion sort, my raycaster lost shadows and did overall not work that well, i am a bit confused as i do not know what to do. any tips?
@TheMershGuy
@TheMershGuy Жыл бұрын
i have a problem, when i finished the "handle entity drawing from the list" part the whole game was just the sprite of the entity (which was the cheesy puffs), how do i fix this?
@theoctagonguy24
@theoctagonguy24 2 жыл бұрын
Hi Griffpatch! When I did the stamp thing, My entity went bigger when I walked away from it, and a very big one was in the background behind everything, any tips for this bug? Thanks!
@encryptedpenguin3220
@encryptedpenguin3220 2 жыл бұрын
I have the same bug if you find a fix please tell me thanks. (:
@thatonepulsebladepilot9065
@thatonepulsebladepilot9065 Жыл бұрын
Me too
@thatonepulsebladepilot9065
@thatonepulsebladepilot9065 Жыл бұрын
I don’t know what i did 😂
@legendgames128
@legendgames128 2 жыл бұрын
"Pants." griffpatch 2022
@LitoMike
@LitoMike 2 жыл бұрын
*" P A N T S . "*
@solomontakar4343
@solomontakar4343 7 ай бұрын
wow, thank you so much Griffpatch, you really helped me alot. Thank you so much for your help!!!! p.s: you know a lot about scratch, you make learning and math really fun, thanks.😄😎
@Froyo1002
@Froyo1002 2 жыл бұрын
hey griffpatch! I'm having problems with my raycasting where it will only draw one row right down the middle and I dont know what the problem is. can you help me?
@thebrends
@thebrends 2 жыл бұрын
Scratch team: watches griffpatch break scratch laws Scratch team: Excuse me?
@1080GBA
@1080GBA 2 жыл бұрын
I really hope there will be a multiplayer raycasting episode
@listed7568
@listed7568 2 жыл бұрын
same
@alex2792
@alex2792 Жыл бұрын
I wonder how that would work.
@Scratchfan321
@Scratchfan321 2 жыл бұрын
Oh goodness, I've not even thought about depth sorting in years!
@ARandomDog871
@ARandomDog871 11 ай бұрын
Can you help me with this? Every time i move or look around the pen sprite follows the direction and the x position of the player sprite.
@mrequable
@mrequable 2 жыл бұрын
Could you show us how to add a crouch system? That would be really interesting!
@ehabgame
@ehabgame 2 жыл бұрын
And jump
@wyattlogan8129
@wyattlogan8129 Жыл бұрын
hey does anyone know why i am only seeing my background? Ive gotten to <a href="#" class="seekto" data-time="660">11:00</a> of the video and don't know what I have done?
@SwankemasterSupreme
@SwankemasterSupreme Жыл бұрын
Raycast sprite is too big
@wyattlogan8129
@wyattlogan8129 Жыл бұрын
@@SwankemasterSupreme I changed it but it didnt do anything for it
@Syamfprch
@Syamfprch 4 ай бұрын
I think its because of somehing with the erase all block, works fine if you remove it while keeping a copy in the light entity, but you cant place the entities behind walls
@ElentYellowrone
@ElentYellowrone Жыл бұрын
so cool and I learned a lot thank you for always answering my questions
@cironix
@cironix 2 жыл бұрын
im doing this for a contest too! hope I win. It took me 30 minutes to figure out why there were 2 of the entities then I realized I made 2 variables. 1 was a misspelled 'hight' and the other was 'hight' so that broke it. Thanks for encouraging me in coding! :)
@kyepulham6726
@kyepulham6726 Жыл бұрын
Thank you For this comment i was just struggling with that problem!
@Reddblue
@Reddblue 2 жыл бұрын
This series is so amazing. I think a good tutorial would be to make textured walls
@nilzethalves6507
@nilzethalves6507 2 жыл бұрын
I agree
@real4kGaming
@real4kGaming 2 жыл бұрын
Suggestion: add Multiplayer 3d, with the players appearing as a separate entity
@anything_productions_lol2354
@anything_productions_lol2354 2 жыл бұрын
im already attemting that!
@malwaremation-informaticaa9749
@malwaremation-informaticaa9749 2 жыл бұрын
Too easy to make a tutorial. But it would be cool.
@thememer4071
@thememer4071 2 жыл бұрын
I’m already trying that,I’m trying to make a 3D undertale remake
@thememer4071
@thememer4071 2 жыл бұрын
3D multiplayer undertale full game remake!
@real4kGaming
@real4kGaming 2 жыл бұрын
@@thememer4071 that sounds very hard to make, but 3d Undertale would be very fun to play
@J.C.Cuber1
@J.C.Cuber1 2 жыл бұрын
THIS IS AWESOME!! I CAN'T WAIT T FINISH THIS!!!
@blakeishere.
@blakeishere. 2 жыл бұрын
I have a problem. When I remove the blocks from the Define Stamp Entity block and follow the instructions perfectly in <a href="#" class="seekto" data-time="1380">23:00</a>, the entity seems to have a strange effect where it stamps itself a bunch of times, and overlays on each other, causing there to be a huge kinda line across the lower bottom of the screen that changes as you move directions. It also removes the walls. I don't know what to do to fix this problem, as I have checked multiple times over on this video alone to see if I have done anything wrong. Please help!
@koraichu
@koraichu 2 жыл бұрын
We should learn texture mapping and the Doom-Style effect that it uses for calculating height! With that, we could make a lot more intricate levels, I think.
@artmon_
@artmon_ 2 жыл бұрын
Very good video, maybe add a multiplayer system.
@noobertplaying2395
@noobertplaying2395 2 жыл бұрын
Dude Its IMpossible to Add Multiplayer In Scratch
@saverofthewo
@saverofthewo 2 жыл бұрын
@@noobertplaying2395 no its not cloud variables
@larf3995
@larf3995 2 жыл бұрын
ive got a problem where it draws a line straight through the middle no matter what, spanning from the top to the bottom of the screen. any idea how to fix this?
@LuaWorks_Official
@LuaWorks_Official 2 жыл бұрын
Hey griffpatch, I have a problem, When ever I turn the sprite looks like it follows me, the size gets bigger but it doesn't stay in its own area. And this gets annoying, is there a way to fix this?
@lorenzohfj1310
@lorenzohfj1310 2 жыл бұрын
<a href="#" class="seekto" data-time="1391">23:11</a> - problem: the entity don't stamp ☹️
@TheSumOfAnIdeod
@TheSumOfAnIdeod 2 жыл бұрын
i have that problem too
@aamirrt
@aamirrt 2 жыл бұрын
Samr
@annihilate2479
@annihilate2479 2 жыл бұрын
This is great hope the enemy’s will kill in the future and after this can update the platformer series
@RedNarrowBird
@RedNarrowBird Жыл бұрын
I dont understand why but for my game when i play it the enemy will clone itself as the wall in some bits, ive come down to it possibly being the direction variable, any advice? this happened around when he was trying to make enemies not visible behind walls.
@richardtoycloset2834
@richardtoycloset2834 6 ай бұрын
How come at <a href="#" class="seekto" data-time="881">14:41</a> when it shows that im supposed to have nothing for draw type an draw x I had to put the same number that is shown on draw dist so I dont see 2 Nanos?
@itzwindows
@itzwindows 2 жыл бұрын
Could've you used a faster algorithmn than insertion sort? (e.g. quick sort, insertion sort) While the sort you used is a bit faster than bubble sort, it is still considered inefficient due to its O(n^2) average performance (meaning that it makes n^2 comparisons/swaps where n = the number of items in the list).
@JulienVanier
@JulienVanier 2 жыл бұрын
The trick is to start from the last inserted position. When the next wall is next to the previous wall (which is the majority of cases), the search will finish after one change by -1 or +1. Only when switching to a far away wall will the search take longer. So insertion sort has a much better actual performance than the worse case O(n^2) and is a great choice here.
@rivercape982
@rivercape982 2 жыл бұрын
What?
@silasellenberger-march588
@silasellenberger-march588 2 жыл бұрын
scratch: we dont have pen layering griffpatch: i,m gonna pretend i did not here that
@jaythezerosix
@jaythezerosix 2 жыл бұрын
i like the uploads and games you make in scratch and youtube! my favorite game made by you is hill climb racing.
@PFush16_
@PFush16_ 2 жыл бұрын
nice video griffpatch! just one question, what happend if when I run the project the walls and level disapear? :(
@retro_roy5591
@retro_roy5591 2 жыл бұрын
big problem, I had a problem and found out that it was coming from the define draw at <a href="#" class="seekto" data-time="1042">17:22</a>, on the second repeat, when I put a less than all of the walls vanish, and when I put a greater than, the walls are visible but most of the go in front of the entity when they aren't supposed to. Pls help. edit: I found out that the lists are out of order, how do I fix this?
@leac7540
@leac7540 Жыл бұрын
It seems that when i start the game, the brightness is working but the entity gets smaller as i get closer to it. There also appears to be a black object of my entitys head in the backround. Any fix?
@tiedsebas345
@tiedsebas345 7 ай бұрын
hello I have a problem when I follow the tutorial everything goes well but at minute <a href="#" class="seekto" data-time="1401">23:21</a>things happen with nano appears in the background and what should happen in the video does not happen please help me
@goldenrobot5483
@goldenrobot5483 Жыл бұрын
when i move the enemy behind a circle on the level it appears in front of it, but regular walls are fine, any idea what's going on
@salih2d486
@salih2d486 2 жыл бұрын
I have a big problem with my entity because i just did what you did and i just have problems. my pen sprite/entity is 2 times in the lists and one of them is over the pen and one under. what should I do(sorry for my bad english)
@QuantumQuest444
@QuantumQuest444 2 жыл бұрын
<a href="#" class="seekto" data-time="1700">28:20</a> Ohhhhhh Myyyyyyyy Godddddd, that trick is awesome! Thanks Griffpatch!
@scd74186
@scd74186 2 жыл бұрын
I was up to <a href="#" class="seekto" data-time="525">8:45</a> when I realised that there are now two distance variables are in the pen sprite and now the project doesn't work. Can you help me with this please?
@rachnamkoppikar2117
@rachnamkoppikar2117 2 жыл бұрын
griffpatch at <a href="#" class="seekto" data-time="675">11:15</a> when you say to click the green flag , the project does not work what to do now ?
Collectables & Enemies that Chase | E5. Crazy Fun Raycasting
25:34
ChatGPT Makes a Scratch Game
10:30
PolyMars++
Рет қаралды 973 М.
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 38 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 78 МЛН
Дарю Самокат Скейтеру !
00:42
Vlad Samokatchik
Рет қаралды 8 МЛН
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 42 МЛН
I Paid Game Developers on Fiverr to Make Minecraft
11:13
BadGameDev
Рет қаралды 1,7 МЛН
6 Developers make a Scratch Game Without Communicating
15:00
Jackson Academy
Рет қаралды 167 М.
The Disturbing Minecraft Experiment You’ve Never Seen
35:24
How I Made a 3D Platformer in 2D Game Engine
21:23
ggenije
Рет қаралды 451 М.
Simulating the Evolution of Rock, Paper, Scissors
15:00
Primer
Рет қаралды 1,1 МЛН
Using HACKED BLOCKS in Scratch
5:34
SL Smart Mind
Рет қаралды 212 М.
I Made Sorting Algorithms Race Each Other
8:24
Green Code
Рет қаралды 76 М.
Cookie Clicker in Scratch But It Gets More Complex
12:26
ggenije
Рет қаралды 207 М.
Sprites in a 3D World | E3. Crazy Fun Raycasting
25:53
griffpatch
Рет қаралды 737 М.
Now THIS is entertainment! 🤣
00:59
America's Got Talent
Рет қаралды 38 МЛН