Questions tagged [tetris]

Block matching game created by Alexey Pajitnov . Elements are 4-segmented pieces where the name of the game comes (tetra is numerical prefix in Greek used for 4).

Tiles are 4-segmented pieces which also provided the name of the game (tetra the Greek numerical prefix for the number 4). More on Wikipedia

285 questions
0
votes
1 answer

Opengl: How do time based tetris game?

I am working on a basic tetris game for school. I am not sure how can i develop a game loop since this is my first time making a game. I am using opengl to do the drawing. Do I make a main loop that will wait certain amount of time before it…
LittleFunny
  • 8,155
  • 15
  • 87
  • 198
0
votes
2 answers

How can I move a section of my screen down by x pixels?

I am making a tetris remake in Pygame and need to move all of the blocks down by 31 pixels whenever a line is cleared. How can I take a capture of the screen above the line and move it down by 31 pixels? I have managed to make a rect around the…
0
votes
1 answer

Allegro 4 not detecting keypresses in Tetris implementation

I'm making a simple version of Tetris using Allegro 4 and C++. I've got most of the code in place and everything is working except user input. The keypresses are only being detected by the game on a few, random occasions. I fear it's a timing…
0
votes
0 answers

I keep getting a NullPointerException in GridWorld when nothing is null

I'm designing a Tetris game in Gridworld. Below is the method that produces the error. It is a method of the Block class, which is a collection of Actors on which move and rotate methods can be called. myBlocks is an ArrayList of…
0
votes
4 answers

Stuck while making tetris

I am trying to make my own version of the Tetris game. So far, I am able to show pieces, rotate them. But I am stuck at a point and not sure how to proceed. I have a BoardClass with static integer array board for the grid. With different integer…
Tanuj Wadhwa
  • 2,025
  • 9
  • 35
  • 57
0
votes
1 answer

Tetris-style collision detection in Actionscript 3 using Flashpunk

I am creating a tetris-style game in Actionscript 3 while using the flashpunk library. I have everything working except for some of the collision detection that I'm having trouble figuring out. When the blocks fall they don't stack on top of each…
hRdCoder
  • 579
  • 7
  • 30
0
votes
1 answer

How to settle an an image in Applet for tetris game

I developing tetris game using applets. I have generated random shapes and making it move. But i don't know how to make it settle at the bottom. My shapes are vanishing once it reaches the end of the screen. Please help me on this regard. Here goes…
0
votes
0 answers

iter all possible tetris block forms

Possible Duplicate: Programming Contest Question: Counting Polyominos There are different types of Tetris shapes. For example in shape like letters T L I Z J O S. I'm trying to get an algorithm that can create these blocks. I'm using C++, but…
Joshua Behrens
  • 818
  • 13
  • 23
0
votes
2 answers

Tetris-like Applet using Stacks -- Popping off tops

So in my class we are working a simple Tetris like applet in Java. Blocks fall from the top of the screen into 6 different columns and each different column is a stack. In order to score points you must match 3 or more blocks of the same color…
Mike
  • 1,307
  • 3
  • 17
  • 29
0
votes
2 answers

Confused with a piece of code form a tetris game controling the speed of the block

if(loopCount % (20 - loopCount / 100) == 0) { if(dropBlock() == false) { mode = -1; loopCount = 1; } if(loopCount == 1900) loopCount--; } …
bunnyshell
  • 253
  • 4
  • 12
0
votes
1 answer

Arrow Keys on calling object method in Tetris game C++ Visual 2008

Im trying to use arrow keys to move tetris block left & right and rotate, but its not working while the block falls down the gameGrid. Here is my code. //Here is my Game cycle in the timer handler private: System::Void timer1_Tick(System::Object^ …
Nolan Ratu
  • 31
  • 3
-1
votes
1 answer

Tetris midlet attributes

public static final int SQUARE = 0, LINE = 1, S_FIGURE = 2, Z_FIGURE = 3, RIGHT_ANGLE_FIGURE = 4, LEFT_ANGLE_FIGURE = 5, …
jan
  • 67
  • 1
  • 4
  • 7
-1
votes
3 answers

Random Tetris Shape

I am trying to write a python program that will draw a random Tetris shape onto a board. Here's my code: def __init__(self, win): self.board = Board(win, self.BOARD_WIDTH, self.BOARD_HEIGHT) self.win = win self.delay = 1000 …
user1162643
  • 33
  • 1
  • 1
  • 5
-1
votes
1 answer

Error appearing but all code same as instructors "Uncaught SyntaxError: Unexpected identifier 'current'"

I am following along a JS course in which a basic game of tetris is made. The grid has been saved and all tetrominos have been saved. But when I try to get the first Tetromino to appear I get the error, Uncaught SyntaxError: Unexpected identifier…
Stan U.
  • 1
  • 7
-1
votes
1 answer

Unity - truncate all decimals from a float (not by rounding)

I have a C# script in which I want to take a float value, remove everything after the decimal point and have an int of the remaining figure. e.g. 2.5469 would ultimately be [int]2. e.g. 546.5934 should be [int]546. I am using the int for another…
Mallamalla
  • 3
  • 1
  • 3