This task is reasonably simple: building a basic navigable grid that can hold text. However, there are some important factors, so please read through the below notes.
We need a screen that appears over the gameplay map, much like the menu does, but which will show the math problem to be solved. In game, it will be automatically triggered when a math problem must be solved. For debug purposes, you can set it to toggle with the =
key.
This screen must be set up in a sort of grid configuration:
- Each cell in the grid must be able to contain either a character โ usually a digit or an operator โ or a blank.
- Some cells must accept input from the user: these should be marked out in a different color.
- Display text as large as is possible! We want this to be playable (in full screen) by players who may have low vision.
- Arrow keys must be able to navigate through the cells, highlighting each. Skip moving into blank, non-input cells. Highlight the cell currently visible in a different color; use a different color still for selected input.
We'll handle automatic carry-over in a separate task.
On the note of colors, I propose a yellow background for highlight, cyan for input, and green for highlighted input. Be mindful of good contrast, but avoid white-on-black or black-on-white. (Make sure the color choices are RGB constants, so we can change them later if needed.)
Here's a good example math problem (particularly hard, yes) that you need to be able to display. ?
represents input field. and #
represents a place where you might have a carryover.
123+45.6-788+900-876+53.4+210=????
#####
123.0
+ 45.6
_____
????
P.S. The answer is -332
In this example, the user would be walked through the PEMDAS by the game.
The exact nature of the math content and problem generation might change later, but the above at least shows how much room we'd need. If we can accommodate the above or more, then the rest will be easy.
IMPORTANT: Make sure you define the number of cells that you're fitting on the screen horizontally and vertically with constants, and determine the width and height of each cell from those constants and the screen resolution. We may need to change the values later.