Writing a Tetris clone -- revisited with C++11
Uploader Comments (Bisqwit)
Video Responses
All Comments (22)
-
The "cycles commands" speed up the avi file , i was trying to see how DOSBOX capture with it , and then i got a too fast video , :P , can't fix this , "UNFIXABLE"
-
@Bisqwit thank you for your effort , i start to study the codes , complie it sucessus under xp but the full version crash in my dosbox(under win7) , show case work fine there (just a few offset problem tetre Area is on the Left ).
after playing i find it's evil that the game pick difficult piece for me ..XD
-
@labobo It is a programming paradigm in which two or more parts of a program can intercommunicate, or be interleaved while being written in a manner that normally is used for non-interleaved code.
-
@Bisqwit Ok, I'll read Tatham's coroutine page after this comment. So co-routine macros are multi-threading for dos ?
I imagine using normal threads are better than co-routines.
-
@labobo I used Pierre Dellacherie's algorithm because it was the best Tetris AI that I could find example source code for. The co-routine macros are used to implement co-routines. With co-routines, it is possible for a timesharing algorithm to be written in a non-timesharing style (infinite loops etc.); a return can be issued from the middle of a function (in order to timeshare with other functions) without having to take care how to resume the same spot. See Tatham's coroutine page for details.
-
@alexliang0627 Link to source code added in the video description.
Hey , Friend , Can you tell me what is named the program you use to make these videos?
Like , what is the re-recording program?... Thx , waiting for a reply
ahron123456 1 week ago in playlist Recommended picks
@ahron123456 There is no re-recording program, nor savestates involved. I use DOSBox for making these videos. When you increase the cycle count in DOSBox, DOSBox appears to be running slower, but in fact only the emulation becomes slower. Video captures still run at normal speed. This allows the user to appear to do stuff quickly. I utilized that feature extensively in my first videos. Nowadays I use scripted input, with exact means varying from video to video.
Bisqwit 1 week ago
I was wondering why Pierre Dellacherie ai algorithm ?
What are those co-routine macros for ?
Now that i think about it, videos about ai programming would be nice.
Long time since i poked that area..
labobo 1 month ago
@labobo Oh, and the general principle of the Tetris AI is this: The robot must decide where to put the piece. So it evaluates all rotations and all placements for the piece, choosing the one that looks "best", and maneuvers the piece there. The choice is made by scoring each location. The score is calculated by a formula which considers things such the number of transitions from block to hole and back, both vertically and horizontally, number of pieces eroded if block is placed there, and so on.
Bisqwit 1 month ago