So, how's the Tetris going. So far I've spent about four hours on the project and I have window creation, simple GDI drawing, handling of input and timing. I'm quite positively surprised how easy it was so far. For my first Win32 GUI project, it's coming along quite nicely. I basically have all the building blocks in place, I just need to implement the Tetris logic.
Currently I'm at 11776 bytes (stripped executable), which leaves me confident, that I will be able to squeeze in the 17kB I set for a goal :). I've found out, that I can't use any standard libraries, because they introduce too much overhead. I was thinking about using std::vector for some stuff, but I will have to go with simple arrays.
What I'm currently thinking the most about is the data structure I will be using for the Tetris pieces. The obvious 4x4 array is not really suitable for rotations of all pieces, unless I define the centre of gravity for each piece separately. It's a possible solution, but really elegant.

To download this really preliminary version, click here here (10 kB). It's basically just a block falling down, which you can move left and right.
0 comments:
Post a Comment