Main server class code. This class should not be modified. Controllers should just instanciate the serverclass passing a controller and call run.
Demo file that creates a dummy controller and instanciates a server. The controller just keeps printing the received values and sends a sinusoidal control signal.
Demo file that connects to an Arduino via serial and gets control signals from it. Normally the Arduino code should generate a control signal (for instance from a potentiometer) and send via serial as text. The controller then sends this value to the game as input.
simple Arduino code for sending AD values to serial
Controller must send a value in text format between -1 and 1
The controller receives (from the server) a list of ascii values with the following format:
[game, land, level, character_x, character_y, target_x, target_y, bonus_1_x, bonus_1_y, bonus_2_x, bonus_2_y, bonus_3_x, bonus_3_y ] + [skull_1_x, skull_1_y, ... ]
Obs: The second list might contain only an empty string if there are no skulls in the level. Otherwise it will contain the x,y values for each skull
Index of how many times the player won the game. Starts at 0
Index of the land the player is in
LinearLand = 1
Non-LinearLand = 2
SwitchingLand = 3
QuantizedLand = 4
Index of the system the player is in, on the land. Starts at 1 and ends at 4.
OBS.: The equations for each level are:
LinearLand:
non-LinearLand:
SwitchingLand:
QuantizedLand:



