How to make a 3D PLATFORMER in Scratch
Vložit
- čas přidán 22. 07. 2024
- ▶ Make 3D platformer easy: soba.xyz/?gg3d=
▶IMPORTANT on 7:10 do • I forgor
🎮Full game (you can "see inside" to check scripts)
▶scratch.mit.edu/projects/9446...
📖 Learning material
▶Collision developer.mozilla.org/en-US/d...
▶Delta Time • Dear Game Developers, ...
▶RGB www.google.com/search?q=rgb+c...
▶About 3D • How to make a 3D Engin...
🎬Chapters
0:00 - Game loop
1:22 - Drawing 3D lines
3:49 - Soba - Easy 3D Platformers
4:33 - 3D Blocks
6:42 - Sorting Blocks
7:35 - Player and Camera
9:03 - Player Movement and Shadow
10:30 - Block Types
12:07 - Levels
🎵📜 Credits:
Music by: Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 4.0 License
creativecommons.org/licenses/...
"Screen Saver", "Relaxing Piano Music" - Hry
▶ Make 3D platformer easy: soba.xyz/?gg3d=
*▶IMPORTANT* on 7:10 place "Block Order" block before "Draw all blocks" inside "Draw" custom block.
i did exact same thing as you did but everything is great except that line are not exactly shaped like your i checked the code 2 time it is same why?
@@granddevelopres send the project
Please make a sky landers type game (skylanders graphics)
I'm soo bad at scratch:( every tortaril dont help me
actually, this does not work for me. The tutorial does not work for me, and this one was the only good one I could find, so I will never be able to make a 3D platformer
I WAS WAITING FOR THIS TO HAPPEND, FINALLY A 3D GAME TUTORIAL THAT IS NOT RAYCASTING
Yeah raycasting is just 2d from a first-person perspective, and the ealls are drawn by proximity, and not by their position in world
True, agreed
@@томниand raycasting overall looks bad and fake.
not for me though! I think raycasting's just fine.
Same here bro, just saw a different guy make a Minecraft like game in scratch and he uses ray casting.
Thanks for having us, @ggenije!
We are very excited to see the Scratch creators easily building some 3D games on Soba 😼❤
WTF is soba you mean scratch or do you use a Chinese scratch clone 💀💀💀💀
@@YourBoiUltra its the sponsor of the video
@@AxlGamer2022 oh
Bro is a roblox ripoff
hey when will there be a spot in early accesses?
It is good that you encouraged the viewers to experiment with the values, because I think that it is a more effective way of learning how to make better games.
This is the first video that shows how to make a 3D Platformer, TYSM ggenije
I have waited for this video for 4 months. Thank you
I clicked on this faster than my grandpa fell down the stairs.
You better make a 3D project next 😤
💀💀💀
Nah 💀
💀@@ggenije
@@DiegoGameDeveloperwhen I clicked on translate it was translated to Well!?!? Why did it translate to Well💀
I don't know if the part at 14:30 was there in the version you showed me, but I appreciate that you have encouraged people to learn how it works.
It was
holy this is too good to be real
@@Frederol1 i'm confused
@@Chrome_Cat I think he means that a collab with you and @ggenije is _too good to be real._
"in the next video we will upgrade our scratch program to make the graphics look like Unreal Engine 5.3"
Wow! Amazing tutorial, hope this gets some traction!
Much faster-paced than Griffpatch's tutorials!
Also congrats on the sponsor!!!
FINALLY, I HAVE BEEN WAITING FOREVER FOR THIS🎉🎉🎉
Step 1: make 1 new variable
Step 2: make 1 custom block
Step 3: add 100 variables, 500 custom blocks, and a level editor, complete with a lighting engine and HD graphics
Congratulations, you just finish the easiest tutorial ever🤣🤣🤣LOL
🤣😂🤣😂🤣😂🤣😂🤣😂
NO WAY THAT WORKS!!! - you just swich costume to small -> set size to 1/0 % -> swich costume to big AND YOU DO NOT HAVE TO CALCULATE WITH THE TRIANGLE'S PROPORTIES IS A TRIANGLE OUTSIDE THE SCREEN. TY :)
I've already created 3d games, but you're 3d is better than mine. Thank you for this tutorial !
This tutorial was amazing! I wonder how i can add a type of collectable that opens/removes a specific type of block.
When I first ran the game the lines weren't showing up then I realized I had accidentally placed a "-" block where a "+" block was supposed to go.
New Issue: When I swapped "Draw 3D lines" with "Draw Block" nothing appears on screen. I have the "Draw" sprite hidden.
me too once
This is the tutorial we need
YES!!!! I finally finished making the platformer.
I want to make longer and bigger levels, but I can't figure out how to do checkpoints to make it less frustrating. Could you help?
The video is really cool for beginners to learn how to make some 3d games. I can make some 3d games with collision and triangle filler but your really better than me.
I tried this tutorial and it's really cool!
When i saw this I was like no way... was always waiting for this tutorial
Thank you for the tutorial!
how to fill the box sides with a color
At 8:21 my camera rotation is a bit jumpy, when I press to rotate it keeps jumping back to it's original position momentarily, it also moves to the right a bit when I press the left key and it moves to the left a bit when I press the right key, did I mess up the code or is it my computer?
Check the code
we need a creator like you
Hi there, I have question. My block is acting weird, it takes a while to find when you start the project and the lines and block become distorted when you get close. I have looked at all of the scripts many times and they are all fine, any tips on what I should do?
A common mistake is swaping minus and plus signs , check that. Also, check variables so you didn't use a wrong variable somewhere.
Dude I’m a FAN of 3d td! Love your content!
12:30 , if you’re to messy on paper, use excel, you just need to set the grid into a square
Moving blocks, should I use variables for the coordinates?
@ggenije at 9:00 im when i put my update player custom block into my update custom block it just stops the code before the place i put it and i can get it right, ive checked it over three times and even restarted the section, any advice on this?
I thinik the problem is that my check player collision script is continues and stops the update block from continuing in my code, thoughts?
Indon't understand you.
When I try to move the cube, it doesn’t move relative the rotation of the camera. For example, if I click w, it moves me in a seemingly random direction compared to the camera. Did I make a mistake while coding something or is that how the game is like. I’m sorry if I’m not explaining good.
Nvm
i have wanted to make this since i saw ur project :)
yo you should do a part 2 to this tutorial with more shapes and that they are filled in
Im not saying this video isnt good enough (its awesome) just a suggestion
how would you go about adding faces and textures?
and a simpler question: how would you go about having slim platforms that flip when touched? kind of like Super Mario Galaxy 2 Flip-Swap Galaxy style
The problem with full faces is sorting. Usually, 3D games use z buffer, which allows perfect sorting. But in scratch, for some reasons you're forced to use the Zvalue painter's algorithm for sorting. This means for example if center of quad you're standing on is closer than center of your player's quads is closer (for case for long quad), the quad top face will be rendered on top of plater making ugly effect.
Now, as long you design levels in that way, there are no graphical artifacts, and give some Z priority to the player. You would have to use many other optimizations to even make runnable on scratch, like back face culling. Then, you would need to use a triangle fill algorithm (use Azex3d or ChromeCat improved).
Overall, this is very complex to make, and it's very easy to make it look ugly because of sorting.
And for flip swap, isn't it flipping when you jump? Just make player don't collide with either blue or red ones depending on the variable which changes 0 , to 1 depending on jump. Also change the rendering color so player know which one is it.
Your english makes this video so much better
This tutorial looks interesting! Trying it out later :D
I tried it out and there was some mistakes in setting the variables so I fixed it...
THANKS BRO also uhh I Shorta found the save for ur account in crystal seeker and Switched your settings today Account save is "debug"
When I change CameraRotX the cube breaks why does that happen?
how do you make slanted platforms
I have a question, is it possible for player rotation itself(just arround the y axis) to happen with collision or is it too complex?
Collision is not as complex as physics. But one trick is to have a sphere collision player , that way, regardless of what rotation it is , it will stay the same. Aabb vs. aabb is the simplest and the fastest. The next best solution is sphere vs. triangle.
@@ggenije ok thx.
So I have a problem where I just finished the player movement and the problem is with moving backwards and forwards. At certain camera positions, it works normally, but then if you rotate the camera 90 degrees, W and S are reverted in their functionality. If you rotate it at a 45 degree angel, W and S do the same thing as A and D. I've tried troubleshooting by going through all the code that might cause this but I haven't found. What's your advice?
Check plus and minus signs on movement , and check do you use sin and cos st correct places , and that you're using correct rotations there (roty)
@@ggenije I've already done this at least twice although I could've still missed something, would you be willing to look at my project to see what went wrong?
send
@@ggenije alright I did actually find something wrong with the Y movement script but that didn't fix the issue so I guess I'll go to earlier sections, so far I've just been looking through the scripts added after the player was created.
@@ggenije Wait nevermind I found it it was in the update player script, in the second input of player XZ movement I was subtracting them instead of adding
I'm sorry if there are multiple of these because they are nit showing up on this account or others, but what I'm trying to do is make one of the block types no matter what be on the top layer above everything else, I tried to do this by excluding that block type then drawing that block type last, but it changes the color of the closest object to it to the color of the cube. Do you know how to make that block type be the last thing drawn?
When sorting, check type. If the type is that block, add it to a different list for drawing. Then, when drawing, iterates through two different lists, first regular and second this new list.
Btw share only the number of project ID instead of while link.
@@ggenije I added them to a list, made it so what ever is not that block type is put into the new list as a blank so layer ID would have like 12 items then the new list would have 12 blanks then like 2 of the certain block, but they are not being layered correctly and it's based on what order it was put into the block xyz lists
Ur the best this awesome 10/10 tutorial thank u
Thanks this is super helpful :)
WHOA!! I havent even watched the full video and im already baffled! Could you please show a tutorial on how to make a 3D Shooter game in Scratch? Tysm!!
Check 3D tutorial by TheGreenFlash
yo help, after i add the player movement and collision script, my player noclips through the blocks near one edge pls help
NVM i fixed it
Can you do a tutorial on how to fill the blocks in?
wow this is the best scratcher you know so much you can make anything but how
most useful coding video award goes to this video. if you can, can you make a tutorial on how to fill the shapes?
Bro casually taught us how to make a whole ass 3D platformer 3rd person game with a 2D engine in 15 Minutes. While griffpatch makes a first person game with no jumping and you cant move your head up and down while you can just look left and right and move in 30 minutes
Can you teach us how to make the blocks filled?
Hey, could you help me with the problem that some lines keep showing even if they arent part of the cube
Check is z clipping correct
@@ggenije it's not z clipping, it happens when i look too much down/up or too much left/right
How would you make the amount the bounce block bounces proportional to fall height, like the slime block in Minecraft? More specifically I was thinking it would bounce you 8 or 80% of the fall height, whichever is higher.
Have you tried to set velocity to velocity×-0.8?
Uh 😔 you need math. Just try to figure out the mathematical correlation between velocity and max height. It should be velocity squared divided by 2 gravity.
And after 3 hours of trying to make it, you'll make it thumbs 👍. Ask your
Physics teacher lol.
@@ggenije I tried messing around with it for a pretty long time yesterday, and the code makes sense to me on paper but it doesn't actually work. I was wondering if you could look at it to see what's wrong (I think it has something to do with their being a few frames that the player loses momentum before block type collision is detected) and also just advise me on how to declutter it because I added like 4 variables and 2 custom blocks and I think that's a little overboard. But I don't know how to send the project because it seems like everytime I send a comment with a link CZcams deletes it.
send the scratch project id@@CubicMathTime
also you can send the link on my scratch acc@@CubicMathTime
Thank you so much
Can you tell me how to make moving block?
I need some help on the player and camera section, my camera is to zoomed in
I fixed this but my player will not phase thru some objects and will phase thru other objects
hey i have a little issue, i try to remake it (just to understand how 3D works then ill make my own games) but i have a problem with jumping, everytime i try to jump the camera moves up but the player stays at its original position, i cant fix it, i rewatched the video a lot of times but everything is correct, how can i fix this ?
It's hard to tell. You probably used wrong variable somewhere.
@@ggenije idk i used all the correct one, thats why it confuse me
Often mistake is swapping minus and plus.
@@ggenije mh alr i understand, i'll check again when i'm free, thx for the help btw (also i love ur content i'm a girl living in france and you made me start coding 3D in scratch so thank you!)
im kind of confused, are all the custom blocks supposed to run without screen refresh?
yes
pls make a part 2 on filling blocks and other stuff
Suddenly when i set Camera Rotation and position and update my player doesnt show up
This has been a great tutorial so far, but I do believe there's an error. At 6:58 it never shows where to put the custom block "Block order". I figured out that it works fine if you put it right before "Draw all blocks" in the Define Draw block, but that is not shown in the tutorial unless I missed something.
I think I forgot it... but yes, it's super obvious what to do, at least.
i try over and over but it still dosen't work.
How to fill the block?
YO YOU'RE THE ONE THAT MADE Vectoid TD 3D?!
Do you have an article or something to show how to fill in the cubes? I'm using this tutorial to make a fps shooter
scratch.mit.edu/studios/32152322/
@@ggenije oh dang I followed mathmathmath from the 2k hours video, I never realized there was another series out there, thank you.
Why are all my colors messed up and change when I look around
thanks
the only tutorial griff patch refuses to make
his tutorials are good but complex stuff entices me
This is more complex project and it is harder for most beginners which is a large portion of viewers
@@user-ke7ki6mx2z well apart from that
griffpatches old tutorials arent exactly FOR beginers
they are hidden to be biginer level
it teaches biginers to advanced code
but pros are searching for these types of videos
omg, thats so cool bro
why does whne my character jump the blocks starts to deform into weird shapes and when it lands it goes back to normal
🤷♂️
@@ggenije dawg
can you make a video on how to add textures. Like grass on normal block and so on. I'm really wanting to do that.
Check this scratch.mit.edu/studios/32152322/
@@ggenije Thank you!!!
Cant wait to start!!!
At the part with creating sorting algorithm I triple checked my code and it still doesn’t work. Nothing comes up on the screen, NOTHING. Please help me
put the "block order" below the block "draw all blocks" in "draw"
send the link of project
@@gustavotonogamerMadthanks bro!
@@ggenijenow that I have your attention. Pls make a video about vectoid 3d td next!
at the part where you make 60 shapes it only makes 3 for me someone pls help
Check everything, especially plus and minus usages
I'm at the same part with the same issue and I rewatched the video 3 times
@@PIMG_ yeah idk what the problem is
Noice just what I need
Man. For me its more chaotic to make a platformer on scratch than actually coding it
dang, so cool! 😃😃
Is there away to fill in the blocks
Idk just make smaller blocks inside the block you want to fill it
It probably would tank FPS or not I never tried this
ggenjie: why should i use tri fillers if i can just draw lines?
Yes
also @@ggenije : _makes the best 3D game ever, using_ *tri filters*
Phenomenal video
In 4:38 meme:
Someone:you can make 3D game easy🤗
In reality:
video goes 15 min.
people that are making 3d game: it took me 1 month to do...
It took me like 5 days to finish the tutorial
@@user-ke7ki6mx2z i started like 1 month ago, and i'n still not finished...
@@Rosti_GTL1 I’m done the tutorial but I’m not done with even the first update
I uploaded half the update, the other will wait
how would you fill the cubes?
You need triangles and to draw them it’s complicated and you also need to optimize as much as possible
Is it possible to make objects other than blocks?
If it is possible in Minecraft or Lego, the is possible with blocks
I have A question How To do the triangles like in cristal sicker
It's hard.
You have to import troangle filler. And them instead of line draw triangles. But sorting will be weird, so you'll have to be careful how you place triangles, also youll have to implement many more culling methods and many more things.
I enough another problem when the player hits to bottom of a block it teleports to the top of the block. Is this supposed to happen or is it something wrong with the collision script? It seems like it doesn't do that in the full game.
In collision y there are two outcomes branch, for when velocity is larger than zeronor smaller than zero, try to debug to see is one when velocity is larger than zero even called.
@@ggenije wait would this be in collision block or player y movement?
@@CubicMathTime player y
@@ggenije okay I figured out what was wrong by backpacking the code from your version and I had "getY > PlayerY" where it should have been "getY < PlayerY," now everything in the tutorial is working as intended and I can't wait to start customizing it (it's gonna be like a 3D platformer incremental game thing) but I can't imagine how long it must have taken you to figure out bugs without a visual guide.
@@CubicMathTime I'm super skilled at fixing bugs. I've been fixing bugs my whole life.
At 8:15 my Camera isnt pointing to the player what should i do?
Check all scripts, also give extra attention. Does it use plus or minus signs.
@@ggenije Thank you for responding . It still dose not work. Can you say what block is the block that follows the player so i can have extra attention?
@@dragosdimiscayt260 ones with "camera" in name.
@@ggenije Thank you very much the problem was in init trigonometry i have put cameraY instead of cameraRotY!
Couldn't you create a scratch clone using web assembly
Hi, I love your videos and for me you are more creative and better than Griffpath :)
What the cosecant your actually correct
Amazing!
now crystal seeker will be common:D
It doesn't work for me.insted of drawing lines it draws dots.can anybody help me?
Check all scripts, and description
@ggenije. My black screen is not working, it's just turned off, but when i am trying to show it, i see only black screen and nothing else but i already made a box and the block that you stand on...
Check the scrpts. Also, there is more code in the description.czcams.com/video/sCt4vrBuK2E/video.htmlfeature=shared
@@ggenije i checked the script 3 times, everything was correct
@@Rosti_GTL1 all scripts
@@ggenije oh, i'm not done yet
My eyes deceive and I’m enjoying it 😃
i think ill defo improve on this myself
can someone help me? i was doing the tutorial and when i was doing the random blocks, then this happened: the blocks were drawing but when the block was done, the lines dont stop abd it was drawing to the center, can someone help me?
Maybe you forgot the "pen up" block
Just check each single script , and you'll find out.
@@ggenije but when all blocks were infront of the camera: it was normal and yes, tere is an pen up block
*there*
@Petrhry-gs5on send link on my scratch acc, and say it's you. Anyways, everything will work as long you check each script.
i did it properly but it isnt getting sorted
How do you make a block that teleports you?
Just make a new block type, teleport block, which changes player collision on touch.
What scratch addons are you using, name please?
There are like 50 of them
Will you do a tutorial on rendering 3d solid triangles?
It's more advanced level, if you want to modify this project, you need first to find someone's else triangle fill, and then instead of lines se triangles, but there is a lot of work.
This tutorial works fundamentally at the line level, not triangle level, so you'd need to massively change the tutorial project to make it function.
how did you wrote and understand these all algorithems
probably a lot of time and a genius brain and also copying a lot of stuff from other programming languages
Can you please add a tutorial on how to make 3D triangles and fill them up with maximum optimization?
Step 1: type "azex 3d" in scratch search
Step 2: Backpack code
How do you fill the boxes with color
It's hard to make if you don't know how to make everything yourself from this tutorial.