Meerkat

From EQUIS Lab Wiki

Jump to: navigation, search


Contents

WORK IN PROGRESS

The Meerkat engine is work-in-progress. As such, the contents of this page are subject to change at any time.

Architecture

Overview

A multiplayer session consists of a group of connected clients. One of these clients acts as the host. Each game screen can link to a location, specified as a string name. When clients in a network are linked to the same location, their entities will be shared, depending on each entity's consistency type (more on this later). The basic idea is this: The player clients, the game server, and the editor are all clients. They differ in the way they create, update, and destroy entities.

Consistency

Each entity has a consistency type, which determines the way it is created, updated, and destroyed on different clients. There are 4 possible consistency types:

  • Player: Created and destroeyd on all clients. State updates are performed by the client that first created the entity (the player's client). Other clients reflect these changes.
  • Interactive: Created and destroyed on all clients. State updates are performed by the host. Other clients reflect these changes.
  • Passive: Created and destroyed on all clients. State updates are performed separately by each client, with no synchronization.
  • Private: Created and destroyed on the current client only. State updates are performed locally.

Justification

It is impossible to create a truly generic game server. Some update rules, such as physics, are common for all entities in all games, and thus can be employed a generic game server. However, other, more abstract game logic is dependent on the type of entity and game. Therefore, the server requires access to this custom entity logic. Since it is a goal to write the game from a client perspective, it therefore makes sense to give clients, servers, and editors a common API to handle entities. If every game instance is a client, then the only thing left to worry about is "Who performs the updates?". This problem is easily addressed with the aforementioned consistency types, which work well as properties of the entities themselves.

Basic Instructions for Using Meerkat to Build a Game

...