Results 1 to 5 of 5

Thread: Distance between tetris shape-cubes varies...

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2009
    Location
    Russia, Spb
    Posts
    3

    Distance between tetris shape-cubes varies...

    Hi
    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

  2. #2
    Senior Member Regular Contributor
    Join Date
    Aug 2005
    Posts
    145

    Re: Distance between tetris shape-cubes varies...

    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... ?




  3. #3
    Junior Member Newbie
    Join Date
    Jul 2009
    Location
    Russia, Spb
    Posts
    3

    Re: Distance between tetris shape-cubes varies...

    ok, sorry, i'll try again
    and here's a screenshot
    http://sites.google.com/site/vooimag...attredirects=0

    and a video grab, so that you can see ALL !!!!
    http://www.youtube.com/watch?v=J4jOb8pqy68

    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

  4. #4
    Senior Member Regular Contributor
    Join Date
    Aug 2005
    Posts
    145

    Re: Distance between tetris shape-cubes varies...

    Right on, I get it now

    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.

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2009
    Location
    Russia, Spb
    Posts
    3

    Re: Distance between tetris shape-cubes varies...

    simple things i'm trying to do
    and the problems are already here rrrrrr

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

Similar Threads

  1. Replies: 1
    Last Post: 02-02-2017, 03:29 PM
  2. Replies: 1
    Last Post: 06-19-2015, 06:41 PM
  3. Replies: 1
    Last Post: 07-24-2014, 04:59 PM
  4. I need help drawing some cubes
    By Areinn in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 08-08-2013, 08:50 PM
  5. tetris tutorial - how to write a small game
    By cosmicGirl in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-04-2003, 04:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean