Tetris is cool and I started to make it but I can’t come up with a good way to rotate the objects (besides hard coding it for each piece)
Here is the link: Flowlab Game Creator - Tetris
Tetris is cool and I started to make it but I can’t come up with a good way to rotate the objects (besides hard coding it for each piece)
Here is the link: Flowlab Game Creator - Tetris
add a rotation of 90 degrees
… play the game first (each cube is separate not combined)
it’s basically impossible to do without stupid sine and cosine calculations unless you combine them
well ima try and hard code it
trust me if you just make it all one shape not only will it be 100 times easier to code, it will also function much more optimized.
ye but i can’t because of line clearing (and when rotate i have to figure out where to spawn the blocks)
You can do that with a raycast among other calculations.
raycasts can only be sent from the center of an object + I might have come up w/ a solution
basically assing a 1-16 number then change its location when rotated (something like this image)
Trust me just use combined blocks, you wouldn’t raycast from the blocks
im already half way : /
ok fine my plan was working but I accidentally made an infinite loop and I didn’t save so it all was deleted
(so ill do what u said)
I suggest have it a single solid object, then break it apart after it lands (deleting the solid piece).
You could research the real tetris behaviors. There must be a video explaining some of the code for the old games
Old stuff was mostly made with math and number lists.
Are those possible in Flowlab?
For sure, though its more complicated than using the physics.