hello all, i was wondering.. when you make games, i heard you had to use bitblt for like a tetris game. how does this work? i dont understand how it knows when all the blocks in a row fit and u get points for that line. thanks for any help on this ;).
Posted on 2001-03-24 12:52:00 by hehe
Hi. Bitblt: bit block transfer. To make games, one strategy is put, for example, the background (a bitmap) in a region of memory (say, buffer1) and the characters in other region of memory (say, buffer2). Think that the buffers are like transparent papers. Then you can 'blit' the characters over the background. For instance in order to use BitBlt you can download my CAD program version -0.0.0.0.0.0.1 :) See: Teste18.zip Good Luck! :)
Posted on 2001-03-24 16:45:00 by wolfao
Tetris games don't have to determine if there is a complete line by what is on the screen, but it could. The internal logic of the game drives what happens externally (ie what appears on the screen, or through the speakers). Therefor, it's usually better to determine the state of the game from internal representations rather than external ones. This mean to create a model of the game that is simple and internally represents the complexity of the external representation. Take a tic-tac-toe game for example: I could represent the board state in 18-bits (9-bits for X, 9-bits for O). -Paint the screen from this data -Get input -Validate the move The program just loops through these routines and never has to read what is on the screen - it's just repainted from the 18-bits of data. Hope that helps, bitRAKE
Posted on 2001-03-24 19:12:00 by bitRAKE