Most of the code necessary for spectator mode (D2)

Signed-off-by: jinx <jihnsius@gmail.com>