Continuing from my progress last night, I worked today to integrate the moving text (TemporaryText) component into the game. Though, I had a thought last night before bed. I was thinking that my little brother isn't a particular fan of the TextField object and that I should generalize this component to animate other things. As I thought about it, I realized that the thing being animated was really of no concern to the TemporaryText class. So, I made a few modifications and renamed it to TemporaryObject (which may be a bit vague, but I'll rename it later if I need to).
Armed with this incredibly flexible component, I integrated it into the game. I had to modify the model to return, not only the current score, but the number of points the last action earned and the position at which the last fired block landed. I used that position to specify where the point text should start. I had to mess around a bit with font sizes and text color (all which will likely change when my brother's more artistic eye has anything to do with it).
All in all, the addition was easier than I expected. Here are some screen shots to get an idea of how this works. The points fade in at the last fired position and then move to the score position in the top left and fade out. The picture below are before, during, and after the points are generated (an animated gif would have done better, but I'm not particularly interested in figuring out how to make one of those at 1am).
Anyway, with this new feature, players will know how much that combo was actually worth. :-)

No comments:
Post a Comment