It’s a little funny that we’ve come so far into a series on making a board game and still haven’t even looked at the game board. In this lesson we will fix that. In addition, we’ll make some pawns, and actually implement the ability to “roll” and move your pawn around the board on your turn.
The screens we have implemented so far appear and disappear immediately. That looks fine for some screens, but chances are good you will eventually want to add a bit more polish. In this lesson we will implement a couple more screens that animate onto and off of the screen. We will use a couple of different animations, and see how to continue in our flow after the animations complete.
I have recently been tasked with the implementation of accessibility related to blindness on a few different iOS projects. There is a lot of documentation on this already, but finding it all in one place and getting a “quick” overview of the basic idea were a bit harder to find. Following are the notes I made for myself as well as some tips and gotchas that others might benefit from.
Thanks to all the work we did creating our data models in the last lesson, we now have enough that we can continue on with the game flow into the setup screens. In this lesson we will implement two new screens. The first screen will determine the number of players, and the next screen is for configuring each player with a name and starter Pokemon.
There are several more models we will need to create before we can start even a basic game. Pokemon, Players, and the Game model itself are all a required part of the setup flow. Technically other data models will need to be created during setup as well, but at a minimum to get the game up and running we will need these three. In addition, each of these models will be provided with a factory class to help create and configure them.
I’d like to continue moving straight through the flow to the setup screen, but there are several pre-requisites we will need to address first. Among them is the creation of a database connection that can be easily consumed by all of our systems. After connecting to the database, there are a few things we can do to make fetching and working with its data a little easier. These will be implemented as extension methods.
Now it’s time to provide a concrete example of our flow in motion. We will handle the first couple of states, the “Intro” and “Setup – Menu” state. We will show how to display one screen after another, both based on an app event (launch) and based on user input. The Flow Controller handles both cases like a champ.