EngineProtocol.wiki
changeset 2 ba21be2f1b7a
parent 1 d51ef96162d8
child 7 a50f628f1564
--- a/EngineProtocol.wiki	Tue Jun 22 11:34:58 2010 +0000
+++ b/EngineProtocol.wiki	Tue Jun 22 11:40:27 2010 +0000
@@ -1,6 +1,8 @@
 #summary Protocol for frontend/engine interaction.
 #labels Documentation,Engine,Frontend,Protocol
 
+<wiki:toc max_depth="3" />
+
 = Introduction =
 
 The frontend interacts with the engine in two separate occasions:
@@ -12,16 +14,17 @@
 = Map Preview =
 Frontend needs to generate a preview of the map that is going to be used in game; there is no handshaking.
 
-Files on which this protocol is implemented: [http://code.google.com/p/hedgewars/source/browse/QTfrontend/hwmap.cpp hwmapp.cpp], [http://code.google.com/p/hedgewars/source/browse/project_files/HedgewarsMobile/Classes/MapConfigViewController.m MapConfigViewController.m]
+Files in which this protocol is implemented: [http://code.google.com/p/hedgewars/source/browse/QTfrontend/hwmap.cpp hwmapp.cpp], [http://code.google.com/p/hedgewars/source/browse/project_files/HedgewarsMobile/Classes/MapConfigViewController.m MapConfigViewController.m]
 
 == Protocol ==
 || *Frontend*      || *Engine*          || *Format*                  ||
-|| UUID            ||                   || {{{eseed{ ... }}}}        ||
+|| UUID            ||                   || {{{eseed { ... }}}}       ||
 || Template Filter ||                   || {{{e$template_filter N}}} ||
 || Map Type        ||                   || {{{e$mapgen N}}}          ||
 || Maze Value      ||                   || {{{e$maze N}}}            ||
 ||                 || 128x32 byte array || {{{0YSD3 ... FSAD0}}}     ||
 
+== Message Format ==
 === UUID ===
 The UUID is a 32 bytes array composed of ASCII characters; groups of letters should be separated by '-'. There are standard function calls to automatically generate this string depending on the tools used.
 
@@ -62,7 +65,7 @@
 
 Example: _e$mazesize 4_
 
-=== Array ===
+=== Image Array ===
 The reply from engine is a 128x32 bytes array which contains the preview image in pixel-dot notation: every bit represents a pixel of the image, 1 is black, 0 i white. Clearly it can only contain a monochromatic image, but it can be colored by the rendering engine of the frontend.
 
 This image format is supported by many platforms, but it's very easy to parse anyways. The result is always a 256x128 pixel image.