How to make 3D!

Making 3D is hard so I decided I would teach you. This isn’t raycasting but it will look 3D.

First make any project, it can be landscape or portrait. Let’s draw the sky and ground.
First you must add a text object, draw the background and draw a trail.
Like this:

set background (__)
set x (0), y (__)  ## __ is the width of the trail divided by 2

draw a trail color(__) width ___{
set x (width, (self) y position)
}

Now add buttons for left,right, up and down


Make a tetris in line like this
( the y position is 12.5 and height is 25 )

Add a sprite (ex: tree,)
Make a custom rule called “SPRITE”

In the custom rule add -

SPRITE (size,x,y) {

set sizeup to 1
when game starts {
set x (x) y (y) ## these are parameters 
set size percent(size) ## this one too
}
when left arrow pressed {
set position x ((self) x position + _) y ((self) y position
}
when right arrow pressed {
set position x ((self) x position - _) y ((self) y position
}
when (0<(self) x position) and (width>(self) x position) {
set invisibility 0 %
}
when touching edge {
set invisibility 100 %
}

when up arrow pressed {
check once if ((self) size as a percent > 920 {

set size percent(920)

else {
check once if (self) origin y position > (tetris line) y position {
grow by percent(5)
}
}
}

when down arrow pressed {

shrink by percent(5)

}
}

Now add this to any object you want to follow this rule and tada! You can tweak it so that it makes clones. Here is an example project

6 Likes

Wow cool tutorial!

5 Likes

Cool tutorial! Thanks for showing off a working 3D method that is easy to understand.

4 Likes

Also the set invisibility to 100 when out of the screen isn’t needed but you can do that

2 Likes

I am also working on another method it’s not finished and really slow so I will show you what it looks like

It’s a drawing of a heart, a circle and a tetris line using some of the code from my other projects

This one is harder because it needs to trace multiple times for 3D, and there needs to be walls. The objects are just like sprites not really walls that can be made into 3D

2 Likes

So far i have made the fastest way i know of without distorting the image and color. Here is a video of it.

It does glitch if you interrupt it in the process (clearing the screen while it is drawing)

1 Like

Here is the code for if you want to explore or do it yourself

1 Like

I tried to add shadows i think i messed up :( I don’t know what to do

1 Like