Search:

Type: Posts; User: VirtualAce

Search: Search took 0.11 seconds.

  1. Replies
    20
    Views
    8,652

    Why are you creating classes for each piece? ...

    Why are you creating classes for each piece? Classes should be about behaviors not roles. All Tetris pieces can be represented by one simple class.
  2. Replies
    20
    Views
    8,652

    The problem with the center not being on a block...

    The problem with the center not being on a block is more an issue of using text mode graphics instead of true pixel based graphics. Regardless of what you do in text mode your block can only ever be...
  3. Replies
    20
    Views
    8,652

    Center of rotation can be changed in tetris by...

    Center of rotation can be changed in tetris by storing each block of each piece as on offset from the center of the piece. This is exactly the same as creating a model in local space around 0,0,0. ...
  4. Replies
    20
    Views
    8,652

    Then do not use that formula. I would personally...

    Then do not use that formula. I would personally create a shape rotated 0 degrees and store in an array or image. Simply change the way to iterate the array to draw the image to rotate it or for a...
  5. Replies
    20
    Views
    8,652

    If this is 2D a 2D rotation is essentially a...

    If this is 2D a 2D rotation is essentially a rotation about the Z axis or the axis going into or coming out of the screen.

    pixel.x = origPixel.x * cosf(angle) - origPixel.y * sinf(angle)
    pixel.y...
Results 1 to 5 of 5