Skip to content
Snippets Groups Projects
Commit aa0744c5 authored by ja3-saxby's avatar ja3-saxby
Browse files

Got a crude demo of falling blocks stacking working

It sometimes takes a long time to detect game over, once I noticed it reported game over before it appeared to be the case...
Other than that, the collision-detection so far appears to be working brilliantly
parent b1d985a5
No related branches found
No related tags found
No related merge requests found
......@@ -317,6 +317,8 @@ bool game_over;
void start_new_game() {
game_over = false; // we're starting a new game
// clear the stacked shapes image
stacked_shapes.clear();
// TODO: add event-handlers for button-presses
unsigned long stopwatch = UBIT.systemTime();
unsigned long move_speed = 350; // move down one block every 350ms
......@@ -354,10 +356,10 @@ void start_new_game() {
stacked_shapes.paste(block.image(), origin.x, origin.y, 1);
}
} while (not game_over);
// TODO: clean up game state
// TODO: remove event-handlers
// TODO: add GAME OVER message
UBIT.display.scroll("GAME OVER!");
// TODO: add display of score
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment