Client Architecture

In general the client is relatively thin - it has an UI layer, proxies for controlled actors from the server side (possibly with custom scripts to handle client side prediction), and some own actors for accessing client side functionality. The UI is highly editable, and only interacts with Actors, Actions, and Sensors.

Proxies for controlled Actors
For the Actors that the player can control, the client can create proxies, when they are accessed / requested.

A ProxyActor will hold a local representation of an Actor on the server side, and will update its contained Sensors, Actions, and controlled Actors based on a sensory feed from the server. The client side objects are proxies however: ProxySensors, ProxyActions, and ProxyActors, and will not contain the actual implementation logic, just the id of the object on the server, as well as things like user-readable names and descriptions.

Various sensory streams contribute the rest of the perceived world to the client, and models based on the sensory streams are built up in the various UI components that need to handle them (e.g. a 3D View will keep track of visible objects, and a character info panel of the character attributes).

Client Side Prediction
Especially motion needs to be predicted on the client side. This should probably be done inside the client side proxy of the CharatcerActor. Possibly the actors could provide some scripts that can be run on the client side, to listen to actions and immediately provide some sensations from the sensors. This could be used for general client side scripting also. For security reasons, a script in an actor should only be able to listen to actions and affect sensors of that actor.

UI
The client UI consists of a number of UI components that can be connected to listen to Sensors and invoke Actions.

The UI components are laid out and connected according to a UiLayout. The UiLayout can be specified in part by the server, allowing game designers to design an UiLayout that works with their game.

UiLayouts should be possible to combine however, so that various controllable objects in the game could provide their own small UI:s - e.g. someone might create a car or vending machine or coin laundromat, and design an UiLayout that allows it to be used by other players.

Expert players could also create custom UiLayouts for specialized tasks (e.g. to make trading easier, or exploring, or combat). These custom UiLayouts could be shared by them (maybe in-game?), and used (and ranked / reviewed) by other players.

Care should be taken when designing the UiLayout system so that malicious UiLayouts can not impersonate other UiLayouts, or compromise the security of the client, interfere with other UiLayouts, or mess up the client in some other way.

Client Actor
The client also provides some sensors and actions through a ClientActor that the player will automatically gain control over. It could provide actions such as connectToServer, setPreference, quit, etc, and sensors such as availableServers, currentPreferences, etc.