Quick Fixes for Raycasting Ep.2-6 with E7 preview!
Quickly fix the 6 most common problems encountered while coding our Raycasting series. This includes fixes from episode 2, 3, 4, 5 and 6. See the chapter headings for more information, or watch the intro for a quick summary. The bug fixes include getting more than one enemy and collectable type to appear in the game - phew! As well as rendering issues, and extending for more than 10 enemy types.
I've also included a quick preview at the end of the video of the upcoming episode 7 that will be available for early access very shortly!
👀 Next Episode 7 - • How to TEXTURE MAP Wal...
🚀 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
👀 Part 1 - • Crazy Simple Raycastin...
👀 Full Episode Playlist - • Crazy Fun Raycasting (...
-------------Video Chapters-------------
0:00 Intro
1:19 1. Small Player Syndrome
2:02 2. Only one type of Entity Showing up
3:04 3. Mysterious extra Entity Appearing on Level
4:02 4. Entities cling to the edge of the screen
5:11 5. Help - My walls are all Sprites!
5:54 6. I want more than 9 entity costumes
6:32 Outro
Пікірлер: 1 000
can you do one for entities stuck in front of your screen?
@griffpatch
2 жыл бұрын
YES! oops - Just find the bit of code in the entity sprite that points towards player, and add an IF before moving forward that checks that the distance to player is greater than 0.6
@marshalz101
2 жыл бұрын
@@griffpatch ill try it, thanks!
@RedIntention
2 жыл бұрын
@@marshalz101 did it work
@Famouslounggaming
2 жыл бұрын
@@griffpatch can’t wait for projectiles and stuff
@bruhinator7808
2 жыл бұрын
@@griffpatch I can't seem to find the code you are talking about, it's odd because there isn't even much code to begin with.
When i opened youtube, i saw this video and i was so happy, i waited for this episode for so long, thank you Griffpatch!
@griffpatch
2 жыл бұрын
The texture mapping is coming shortly on this one's heels...
@Bruh-bv8mn
2 жыл бұрын
@@griffpatch so when do you plan to post the texture mapping?
@XNorYT
2 жыл бұрын
@@Bruh-bv8mn Maybe in a couple days.
@MOMKUNG999
2 жыл бұрын
@@XNorYT wow
@RobloxisFORREALlife
2 жыл бұрын
OMGG RLLY? SAMMMME
Thanks so much! I was so worried before because when I tried adding more than 9 entities, they were replaced by orange lines. Then after watching this, they are how I want them. But the whole level was sprites, and then I watched the part that fixed that problem, after fixing the 2nd to last bug, and everything was back to normal and how I wanted it. You are awesome, and have an great day! :D
@TripleX35_D30_UEOR
4 ай бұрын
Ewwwww
im so excited to the next episode, its really cool to see how 3D works, and your tutorials really help me to understand it, even tought i don't use scratch anymore, you teach :)
Nice tutorial! Scratch cats at the beginning look way too creepy lol
@griffpatch
2 жыл бұрын
I know, right?
@seancullin9440
Жыл бұрын
@@griffpatch 🕷🕷🕷
@VoidGravitational
10 ай бұрын
Becuse they’re “bugs”
I dont make the projects from his tutorials but it gives me ideas and some script i can use on my projects, so lots of thanks for making tutorials!!!!! 😀
@griffpatch
2 жыл бұрын
You're very welcome!
@blackwhitecartoonschannel2814
2 жыл бұрын
same
cant wait for texturing! also almost finished that multistyle i told you about a while ago. cant wait to finish:)
@griffpatch
2 жыл бұрын
Oh nice!
@woltherfx
2 жыл бұрын
@@griffpatch thx:)
@reglan_dev
2 жыл бұрын
What is multistyle
@Soupcan.-demoman
2 жыл бұрын
@@reglan_dev yea what is it?
@reglan_dev
2 жыл бұрын
@@Soupcan.-demoman i asked
2:00 I had to figure this out by myself! I am very happy to see you did the same fix I did! Thanks for the tutorials I am learning a lot
@griffpatch
Жыл бұрын
You're very welcome!
Can't wait for Episode 7! It would be awesome!!
@seancullin9440
Жыл бұрын
It is! It’s textures!
If used correctly, the 'My walls are sprites' bug could be beneficial! Like, in the pen sprite you can make custom walls using sprites, allowing for easier (but significantly worse looking) textured walls or darker colours like grey or saturated colours like pink.
@ghastlyGrenadine
Жыл бұрын
Or you could just use the other type of set color block that has a color swatch instead of a number, letting you use a total of 17 something million different possible colors
@M5J72XrtvEa24XteAIdNGA
Жыл бұрын
true, but they would look at you, spooky
@DaAlphaDawg
7 ай бұрын
feature, not a downside@@M5J72XrtvEa24XteAIdNGA
griffpatch is literally the best scratch youtuber, really appreciate helping us 😘👌
@benedictlaube7099
Жыл бұрын
I agree🙂
Cool little bugfix video, I can't wait to see episode 7 :D
Yes yes I was waiting for this one! I hated the mysterious sprite that shape-shifts! Thank you so much!
A while ago, I wanted to make a top-down game for an asymmetrical character so I couldn't just use the left-right rotation style. I ended up developing some code to switch costumes based on the direction of the sprite. Worked really well. I was able to separate the direction into any number of quadrants. How it worked was if the sprite was facing in quadrant 5, for example, it would switch to costume 5. The code would always return a number from 1 to the maximum number of costumes you wanted there to be. (And most importantly: -30 and 30 would both be in quadrant 1. So you could face north and a little bit to the west [Meaning, a small negative direction] and not switch to the last costume in the script. I'm really proud of it.) I think I'm gonna try to give the other entities in the Raycaster engine this code... Although, I would have to factor in where the player is *looking* and I have no idea how to do that. So I'll probably keep it contained in the top-down idea.
@griffpatch
2 жыл бұрын
Very cool
Glad we’re getting some bug fixes, this should help a lot of people! Edit: 5:50 you can also use the superior hex colors
Finally what I was waiting for. TYSM griffpatch!
Thank goodness for this episode I had a lot of these
The monster scratch cat is back !!
Nice video!
Griffpatch, i'm so exiting for the new episode to come out! I hope the next tutorial will not long.
Thanks, I needed that 4th fix. For bugs 5 and 6, I never had those issues because I decided to use a string (ITEM-Star, NPC-Nano, etc.) instead of numbers for simplicity. And I fixed the bug from number 3 early.
@griffpatch
2 жыл бұрын
Good stuff!
amazing tutorial as always
@griffpatch
2 жыл бұрын
Thanks :D - Now you can watch it lol
@CallMeScriptedOFFICIAL
2 жыл бұрын
@@griffpatch lol
I was wondering if you can add a path finding script to one an enemy in one of these tutorials. I tried doing it with your previous path finding tutorial, and adding that to the entity here, but it didn’t come out how I’d like. So I was wondering if you could cover that.
@griffpatch
2 жыл бұрын
That's a great idea - Although you will find that all the enemies everywhere just come running and find you... It's generally better if they wait until they see you first, and then come chasing... But give up again after a period of non seeing you. Clever stuff...
@danielszap6794
2 жыл бұрын
@@griffpatch yea. I get that. Which is why I plan to make my game with only one enemy. One enemy that chases you constantly. You have to find keys to unlock different areas as this enemy is constantly chasing you. But, my path finding hasn’t been working. Either way, I’m excited to see what you come up with. Keep on scratching!
@rchat42
2 жыл бұрын
Well try making a pathfinding for the 2d map?
@maxsanby9974
2 жыл бұрын
griffpatch made a path finding video i'm pretty sure so use that and try it!
@sajjkandola7918
2 жыл бұрын
@@maxsanby9974 I tried. it either didn't work or I'm a bad coder. Probably the second one.
thanks for posting this video! It really helped me with my game 👍
yay just came out when I was doing your platformer tutorial!
damn i've never seen a 3d game tutorial series this good ;-;
@lavender7447
2 жыл бұрын
Me too
Another thing you can do is instead use negative numbers for colours or even hexadecimal coded and instead check if type is greater than 0.
Thanks for the bug fixes. I had the bug where the entities and collectables would hang on to the wall. It was really "BUGING" me out. 😁
Can't wait for wall texturing! Also, try implementing up and down looking like I did! Maybe add some bobbing and floating enemies as well! ( This can be an extension to projectiles!)
Hello griffpatch, I know you likely will not cover ceiling and floor texturing in the upcoming video but do you think it could be done using the same methods we will use for wall texturing? Or would that be a separate, much more complicated task to complete?
@griffpatch
2 жыл бұрын
No, it will require a completely different approach... however, I do know it's possible... it's just that it will probably take the framerate right down to do it.
@yannismorris4772
2 жыл бұрын
For now you'll probably have to make do with more complex backdrops. (That is, if you don't mind having to limit your maps to where that floor texture makes sense.)
@KonScrip
2 жыл бұрын
Can't we just find an image, paste it at the floor in the backdrop costume, because it can work with a few continuous textures (like material floors like metal or wood)
If you want infinite sprites for some reason, you can put everything greater than 0 to be a sprite, then subtract 101 from all your wall colors until they are less than 0
@rickroller1566
2 жыл бұрын
i did that with the mod block
Thank you so much! I watched episode 4 and 5 twice and couldn't find my mistake for fix 2(I almost cried😅).
Super fun to watch, even though I didn't have any bugs shown in this video, it was certainly fun to watch.
I notice when some sprite gets too close, their colour tends to wash out. I think you could fix this by implementing some kind of tone mapping. I have no idea how to do it per pixel though but maybe you could do it based on the brightness?
@griffpatch
2 жыл бұрын
Before the entity stamp, change the brightness to 5 - rather than 25 -
@yannismorris4772
2 жыл бұрын
I just put an if-statement that brings their brightness effect down to zero if it gets any higher than that.
I love the mini bug fix episodes. I learned a couple tricks even though I didn't have those specific bugs.
@griffpatch
2 жыл бұрын
Thanks!
@lavender7447
2 жыл бұрын
Yeah
nice, love the videos Griff patch, keep up the good work! =D
I am so excited for Wall texturing. I just have one question though. is it posible to have transparent textures and textures that have holes in them? if so that would be super cool!!
@griffpatch
2 жыл бұрын
In theory yes, but not without much further work with the raycaster.
@yannismorris4772
2 жыл бұрын
Transparent walls *sound* like you can just set the ghost effect on the pen to some value. I don't know how the wall texturing works so I can't say how that effect will interact with it.
@V1ewSh0t
2 жыл бұрын
@@yannismorris4772 the problem with just setting the opacity is the fact that the walls behind it will not render because of the way the walls are rendered. You would have to somehow render the wass behind the opaque wall.
@V1ewSh0t
2 жыл бұрын
the way the walls are rendered is what the raycaster sees so all it sees is a wall and doesend see what's behind it. So you would need another raycaster Sprite to so the background walls, sprites and textures.
@rickroller1566
2 жыл бұрын
do two passes one with white backdrop and one with black, then figure it out
Griffpatch pls can you add: Jumping Up & down turning To see the top part of the maze Doors Sounds Crouching To see the under part of a wall Moving platforms Floor textures Ceiling texture A feature to adjust the height of the ceilling (like the maze walls) Player physics Game over Start menu Retry button
@LN20841
2 жыл бұрын
Yes! It would be good
@vladushonok64
2 жыл бұрын
But it's not that easy. Do you know how many episodes it takes to do everything? In addition, Scratch does not have a conventional 3D engine, because it will be impossible to make a 3D model, and if it is still possible, then let's think about "the fact that they are made using a Grid List (Just like with entities and a wall)".
@smoothturtle8723
2 жыл бұрын
Theoretically it is possible. Using variables to determine what height you are at.
OH MY GOSH, thank you so much for this video, I was really worried about my raycaster!
I don't think I've ever been so excited for something before!
@griffpatch
2 жыл бұрын
Amazing :D
Don't want to sound crazy but Colliding with the walls breaks the game. This is an issue I am facing.
@SuFFr
5 ай бұрын
You do sound crazy, but its probaly common issue
First?
@griffpatch
2 жыл бұрын
You got it
@patattack6847
2 жыл бұрын
Congratulations!
@creak7761
2 жыл бұрын
@@griffpatch this is the first time I’m first I’m like a minute late lol
Thank you very much for posting this video, I had 2 bugs from it. 1 left. Thanks griffpatch.
I only have four entity costumes and this level is looking really good! thanks for making this tutorial griff
Thank you for the fixed code for the types of entities I had a lot of trouble with them
Thank you for helping me fix my bug!
@ksubswithvideos-gs4qq
2 жыл бұрын
i will see if i can fix it without the tutorial BEFORE i try the tutorial fix
Thank you for your tutorial very much!
@griffpatch
2 жыл бұрын
No worries!
I had 2 problems in my game and the 2 problems were hiding just in this video. Thanks!
WOW! I have these bugs but I didn’t even notice until you mentioned it!!! Thanks Griffpatch, this helped me a lot on game dev
This is very very helpful thanks griffpatch :D
Thank you in general!
Great episode! This saved my raycaster!
@griffpatch
2 жыл бұрын
Splendid!!!
@briangao3381
2 жыл бұрын
@@griffpatch I'm currently playingg your mmo speedrun project
I subed I love your vids! Keep up the great work!
Great tatorial as usual =D
I had the stamps being the walls instead of the pen and this solved my issue thx!
Can't wait to see episode 7
I seriously can't wait for the jumping and custom wall system :D
Yes! Another new video!
You got like number 301 from me! Awesome video! Thank you for these videos!
OMG, THE EP 7 IS SOOOOO COOOOOOOL!!!
you are my favorite tutorials scratcher griff
you have to be the best teacher in scratch for making this video
I'm pumped for Ep 7!
@griffpatch
2 жыл бұрын
Me too!
Can't wait for texture mapping!
whats next after episode 7? I can’ even imagine on how amazing this series will become towards the future. Great work!
@agloreeeglora
Жыл бұрын
episode 8
THIS IS SOOO COOL!!!
love your videos!
thank you for helping me
“let’s get bug squishing” best line on this channel! 😆
@lavender7447
2 жыл бұрын
I agree
Nice Video
I can't wait for the textured-walls video as I already have a bigger game in mind that I want to make.
Thank you for fixing I thought I would never be able to fix my bug
YAYY ANOTHER TUTORIAL
They told me it was impossible but this man did it he made a 3d a game in scratch
@caseyyeow1649
2 жыл бұрын
He already did it years ago...
AWESOME!!!!
I can't wait for the texture episode
I just finished surround sound! Its now up on my profile (DemonX5) and I cant wait to see you use it in episode 7!
@LitoMike
2 жыл бұрын
since when did scratch have surround sound? i rember trying a few month ago and when it listened *with headphones* it wasn't panned
@SharkPool_SP
2 жыл бұрын
@@LitoMike Theres a dropdown menu for the pitch block, which has panning, that mixed with volume gives surround sound. Then it works by setting the entity volume to how close you are to it. Then the panning is set to if the entity is on your left or right side
Thanks griffpatch for the second bug fixes
Very cool! :D
Nice vid👍
I love your videos griffpatch 🙂
not really a "bug" but i found a way to replace the level proximity sprite, that also gives a higher framerate. if you set the sprite's size to 250% before checking for level proximity, then set it back to 1% when checking for the actual walls, it does the same thing but seemingly causes better performance for me. does require a couple tweaks though, like making the raycaster sprite a ball to account for it detecting further out in the corners at a bigger size.
Thanks, i had bug 3 and 4
I came up with different solutions for the mysterious entity and the sprite wall bugs. For the mysterious entity one, I made a blank costume and made the pen sprite switch to that costume every time after it stamped. For the wall one, I just made all their types decimals like 1 would be 0.001 and then in the script I made switch costume to type*1000 so that way I could have hundreds of different entities.
The beautiful thumbnail Spider Scratchy is back!
Thanks!
@griffpatch
2 жыл бұрын
WOW WOW WOW!!! My first super thanks - You are so very kind :D
@LitoMike
2 жыл бұрын
the thanks message sends comments? noice
@rickroller1566
2 жыл бұрын
@@griffpatch WAIT YOU CAN DO THAT
@rickroller1566
2 жыл бұрын
HOW
hey thanks for the fix ! will you add a way to create differente sized wall ? and will the mapped texture be also usable on floor ? in all case, keep the good work ! (and i'm so sorry for my bad english 😅)
@rickroller1566
2 жыл бұрын
yea use a height variable for the y multiply then put it in another list
PLEASE! do cloud saving! I desperately need it for my game and you are the only one who could do it right!
Nice!
ohh yayy i cant wait for textured walls hurray thank you so much
Nice 3D art at 1:48
I'm glad I was able to fix bug #2 by myself
Hey, griffpatch. Have you ever encountered a bug where a mysterious line forms where the original sprite is located? (It was a red line for me) Steps to reproduce: 1. Press the green flag 2. Tap on the sprite just to see where it is 3. Move to that sprite This might just be due to how I differentiated the wall colors and sprite types, but I'm not sure of it.. The fix can be done the same way you fixed that "extra entity" bug.
@autisticChronicles360
2 жыл бұрын
Yep, it's just the way I did mine. The way I fixed mine was by preventing an extra blank value from being added to the list.
thank you griffpatch i have been trying to get my 2 NPC's in thank you.
thank you griffpatch,i had the bug 2#
Nice video
hey griffpatch a long time ago I was new to scratch and I saw you first when I searched scratch tutorials yep am a long time fan of you am 10 years now and still love your videos and I found a ting in scratch that when people that don't have cloud variables they cannot expiries multiplayer cloud games because to them cloud variables don't exist also mine is minecraft style so it has an health bar and a pointer
i somehow fixed the bug for only one entity showing on my own but it caused entities to cling to the edge of the screen, thanks for showing me how to fix it
1:48 can we appreciate how cool this looks?
I've been having an issue with my level showing up completely mirrored from how it's drawn. This happened after what was supposed to fix the skewing at the edges of the screen with high field of view.