Skip to main content

Game Engine Protocol

Each tick consists of 4 steps:

  1. request_commands()
# pseudocode for request_commands()
for t in tanks:
if t.commands.is_empty():
t.commands = t.request_commands()
  1. apply_commands()
# pseudocode for apply_commands()
for t in tanks:
system.apply_command(t.commands.pop())
  1. apply_physics()
# pseudocode for apply_physics()
for t in tanks:
t.events = system.check_collisions(t)
  1. publish_events()
# pseudocode for publish_events()
for t in tanks:
for e in t.events:
t.commands.extend_front(t.request_commands_by_event(e))