added explanation of returning array and fixed links
authorvittorio.giovara@gmail.com
Tue, 22 Jun 2010 11:34:58 +0000
changeset 1 d51ef96162d8
parent 0 89253999c825
child 2 ba21be2f1b7a
added explanation of returning array and fixed links
EngineProtocol.wiki
--- a/EngineProtocol.wiki	Tue Jun 22 11:17:50 2010 +0000
+++ b/EngineProtocol.wiki	Tue Jun 22 11:34:58 2010 +0000
@@ -1,5 +1,5 @@
 #summary Protocol for frontend/engine interaction.
-#labels Documentation
+#labels Documentation,Engine,Frontend,Protocol
 
 = Introduction =
 
@@ -12,7 +12,8 @@
 = 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: MapConfigViewController.m
+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]
+
 == Protocol ==
 || *Frontend*      || *Engine*          || *Format*                  ||
 || UUID            ||                   || {{{eseed{ ... }}}}        ||
@@ -22,7 +23,7 @@
 ||                 || 128x32 byte array || {{{0YSD3 ... FSAD0}}}     ||
 
 === UUID ===
-The UUID is a 32 bytes array composed of ASCII characters; groups of letters should be separated by '-'.
+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.
 
 Example: _eseed {AERTB-62FASDSAD-NNIASDSADASD-12P}_
 
@@ -30,12 +31,12 @@
 _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.
 
 || *Value* || *Filter Selected* ||
-|| 0       || None          ||
-|| 1       || Large         ||
-|| 2       || Medium        ||
-|| 3       || Small         ||
-|| 4       || Cavern        ||
-|| 5       || Wacky         ||
+|| 0       || None              ||
+|| 1       || Large             ||
+|| 2       || Medium            ||
+|| 3       || Small             ||
+|| 4       || Cavern            ||
+|| 5       || Wacky             ||
 
 Example: _e$template_filter 0_
 
@@ -61,4 +62,11 @@
 
 Example: _e$mazesize 4_
 
+=== 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.
+
+_No example needed_
+
 = In-Game =
\ No newline at end of file