Tetris V4

cadenjb's picture
Build image: 
In-game name (NO VISITORS! Must be LEARNER rank or higher!): 
cadenjb
Builder name(s) and current ranks: 
cadenjb [Builder]
Creation location: 
288 86 2602
Machine Features: 

Public formatted text by caden: https://pastebin.com/BKSfDUZu
Original text (staff can see this formatted properly *nice website!) [Ecconia]:
Overview: My Tetris is capable of spawning a new piece automatically which should be the piece it has displayed on the bottom left corner (up one box). Then it will fall; you will be able to rotate it clockwise and counter clockwise as well as shift it left and right. Doing player moves will not slow down the falling at all. However if you press the button with the down arrows on it, then the piece will fall three times as fast not allowing you to input player movements. If you try to rotate or shift into something the collision detection will stop it. Once you finally get a piece to the bottom of the board or on top of another piece it will save and spawn a new piece. If you have your stack of pieces reach the top you will lose. If you manage to get an entire line filled then you will get a line clear. you can clear up to 4 lines in one clear. One line clear is 2 points. Two line clears is 5 points. Three line clears is 15 points. And four line clears (or a 'Tetris') is 60 points. If you gain score before you lose it will save as a high score if it was greater than the current score.

Scheduling system: The components to make this all work are quite simple. However how I make them work together is quite complicated. It all starts when the player enters their input that gets sent to the scheduling system which will save your input and execute it when it needs to. The clock is connected to that and will go on schedule in order of the following: shift, fall, rotate. Unless you tell it to do down fast then it will do: fall, fall, fall. How the moves work is the system is hard coded to make the piece rotate and any other move has to force it to not rotate, and shift instead. Lets start with how rotation works.

Rotation: When a piece is told to rotate it will add a number relative to if it's rotating clockwise or counter-clockwise and if it's switching directions to the rotation incrementor. Let me simplify that. if it's rotating clockwise then it will add one. If it's rotating counter clockwise it will subtract one. But if it's switching directions to what it previously did then it will add 2 instead. The rotation incrementor is necessary for knowing what rotation the piece is currently in. And what rotation it should commit. That is connected to the positive/negative. Each piece is made up of 4 pixels. I am capable of relatively moving each pixel in any direction I want and how much. The rotation incrementor controls a ROM which controls if the pixels should move in a positive or negative direction. What piece it is will dictate how much it will move and if it will be horizontal or vertical.

General movement: However if I want to do a simple move all I have to do is force all of the positive/negative to be one thing. For example if I want to move the piece down I want to force all of them to be negative and also force all of the horizontal/vertical to vertical.

Setting a new piece: In order to set a new piece all I have to do is force positive, and I am also capable of just clearing the looping adders ready for me to add the piece into the coordinates.

Rendering a piece: by using decoders and coordinate grids I can turn the list of binary coordinates into a point on a screen. I bus all four pixels together and have them pass through a couple of things before they get to the scree.

Line clearing: The first thing they pass through is the line clearing system. Which is capable of saving the entity data onto the shift registers. When an entire line has saved data onto it it will automatically send pulses to shift all the data above it down and therefore clearing a line. It will do this for as many lines that need to be cleared. Points: These line clear pulses will be sent to the point system which is capable of counting how many pulses go through and give you as many points as necessary. It will know if your points are greater than the highscore because a subtractor will subtract the current score from the highscore. If the answer is negative then it will save your current score to the highscore and update the other place where the highscore is saved in BCD for the display. I also have my combinational double dabble on top which connects to a BCD to SS which connects to an SS to 6 segment display.

Collision detection: When saved data and entity data are in the same place or when entity data's X value is 0 or 11 or when entity data's Y value is 0 then collision detection will get triggered. Sending a pulse back to the scheduling system to undo the move. Because the scheduling system will save what move it did until it does another move it will know what move to undo. You don't see a piece intersecting and then moving back because the screen only updates after it moves back.

Display: It's pretty simple and very important. It's also the part that updates the screen after pieces get put back where they're suppose to be.

How To Use: 

Turn on the clock by pressing the pause/play button. If you want to commit a move all you have to do is simply tap one of the buttons. You can hold it down and eventually it will do multiple. If you feel like the piece is where you want it to be you can hold down the fall fast button and it will fall 3x as fast. Note you can't do anything else while it does that and it will only do that as long as you're pressing it. If you don't want to play anymore you can pause the game.

Request status: 
Not approved

Comments

Impressive work, but I tried to play it.

I do not drink coffee, but if I would say: You start the game, make some cups and then move the first piece to the right position.

I decided to deny this application, only for interface reasons.
- Reset button is not existent or well hidden.
- The whole gameplay does not only feel slow, it probably is too. (Hard judgement, but be honest, this is slow).
- Rotation is super weird, as in, if you want to rotate once it works fine. If you want to undo your choice you cannot. As in CC -> CW goes CC. Also only one rotation per turn. Sometimes it adds up sometimes it doesn't - weird.
- Going left and right works in unexpected situations. As in it feels as in you can move the pieces 2/3 falls/cycles later.
Due to the reaction speed of the whole thing, maybe buttons would be the better choice (less confusing - more user feedback).

There had been no directly visible bugs with the controls. But a lot of frustration trying to control it.

Thus my current judgement is "denied".

By Ecconia