Majik Client Protocol (MCP) Documentation Version Draft 1 (c) 1998 Jari "Dazzt" Saukkonen $Id$ 1.1 PRINCIPLES There were three principles that were used in the creation of this protocol. They were: * The protocol must be human-readable (no special chars, easier to debug) * The protocol shouldn't use too much bandwidth (short commands) * The protocol mustn't be too complex (easier to debug and develop) 2.1 OVERVIEW The purpose of this protocol is to act as a common language between the Majik server and several clients. MCP doesn't have anything to do with the game itself, it is just a way to transport data between the client and server. The protocol consists of 'instructions'. The instruction format is (followed by newline): ::; '::;\n' string denotes a 'nop', empty command. Traffic from server to client consists of pre-defined instructions, defined below. Client-to-server communication is done using the same format, except that the command may be anything typed by the player. Command validity is then defined by server and acted appropriately. 2.2 COMMAND SET To save bandwidth, commands are limited to the maximum of six characters. The first character should somehow denote the group the command belongs into, ie. commands for player messages start with 'M', player settings with 'P' etc (look below). This rule can be broken by special commands, MAP for instance, that don't have any similar commands. command arguments description MSEE Player sees something MHEAR Player hears something MSMELL Player smells something MFEEL Player feels something MTASTE Player tastes something MSENSE Player senses something MSG Message that is always seen PVIS Set player visibility PLTMIN Set minimum light seen PLTMAX Set maximum light seen PPOS Set the location of player MAP Sends map of the area to client QUIT Shutdown client REBOOT Server is rebooting SHUTDN Server is shutting down ... etc, add more stuff, this is only a draft :) ... 3.1 CLIENT The client screen is divided into three main parts, which are the map, room for messages and couple of lines for player to type commands.