282 questions
0
votes
1
answer
176
views
How can I create a new random shape for a Tetris-like game?
I want to have new tetris pieces to appear in the game the longer you play and it doesn't work, it makes new shapes but the shapes aren't centered, they aren't continuous (like the shape might look ...
0
votes
1
answer
75
views
CLI game flickering
I am trying to develop a small/lightweight implementation of Tetris running in the CLI, using Python. Currently, I am using a print() for each frame update, just after os.system('cls') to clear the ...
0
votes
0
answers
142
views
In tetris game the row doesn't clear like a tetris game and scoring system is broken
I had created a game where one could play Tetris from the command line using Python and the curses module. Everything was good but I am stuck on a function which is the score_and_clear(board, score) ...
0
votes
0
answers
58
views
Tetris block visually disappears for one frame after locking? [duplicate]
I am trying to make a Tetris clone in Pygame. Whenever my piece locks, I have an annoying black flicker for one frame where neither the piece sprite nor the grid sprite displaying all the pieces draws ...
2
votes
0
answers
98
views
Why are my shapes disappearing when I soft-drop in my Tetris implementation?
I'm working on implementing Tetris in JavaScript. I'm new to JavaScript, so the way I'm coding may not be the most practical or efficient seeing as I'm trying to minimize the amount of help I'm ...
3
votes
2
answers
114
views
How to create a delay between two user interface events updates in JavaFX?
I've been trying to code tetris with JavaFX, and while the logic of the game works, I've been struggling with an issue.
For this project, I'm modeling the blocks with Rectangle shapes; I move these ...
0
votes
1
answer
107
views
Overlapping JLabels in Tetris
So I'm trying to code Tetris in Java and I'm using JLabels for each piece. I'm using a Runnable timer to have the pieces move down, and then I use if statements with an executor to control when the ...
0
votes
2
answers
84
views
Getting Failed to Load resources on Apache webserver requesting files without file extension
I am trying to implement a small tetris base game i found on github into my webserver but the images for the tiles are not loading into the game and in the console it says failed to load resouce 404 ...
1
vote
1
answer
164
views
Pygame Tetris blocks not showing
I am trying to build Tetris in pygame and I am working on just making a shape appear on screen. My idea was to create each block as a sprite to keep track of them so when you create the piece it ...
0
votes
0
answers
127
views
Attempting to make tetris game- Collision code is not working properly
I am working on a Tetris game from scratch. The code for colliding with other objects seems like it would work, but it just isn't. Please note that the collision code is not finished. Not looking for ...
0
votes
1
answer
606
views
How to detect the collision of a tetromino in a tetris game?
I am writing a tetris game with the ncurses library. I am struggling to write the method which detects whether the tetromino can be placed into a new empty space or it is collided with an other ...
-5
votes
1
answer
106
views
How work this javascript arrow function and destructuring assignment code in tetris?
class Piece {
constructor() {
this.x = 0;
this.y = 0;
}
move(p) {
this.x = p.x;
this.y = p.y;
}
}
let piece = new Piece();
const KEY = {
LEFT: '...
0
votes
1
answer
69
views
Java : filling Object Array overflow into other fields
Tetris Game
My code works as it should at the start but after some time playing it breaks. When a falling piece touches the ground and gets put into the gamefield it gets stretched up into other ...
0
votes
1
answer
231
views
Why does my highscore saving output "TypeError: unsupported types for __ge__: 'int', 'list'" in micropython?
Why does my highscore saving output "TypeError: unsupported types for ge: 'int', 'list'" in micropython?
I tried making my Tetris game on my RaspberryPi Pico be able to save highscores, but ...
1
vote
1
answer
100
views
Blocks stuck at top and spawn repeatedly
I have begun creating a Tetris game in Python. My problem is when I try to detect collisions with other blocks, the blocks get stuck at the top and spawn over and over again, like this:
Heres the ...