EngineProtocol.wiki
author vittorio.giovara@gmail.com
Tue, 22 Jun 2010 11:17:50 +0000
changeset 0 89253999c825
child 1 d51ef96162d8
permissions -rw-r--r--
Map preview protocol documentation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
     1
#summary Protocol for frontend/engine interaction.
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
     2
#labels Documentation
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
     3
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
     4
= Introduction =
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
     5
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
     6
The frontend interacts with the engine in two separate occasions:
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
     7
  * map preview generation;
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
     8
  * game setup and statistics messages.
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
     9
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    10
Messages are always in form of a string of bytes, and the first byte contains the message size (hence the maximum length is 255-1).
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    11
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    12
= Map Preview =
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    13
Frontend needs to generate a preview of the map that is going to be used in game; there is no handshaking.
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    14
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    15
Files on which this protocol is implemented: MapConfigViewController.m
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    16
== Protocol ==
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    17
|| *Frontend*      || *Engine*          || *Format*                  ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    18
|| UUID            ||                   || {{{eseed{ ... }}}}        ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    19
|| Template Filter ||                   || {{{e$template_filter N}}} ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    20
|| Map Type        ||                   || {{{e$mapgen N}}}          ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    21
|| Maze Value      ||                   || {{{e$maze N}}}            ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    22
||                 || 128x32 byte array || {{{0YSD3 ... FSAD0}}}     ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    23
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    24
=== UUID ===
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    25
The UUID is a 32 bytes array composed of ASCII characters; groups of letters should be separated by '-'.
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    26
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    27
Example: _eseed {AERTB-62FASDSAD-NNIASDSADASD-12P}_
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    28
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    29
=== Template Filter ===
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    30
_N_ selects the type of map that is going to be generated. This command is ignored when MapGen is not 0, but it must be set anyways.
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    31
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    32
|| *Value* || *Filter Selected* ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    33
|| 0       || None          ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    34
|| 1       || Large         ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    35
|| 2       || Medium        ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    36
|| 3       || Small         ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    37
|| 4       || Cavern        ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    38
|| 5       || Wacky         ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    39
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    40
Example: _e$template_filter 0_
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    41
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    42
=== Map Type ===
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    43
_N_ is a boolean variable (0/1) that selects standard map generation or maze map generation.
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    44
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    45
|| *Value* || *Map Type*   ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    46
|| 0       || Standard Map ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    47
|| 1       || Maze Map     ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    48
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    49
Example: _e$mapgen 1_
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    50
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    51
=== Maze Value ===
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    52
_N_ selects the type of maze selected, similarly to Template Filter
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    53
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    54
|| *Value* || *Filter Selected*       ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    55
|| 0       || Small Tunnels           ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    56
|| 1       || Medium Tunnels          ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    57
|| 2       || Large Tunnels           ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    58
|| 3       || Small Floating Islands  ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    59
|| 4       || Medium Floating Islands ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    60
|| 5       || Large Floating Islands  ||
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    61
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    62
Example: _e$mazesize 4_
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    63
89253999c825 Map preview protocol documentation
vittorio.giovara@gmail.com
parents:
diff changeset
    64
= In-Game =