Freitag, 21. Oktober 2011

Development Diary #4

Topics:
  • the continuing development of FastBlocks
Yeeeaaah, my first project makes good progress!!
The most important basics of the Tetris-Gameplay are set and just a few points lack to write of a complete thing:
  • one round should have a stop criterion
  • then a new round should be started
  • a GUI, at least at the start
  • Sound ?
  • an animation, when a complete line gets deleted
here's a screenshot of the actual visual state:
The background-images are quite dark and were created with photoshops' basic functions, but I think the style goes into the right direction! :)











So, now we will come to what really matters, namely the small challenges, which I experienced during the last days of programming. I think one tends to underestimate the quantity of special requirements of the classic game Tetris!
  • for example, my first try to implement a way to delete complete lines was the idea to move the lines, which sit above these complete lines, down to the first incomplete line below. Nice try, but when one thinks of the line-configuration "complete (c) - incomplete (i) - i - c" from up to down and lets his 4-elements-in-a-row-block slide into the prepared slot. Houston, we have a problem!! The nearest solution was to move the incomplete lines downwards for one unit. But we guess, that this does not work for a configuration like "c - i - c - c" and some innocent blocks would be floating in the simulated air. In addition, the game should work with blocks, which are longer than 4 units. Well, because of these issues, the deletion and moving of the lines should be more dynamic. I think the observing reader can solve this problem due to some thinking or reviewing my code! :)
  • a smaller problem was the effect, that the rotation of a block was oriented to the upper left corner. So the rotation of the 4-unit-line-block was more a "turn down" than a "rotation around the centerpoint" as one knows it from Tetris! :)
Recommended articles: