Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do u make 3d
- Scratch-Of-The-Day
-
Scratcher
1 post
How do u make 3d
I have never figured it out but have made tests (none work)
- frances2005
-
Scratcher
500+ posts
How do u make 3d
I have never figured it out but have made tests (none work)
There is some projects with 3D elements, but if you wanted to make a project like Minecraft, Roblox, etc. it is almost impossible because I do not think Scratch would handle all of that. One game by @Painted-Pupper I believe has 3D elements.
Oh, and I'm sorry, but I do not think this is a glitch, as I find it more of a general question/advanced question.
- Spidertest
-
Scratcher
47 posts
How do u make 3d
You can create a 3d perspective effect using multiple sprites or clones like this: link However, it is not ‘full 3d’ because you cannot rotate in different directions.
To add rotations, you cannot use sprites, instead you need to use the pen blocks. A popular method for 3d on scratch is “raycasting,” which is a technique used in older games to give the illusion of 3d. However, it calculates the graphics on a 2d map, so it is fast enough to run on scratch. Here is a very nice tutorial: link and here is a project that uses ray casting: link However, it has its limitations because it is not actually 3d, so you cannot rotate in all directions, and the walls are always similar in shape and size.
To have ‘full 3d’ you have to store 3d objects as points in a list, and then rotate them using trigonometry, and finally project these points to the screen. Using these points, you can connect them to draw 3d lines, or fill them to draw 3d triangles. This user has many helpful tutorials on this type of 3d: link In this type of 3d you can move and rotate in all directions. However, this method can cause a lot of lag on scratch, and it is very hard to determine which surfaces are visible.
Keep in mind that scratch is relatively slow compared to other programming languages and game engines, so 3d programs are very limited, but I hoped this helped
To add rotations, you cannot use sprites, instead you need to use the pen blocks. A popular method for 3d on scratch is “raycasting,” which is a technique used in older games to give the illusion of 3d. However, it calculates the graphics on a 2d map, so it is fast enough to run on scratch. Here is a very nice tutorial: link and here is a project that uses ray casting: link However, it has its limitations because it is not actually 3d, so you cannot rotate in all directions, and the walls are always similar in shape and size.
To have ‘full 3d’ you have to store 3d objects as points in a list, and then rotate them using trigonometry, and finally project these points to the screen. Using these points, you can connect them to draw 3d lines, or fill them to draw 3d triangles. This user has many helpful tutorials on this type of 3d: link In this type of 3d you can move and rotate in all directions. However, this method can cause a lot of lag on scratch, and it is very hard to determine which surfaces are visible.
Keep in mind that scratch is relatively slow compared to other programming languages and game engines, so 3d programs are very limited, but I hoped this helped

- Discussion Forums
- » Help with Scripts
-
» How do u make 3d