For today’s code, a title screen has been added to our little prototype. You may recognize it:
If you followed my Devember progress from last year, you’ll no doubt notice that this is remarkably similar to the one I created last year. That’s more or less because I 100% pulled in the code from that project and then modified it as needed. This set of changes also adds in some new game states that track the beginning and end of the round, as well as tracking in the game state for what the current and maximum rounds are.
The game starts at the beginning of the round (instead of level generation), which will either skip to generation or the end of the game depending on the current round. Similarly, once the final ball is dropped instead of transitioning to the game over state, we go to the end of round state, where we advance the round count and then go to the start of round state again.
Originally Bolo Ball included two game types “normal” and “long”, with the distinction being that a long game is played over three rounds instead of one, and that in the last round some automatic arrows are added to the mix. I’ve implemented that here, along with the notion of a “short” game, which is a single round game played with half as many balls to start with.
I ran out of time for including the game over scene, but it will be similar to this one in that it will be borrowed from previously written code and basically allow for jumping back to the title screen to go again. I also want to include the notion of a randomly selected first player at the beginning of every round, since it’s currently always the human player.
I also noticed that the AI is still selecting moves based on the idea that all balls will get one more drop and not just unblocked ones. This means that it doesn’t properly detect the situation where it hits an arrow that tries to push it into a gray brick. It will choose such a move thinking that the ball will continue, but it won’t.
I’m not sure if I’ll have time to get to that (and some other AI tweaks) before Devember ends, so we’ll see what happens.