moved the sandbox map into the CarFire project
git-svn-id: https://bd85.net/svn/cs3505_group@61
92bb83a3-7c8f-8a45-bc97-
515c4e399668
[metadata]\r
author = Chaz McGarvey\r
levelname = Sandbox\r
[metadata]\r
author = Chaz McGarvey\r
levelname = Sandbox\r
- tileset = FuturisticBuilding\r
- numplayers = <1-4>\r
+ tileset = FuturisticBuilding\r
+ numplayers = <1,4>\r
- entity = SaberMonster\r
+ entity = SaberMonster\r
path = [1,1] [5,6] wait(5) [45,2]\r
loop = true\r
[B]\r
path = [1,1] [5,6] wait(5) [45,2]\r
loop = true\r
[B]\r
; Function ideas:\r
; has(entity) Player has given entity in his inventory.\r
; wait(seconds) Pause for some number of seconds.\r
; Function ideas:\r
; has(entity) Player has given entity in his inventory.\r
; wait(seconds) Pause for some number of seconds.\r
-; remove(entity) Remove an entity from the game.\r
+; remove(entity) Remove entities of a certain type from the game.\r
; remove(coord) Remove whatever is at the given coordinates.\r
; remove(coord) Remove whatever is at the given coordinates.\r
-; create(entity, coord) Create an entity at some location\r
+; create(entity, coord) Create an entity at some location.\r
+; play(soundname) Play a sound.\r
\r
[maptable]\r
+------------------------------------------------------------------------------+\r
\r
[maptable]\r
+------------------------------------------------------------------------------+\r
; [-+|] Place wall segments.\r
; [1-4] Identify the player starting positions.\r
; [A-Za-z] Place a defined game entity.\r
; [-+|] Place wall segments.\r
; [1-4] Identify the player starting positions.\r
; [A-Za-z] Place a defined game entity.\r
$HOME/.vim/doc or\r
$HOME/vimfiles/doc\r
\r
$HOME/.vim/doc or\r
$HOME/vimfiles/doc\r
\r
-You're done! To use the level editor without installing the plugin, just\r
-|source| the plugin in vim:\r
+Alternatively, you can use the level editor without installing the plugin,\r
+just |source| the plugin in vim:\r
- :source path/to/leveleditor.vim\r
+ :so /path/to/leveleditor.vim\r
+\r
+Or setup Vim to do it automagically with |:autocmd|; put this in your user\r
+Vim config file:\r
+\r
+ au BufNewFile,BufRead *.cfmap so /path/to/leveleditor.vim\r
\r
===========================================================================\r
3. Features *leveleditor-features*\r
\r
===========================================================================\r
3. Features *leveleditor-features*\r
\r
The format of the CarFire map file follows the de facto standard INI file\r
format, with at least one notable exception which we'll get to shortly.\r
\r
The format of the CarFire map file follows the de facto standard INI file\r
format, with at least one notable exception which we'll get to shortly.\r
+Because of that exception, a specialized loader is necessary, so map files\r
+should carry the extension `cfmap' so as not to have them be mistook as\r
+your everyday household variety INI file.\r
\r
*leveleditor-metadata*\r
The metadata section of the file contains just that: metadata. Some of the\r
\r
*leveleditor-metadata*\r
The metadata section of the file contains just that: metadata. Some of the\r
\r
To make parsing simple, the format of the values that make up a key-value\r
pair follows a consistent pattern based on the type of thing being\r
\r
To make parsing simple, the format of the values that make up a key-value\r
pair follows a consistent pattern based on the type of thing being\r
-described. Here are the things that can appear on the right side of a\r
-key-value pair assignment:\r
+described. Except in the case of strings, white space is ignored. Here\r
+are the things that can appear in a map file.\r
+\r
+ *leveleditor-keys*\r
+Keys are special strings that appear on the left side of a key-value pair,\r
+which combined is a key and value separated by an equals sign. Keys are\r
+simply a sequence of alphabet characters. No white space, digits, or\r
+punctuation is allowed in a key.\r
\r
*leveleditor-strings*\r
Strings are simply a sequence of characters. If the key expects to be set\r
to a string, then the right side of the assignment up to the line-end will\r
be parsed as a string, including any white space. If a string value is not\r
\r
*leveleditor-strings*\r
Strings are simply a sequence of characters. If the key expects to be set\r
to a string, then the right side of the assignment up to the line-end will\r
be parsed as a string, including any white space. If a string value is not\r
-necessarily expected, you can explicitly surround the string with quotes;\r
-otherwise, the value could be interpreted as a list if it contains any\r
-white space.\r
+necessarily expected, you can explicitly surround the string with double\r
+quotes; otherwise, the value could be interpreted as a list if it contains\r
+any white space. The characters given as a string are interpreted as-is.\r
+No escape characters are ever parsed (i.e. \t or \n).\r
-The characters that make up the string are included in the string according\r
-to their literal characters; no escape characters are ever parsed (i.e. \t\r
-or \n). Any value which does not follow any of the following formats will\r
-be read as a string.\r
-\r
- *leveleditor-numbers*\r
+ *leveleditor-integers*\r
Base-ten numbers are parsed as they appear. The parser is allowed to read\r
numbers with special characters such as -10e5. Numbers cannot be specified\r
in any other base than ten.\r
\r
Base-ten numbers are parsed as they appear. The parser is allowed to read\r
numbers with special characters such as -10e5. Numbers cannot be specified\r
in any other base than ten.\r
\r
+ *leveleditor-booleans*\r
+Boolean values are one of two keywords: `true' and `false.' Case is\r
+ignored when parsing booleans, but abbreviations are not allowed. For\r
+example, `TrUe' is okay, but `T' is not.\r
+\r
*leveleditor-coordinates*\r
To specify a coordinate or location on the map, surround two\r
comma-separated integers with square brackets. For example,\r
*leveleditor-coordinates*\r
To specify a coordinate or location on the map, surround two\r
comma-separated integers with square brackets. For example,\r
A range of integer values is parsed as two comma-separated integers with\r
angular brackets. For example,\r
\r
A range of integer values is parsed as two comma-separated integers with\r
angular brackets. For example,\r
\r
- <1-4> Matches any integer between 1 and 4, inclusive.\r
+ <1,4> Matches any integer between 1 and 4, inclusive.\r
\r
In this way, you could set a range as the value for the key `numplayers' in\r
the |leveleditor-metadata| section, representing the minimum and maximum\r
\r
In this way, you could set a range as the value for the key `numplayers' in\r
the |leveleditor-metadata| section, representing the minimum and maximum\r
*leveleditor-functions*\r
The syntax of a function call is familiar. First comes the name of the\r
function to be called, then an open parenthesis, followed by a\r
*leveleditor-functions*\r
The syntax of a function call is familiar. First comes the name of the\r
function to be called, then an open parenthesis, followed by a\r
-comma-separated list of arguments before a closing parenthesis. For\r
-example,\r
+whitespace-separated (no commas!) list of arguments before a closing\r
+parenthesis. For example,\r
\r
wait(3) Delay for 3 seconds.\r
has(F) Check if a player has an entity F in inventory.\r
\r
wait(3) Delay for 3 seconds.\r
has(F) Check if a player has an entity F in inventory.\r
- create(B,[2,3]) Create an entity B on the map at [2,3].\r
-\r
-Note, the file loader parses each group of characters between white space\r
-separately; therefore, do not include spaces between the arguments of the\r
-function call, only a single comma.\r
+ create(B [2,3]) Create an entity B on the map at [2,3].\r
\r
*leveleditor-lists*\r
Some keys can be assigned a list of things, such as functions to be called\r
\r
*leveleditor-lists*\r
Some keys can be assigned a list of things, such as functions to be called\r
design, you can safely ignore all of this.\r
\r
Maintainer: Chaz McGarvey\r
design, you can safely ignore all of this.\r
\r
Maintainer: Chaz McGarvey\r