Distance between tetris shape-cubes varies...

I am trying to get myself acquainted with opengl
and I decided to start with a tetris game, just to make something interesting…
What I stumbled over recently is…
when a shape falls down - the distance between cubes that it is composed of - varies… so sometimes adjacent cubes look like their is no spacing between them… and quite the reverse - the spacing is a bit larger

same effect is when I resize the window

I thought it could be related to antialiasing
but Im not sure and it seems to me its not that…

I experience same problems in both perspective and ortho view
So it’s basically ortho view and camera is in the default position

points that I draw along the coordinate system axes
have same problems also

thanks for help in advance

I don’t quite understand your question as posed. A screen grab of the problem would be helpful.

As I recall in Tetris you have to arrange falling blocks so that they fit neatly together in a brick wall of sorts. I’m guessing that the wall isn’t neat enough or you are having difficulty with the gaps… ?

ok, sorry, i’ll try again
and here’s a screenshot

and a video grab, so that you can see ALL !!! :slight_smile:

the shapes are not whole, they are composed of 3d cubes
and there is a fixed gap between them (defined in code)
a cube’s side is 1.0f and gap is 0.05f;

but as I move a falling shape around, left\right, I can see that the gap is not the same all across the cup…

and when I resize my window, I can see that the cubes are kinda making tiny rushes back and forth, as if they cant decide the exact coordinate…

I dont’ know how to explain it in more detail, the screen shots shows what is wrong

Right on, I get it now :wink:

I’d be tempted to go to an all integer 2D/3D grid/lattice for this.

As you say it’s going to be quite a pickle maintaining exact (pixel) distances with an arbitrary view in 3D. Anti-aliasing with a wider gap could help soften things up a bit.

simple things i’m trying to do
and the problems are already here :slight_smile: rrrrrr

I hope antialiasing is going to fix it
thanks for your support