I would like to develop a variant of the classic 2D Tetris. For inspiration I looked at several existing Tetris clones in Godot and made an interesting discovery. Most of them implemented a grid system, collision detection, rotation of the tetrominos themselves and did not use any functions of Godot for this and also no CollisionShape2D for the tetrominos.

A Tetris clone I found uses CollisionShape2D for the tetrominos, but this clone still contains some bugs.

Is using Godot's built-in collision detection for grid-based games like Tetris a bad idea?

Welcome to the forums @Uncool_McUncool!

I think one reason most projects do not rely on Godot's built-in physics is because for something relatively simple like Tetris, it is often easier to quickly roll your own implementation instead. It also gives a bit more control over alignment and precision. Finally, and likely the most likely reason, is because of the need to know whether a row is filled or not requires a grid, it isn't too much extra work to quickly write a simple collision check using the same grid. Since all of the data needed for collision already there in the grid, it might just be a little easier to quickly bash out a collision system through code than to work with Godot's physics system.

That said, I mostly do 3D work with Godot, so I'm just making educated guesses. I've never tried to make my own Tetris like game. It is quite possible there are other reasons they use their own collision code.

Tetris has its own logic, drop speed, instant spin, no rebound, If you use physics, you have to consider many factors, such as how to solve the bounce, how to solve the jitter, how to solve the collision between the two squares, how to solve the collision when the rotation occurs It feels like the physics engine is used in games where you cannot predict what will happen

3 years later