You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
Alexandru Dan edited this page Sep 3, 2017
·
12 revisions
The game worker is subordinated to the game. The worker has two components: initialization and the service.
The initialization
The service
After the avatar code has been imported from the database, via the game API during initialization.
Each worker listens to POST requests for processing a turn. The data that the worker receives has the form of a world map and an avatar state. The simulation is different for the worker from the simulation of the game.
For example, the world map object has a much smaller responsibility then game's version. The idea behind this is that the worker has to handle only a state of the world at a time and decide an action for its avatar.