generic tetromino game

Config format

It's best to edit the config file from the options screen, instead of editing it manually. The options screen shows all the possible values for each of the options, and the input screen lets you map inputs interactively. Nonetheless, the configuration format is a very simple plain text format, with one option per line. Here's a sample configuration:

colors classic
garbage_piling on
hard_drop off
input_delay off
input_handler vanilla
lines_per_level vanilla
music random
pause show board
rng classic
save_highscores off
sfx ntsc
speed 1/1
input 1 left joystick0 off
input 1 right joystick0 on
input 1 down joystick1 on
input 1 up joystick1 off
input 1 flip_ccw joypad 1
input 1 flip_cw joypad 0
input 1 start joypad 3

The non-input lines consist of an option name, one space, and the option value, which may contain spaces. Any option that isn't included in the configuration file assumes its default value, and any option in the configuration file that isn't recognized is ignored, and a warning is printed to stderr. Also note that everytime you exit the options screen or the input screen, even if you don't change anything, the config file is written, so if any options in your config file are missing beforehand, they will be automatically added. This also removes unrecognized options.

The input lines consist of the word "input", the player the input is for (1 or 2), the virtual input to map, and zero to three pairs of device (button, joypad, joystick0, joystick1, key) and physical button. The physical button is an integer in all cases, except for joystick, where it is a boolean ("on" or "off"), which is on if the axis should be at its maximum value, or off if it should be at its minimum value.