"Mouse Pointer Lock" in Scratch? ⚡️ TurboWarp Experiments! (Raycasting E9)
Vložit
- čas přidán 20. 07. 2024
- Learn about Mouse Pointer Lock, and how it can be enabled in our Scratch projects with this bonus TurboWarp tutorial. We are then released to pan the mouse around infinitely large areas never hitting the window bounds. We'll also update our Raycaster series to include a pointer lock mode that is fully backwards compatible with your Scratch Game.
⏩ Pointer Lock TurboWarp - experiments.turbowarp.org/poi...
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 the RayCaster Series - scratch.mit.edu/studios/32774...
👀 Next Episode #10 - • "EPIC 3D JUMPING GAME"...
👀 Part 1 - • Crazy Simple Raycastin...
👀 Full Episode Playlist - • Crazy Fun Raycasting (...
👀 Quick and Fun Tutorials - • Quick and Fun Scratch ...
❤️ Scratch Addons - scratchaddons.com/
-------------Video Chapters-------------
0:00 Intro
1:27 TurboWarp - Pointer Lock Experiment
2:44 Mouse Speed x & Speed y
3:12 Raycaster
3:42 Pointer Lock Detector
4:47 Player Rotation
6:06 Panning Up and Down
7:12 Limiting Up and Down panning
7:58 Outro
Next Episode #10 - czcams.com/video/88yXUZ5BO1M/video.html
Part 1 - czcams.com/video/M1c5TcdITVs/video.html
Full Episode Playlist - czcams.com/play/PLy4zsTUHwGJKolO9Ko_j6IStFIJnTYBul.html
is this video optional?
Yes it is :) - Only when you get to video 10 you'll have to only take the top three blocks from the mouse controls rather than the large chunk - you'll see when you get there!@@Z4ntherr
why is there only 3 replies including me
idk@@subspacetripminegaming
@@subspacetripminegaminggood question
I haven't used Scratch for nearly a decade (I mainly program in C now), but I still find myself watching this guy's videos because he was a huge inspiration to me when I was a kid.
His lessons can still be useful for applying to projects in other languages
So cool :)
Then you never visited the Scratch 3 website!
@@griffpatch your my inspiration for coding scratch I love coding because of you!
ngl same
So cool to see you introducing turbowarp to a wider audience!
Hey Griff patch I took a break for a good year and I realize what you doing so I’m going to start back up and I will share my projects with you through this wonderful year
Nice!!!!
hi
@@griffpatch hi giffpatch!
I Downloaded TurboWarp On Phone
Hey griffpatch, just wanted to thank you for everything you've done.
Your tutorials have taught me a lot of things about scratch, and also helped me calm down and helped me through some tough stages in my life.
Thank you for this kind of content, please continue doing it. You're not just teaching, you're changing lives.
I'm moving on to JavaScript, Python, and C but I still watch your videos to this day and I still code in scratch sometimes. I loved you as a kid. Keep up the great work!
Thanks for sharing! That's so cool
Will the series continue in turbowarp or in scratch
Scratch :) - But now we can also use Pointer Lock in TurboWarp if we wish
@@griffpatch so this video is optional
@@qwasr1278 yes it is
@@qwasr1278 yo db cooper whats goood
@@crazychicken8290 ”say my name”
Hey Griffin! As a beginner, your Raycasting tutorials helped me lot to get better on Scratch. Now I'm slowly realizing how Scratch blocks works. Thanks for your help!
Glad I could help!
@@griffpatch Yes you could! But another thing will help me a lot to add Joysticks in 3D Games for mobiles!
TurboWarp really is amazing! It supports cloud variables for anyone who uses it, even people who are new to scratching, and they can be stored in local storage after your project is packaged, meaning it can save your progress in a game that's very long. That's perfect for making an RPG!
I have always admired how you always asked for your subscribers feedback to improve and how you are so talented. As a kid, I loved using scratch. But, i didn't know how until I found you. I have improve a lot, thank you so much ❤
-Love your tutorials!
The custom mouse cursors in games are always really cool! I think they add a bit more personality to the game.
This is insane, you’re the reason I’ve always wanted design games when I grow up ❤
Me too! :)
Griffpatches videos are so fun to watch, I just get so happy when I see that he has posted!
Even after leaving scratch and programming in Unity, I love to watch your videos!
It’s just so amazing to see Griffpatch still using Scratch for many years and never got bored of it. Me either because it’s just so colorful and fun to use.
It’s also amazing to see him make a tutorial outside of the vanilla Scratch since TurboWarp is far more superior. I have to mention, though, that I doubt that the vanilla Scratch will improve or have any new features anytime soon, the moderation has just too many issues, but there are a few alternative ways to share TurboWarp-exclusive projects, as well as Gandi IDE projects.
Either way, continue your work, Griffpatch. Don’t give up. You have inspired so many people, and to be honest, it is worth it.
Insane tutorial Griffpatch! I have resumed scratch yesterday and this was very helpful. Hope you have a wonderful year!
Glad it was helpful!
@@griffpatch Can You Make A Sonic The Hedgehog Tutorial Please
Hey griffpatch, really great video, and series! I feel like it would be cool if we could be taught how to make floors and ceilings with textures, even if it’s optional. Hope you have a great rest of your day!
I think this series have to continue. I'd like to see things like custom floor you can interact with, like a raycaster so enemies can detect you or not, some bug fixes with the entities, better lighting, some kind of baseboard for certain walls and maybe a way to be able to stack levels so tu can go up, down and all around.
Imagine if scratch gets a 'pro' mode, which basically upgrades the 'toy-like' block system, allowing for complex 'mechanisms'. Also Templates would be cool, like 'ready-to-import' block segments made by scratch devs, like a 'physics template' or 'sidescroller template'.
Custom extension like in turbowarp would be cool
There are programs like that, just none that have been made by Scratch.
The Scratch team literally said they won't add that, they said to find other programs then
@@circuitcoder paywall? 😏
Gandi IDE is a scratch mod aiming just for this
Turbowarp is honestly fantastic and has so many welcome changes and features.
Dang I was hoping for a new RPG tutorial but this actually is very helpful.
RPG! It's about time I made one of those episodes :)
Nice! Thank you Griff
My pleasure
You are one of the most talented coders I have ever seen and have greatly inspired me. Thank you ❤
I’m really happy you noticed me 😀
Thank you so much 😀 - That's great to hear!
@@griffpatch I hope some day I’ll be as talented as you, I want to be a game designer once I grow up.
@@griffpatch I like your tutorials, you are the best scratch coder!
@@ashdroidgamer3878 me too
@@LukeAnimador Yeah
In the turbowarp packager, there are a lot of mouse options! Like locking the mouse in the game window (if not fullscreen), custom mouse png and lots more!
that pointer lock experiment is really cool. a friend of mine and me are both remaking minecraft and we both are using the pointer lock experiment. it helps alot to make the gameplay easier and smoother. btw the friend i was talking about is robostew and he has already shared his project. i haven’t, but i have shared some devlogs on yt.
goodluck making minecraft in scratch, it will be extremely hard with 5k+ blocks in the project
@@uju8222 5k+ is an understatement. For reference, griffpatch's 2D Minecraft has 19k. Imagine how many it would be for 3D Minecraft.
This is great! Scratch has come a long way, whats next, jumping? Multiple wall heights? Crouching? Cant wait to see it all.
jumping is just scrooling the wiew down and crouching is just litle up
it's a bit more complicated because the walls that are further back go up by a smaller amount than the walls that are closer
Stairs?
I've been waiting since... at least yesterday for this video to come out!
Hope it was worth the.... wait :)
Great video Griffpatch, I’d love to see things like jumping, shooting weapons, doors and moving sectors added. I also think, that it might be possible to build nodes in the game, so it can run faster.
Wow! Fun video :D. Can we get more turbowarp videos? I know they have really cool extensions. Like Camera extensions!
this whole series is the reason i stay in scratch :)
the thing i want the most is the possibility of changing mouse texture. im sure it can render so cool on some Scratch games like your games, Griffpatch!
turbowarp can do that
@@A_literal_cube... in the normal Scratch
I like this tutorial!
This is amazing!👌
Hey Griffpatch! Would it be possible to procedurally generate a level in this raycaster? If so, I would love to see a video on how to do this. So far this game is perfect for a backrooms-type game since we can make a first-person maze that even has entities that chase you. If we had procedural generation, we could make a completely random level. Two other things I would love to see in the future if possible are:
1. Larger Maps
2. Enemies that wander around on their own and don't chase you unless they can see you (probably detect if they can see you by raycasting from the entities and also checking if you are close enough)
No rush for any of these things, it would just be really fun to mess around with them if you ever add them.
This might actually be pretty easy, for the larger maps can either have you decreasing the player's speed to simulate it, or using clones along with special scripts to segment your level.
Although if you go for the second option, you could simply draw multiple screens and have code that positions the clones and has them assigned to a segment
Although for the entities, my best guess on what to do is have it so they pick a direction, and if they collide with a wall, they will pick a different direction. Then to have them chase you, give them a field of view like the player where it also checks if the player is colliding with it (This can somewhat be tested in episode 1 with the flashlight to see if it actually collides)
Which since they only chase you while "seeing" you, they may never collide with a wall
this will help with my FPS game. good episode
Will there be another tutorial, I just finished watching this great series and would really like to see it be continued!
There is an Turbowarp extension that lets you change what the mouse looks like and also hide the mouse or replace it with a sprite put that works a bit differently.
Yes it's very cool, although it's not compatible with scratch
Thank you so much for doing these things
I would hope eventually scratch adds this as another extension pack like the pen blocks. A quick “lock mouse” and “unlock” mouse
Keep up your great work!
As a turbowarp exclusive developer, this is a dream come true.
Wow, never thought you would make a video about this extension! (it’s not really a extension, it’s the turbowarp experimental mouse lock thing, but they are the same thing)
I just watch your videos for fun, or I actually use the info. Keep up the great content Man.
I noticed in Episode 6 that you did reflections and animated textures. Would you kindly make a tutorial on those?
Oh wow thanks griffpatch amazing tutorial 😎
Haven't even watched the vid yet and I'm EXITED
Nooooo! Come backkkkkk :O
I made a really cool project with this, you can place things anywhere then press space to make it 3D, and I'm working on making it so you can redraw entity costumes IN GAME.
and can you make a tower defense game?
TurboWarp is the best version of scratch when making big games, when making games for fun. We use Scratch but using pointerlock, mouse cursor, animated text, block 2d physics and custom extensions, we can make amazing games I'm scratch
Finally, turbowarp!
Hey @griffpatch, I've been tinkering with the idea of enemies having directional sound; For example, an enemy gets quieter or louder the farther it is. The thing is that I can't figure it out, and I think it would be an awesome next video idea!
Idk How you became so good at scratch, but I love your vids
thank u for tutorial
I didn't know this is possible, but this will help me with the game im working on.
Please continue this tutorial.
Cool this is a great idea for my game, thanks :D!!! Could you continue minecraft moding?
Griffpatch you should make a tutorial on how to make a merging game with grid snapping and upgrades. Keep making amazing content!
Wowzers! I never thought i’d see the day the mouse cursor being locked in place
Wow that's awesome
LETS GOOO LOVE YOUR VIDEOS
Things you can add to the RayCasting new episode: add ability to player to jump, add platforms and stairs, add floor and ceiling, add animated sprites, add shadows, add animated walls, add path finding algorithm for entities, and add doors, and add lighting system, also you can make the game first person shouter and add gun
When I was coding this is the first thing I started and it gave me a huge jumpstart I could just say what I want something to do and find the correct blocks for it like over %85 of the time
Thank you bro
Hey Griffpatch, Huge fan, i just had one doubt, is there a way of keeping different wall heights for different parts of the game?
Always down for a new griffpatch video :D
Bro i thought it will be little hard using turbowarp but he is on another level
You always make my day, and whenever I'm sad or angry, I just watch your videos!
This makes this a whoooole lot easier! :)
Hey there, Griff! I heard about a TurboWarp Extensions called the rxFS. It says it can create in-memory filesystem. If this means you can make the save/load gameplay, do you plan to make a tutorial in the future? That would be helpful!
You're gonna continue the series right? I really hope so cuz this is a really exciting project, I also wanna add some reccomendations:-
Maybe a random maze generation in the game
Flashlight maybe?
last of all is enemies with different ways to oof you. It would lead to a game over screen.
maybe also stairs? maybe also 3D minecraft one day?(might not be possible unless you are griffpatch, this might be higher than griffpatch level tho)
Do you have any tips for saving and loading levels? (as in every object stored in 1 string) I'm trying to make a level editor but the saving and loading is pretty tedious, and how does checking for invalid data work? When I put invalid data in my level editor it either creates a mess or just starts to lag like crazy, would be pretty cool for this to be a tutorial on but you already have many tutorials planned!
Griffpatch thanks to you I am able to make such an amazing game about the backrooms! :D
And I kind of found out how to make maps bigger with the cost of the FPS being lower and some detail on the rendering of the map is lost by a lot, and now I have jagged edges and no smooth curves on the maps
Griffpatch! I love your hill climb racing game! Can you please teach us to make something like that! Ive always wanted to do that
@griffpatch do you know when you are going to make another episode for this series? thanks ( - :
Thank you so much griff!
This was such a helpful tutorial and I hope to see you use turbowarp in the future!
This is seconds wgo
How do you have this 2d ago
@@objects1originallyhe joined the channel it’s a perk you get (early access) if you join
Was this prerecorded before the pointer lock extension was added to turbowarp?
Or do you just prefer this way
can't wait for more! also is there a way to make fully 3D objects like a cube with a raycaster?
Not so much no... All entities in the game are drawn as stamped sprite costumes.
@@griffpatch :OOO Even the walls!?!?!?!?
Probably, you would have to define the shape and do complex collision calculations based on that though...
Hey! I don't use Scratch but maaan, I think you must have been told this already but Paper Minecraft was so fun for me when I couldn't download any games!
I'm trying to start making games (I like Python and C# coding) I hope it goes well
hey griffpatch! will you make a tutorial on how to make jumping in the 3D Raycaster?
i was thinking of using a python program alongside scratch checking for the mouse position ever other frame but this is far simpler!
I love your get over it game❤❤
Omg I got a like from the one and only griffpatch
I'm learning html, css, js and c# for unity. But I still use scratch because you are there and I like scratch a lot.
im locked and loaded into this tutorial!
I have an idea for episode 10 maybe you should include "obstacles" and "jumping". Anyways I love your video's, You really inspired me to move on!
turbo warp is really amazing
@griffpatch please add things that are less than wall hieght and actual cielings, maybe treat it like how doom does, by reading the color hue on the map as how high up the object is? you could support verticle textures by having a third texture which applies only to verticle items!
Ok that is so cool
Will one of the episodes be on Y level raycasting e.g. overhangs, floors, ceilings, etc.? I have attempted to do so multiple times with my own raycaster project, but the results haven’t worked well.
is it possible to make a floor and ceiling by checking were the walls are and drawing lines between the walls that have the x coordinates the same
Hey griff patch love the video will you give a tutorial on how to make a 80s ball bounce game
Wow, I did this part of the tutorial before it came out!
Ha, nice one :D
They added a new gallery the have a lot extensions which is honestly cool but if I can see you using them all it will be more fun
It's the new block injector that is coming soon that is going to cause quite a stir!
Is this in Turbowarp or Scratch?
@@reality_101 turbowarp
@@reality_101 TW. Scratch is only fixing the bugs until something new happens
Now we need a tutorial for a wire-frame renderer!
Turbowarp boosts scratchs performance so much that you can make the scratch stage resolution higher than 320x240 to 960p or 1080p if you have a bigger screen resolution.
There is also an extension called Pen+, I managed to make a 3d realtime renderer that uses .obj files with textures in just about 5 hours
woah :o that sounds complictaed. good job!
Wowsers
@@pixlol thanks, i just need to get the sorting algorithm to work so the faces are rendered in the correct order, but it's really just some simple math... the obj parser took the most time, the renderer itself was done in 30 minutes
@@meehdrescher i really wish i could be that good of a scratcher. thats really impressive
@@pixlol it mostly has to do with the fact that I use scratch for 8 or 9 years now, it's all about practise...
i generally write javascript, lua, c# etc. but i still watch your videos since i was doing stuff in scratch
For those wondering, this can now be done with the pointer lock blocks or by checking it off in the packager. The experiment has worked!
To get the extension, go to the extension panel and search up Pointer Lock.
Or.. check the option off in the Packager.
For that RPG game, could you show us how to do the screen scrolling like in the og
Hey Griffpatch, I added a mini map in this bitmap raycaster and it was easy! But I have also made a list-based raycaster with the help of your Grid-List tutorials and I want to make a mini map in that too; but the problem is that stamping my 8 by 8 tile many times makes the raycaster super slow!! Can you help me that by finding another way of making the map?
Thanks
Hey griff! I want to ask you, if this series will continue. I want to add calculation for height and floors!
Finally! 3D can now be utilized to its fullest.