1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
/**** FILE UNDER CONSTRUCTION ****/
/**** Epiphany Map File Description ****/
// by denever
A map file is written in EMDL, which stands for:
Epiphany
Map
Definition
Language
EMDL has some easy commands.
<command> <object> [(X,Y)];
# this is a comment in EMDL
Command set:
set variable value;
^ ^
how to use variables:
name example: set name "ciao"; it sets name of map
author example: set author "denever"; it sets author of map
minscore example: set minscore 23; it sets minimum score needed to win level
maxtime example: set maxtime 125; it sets countdown timer
The objects that you can put on a map are:
empty
player
grass
steel
emerald
boulder
sapphire
exit
explosion
red_door
blue_door
green_door
yellow_door
red_key
blue_key
green_key
yellow_key
flintstone
peperon
peperon_up
peperon_right
peperon_down
peperon_left
brick
wood
tomato
tomato_up
tomato_right
tomato_down
tomato_left
# How to put an object onto a map
# x is row number of map matrix
# y is column number of map matrix
put <object> (x,y);
example:
put player (1,1);
# How to put a line of objects onto a map
# x1,y1 is the position of the beginning of line
# x2,y2 is the position of the end of line
line <object> (x1,y1)(x2,y2);
example:
line emerald (1,2)(1,20);
# How to put a rect of objects onto a map
# h is height of rect
# w is width of rect
# x y is position of upper left corner
rect <object> (x,y)(h,w);
example:
rect peperon (3,3)(4,4);
You can't use a map without a player or exit or both.
Remember to write:
put player (x,y);
put exit (x1,y1);
at the end of map file, because these entities can be unintentionally overwritten
by others!
But without an overwrite check you can also make strage effects on a map.
Example:
rect grass (2,2)(12,12);
rect peperon (3,3)(10,10); # note that this line overwrites previous
rect grass (4,4)(8,8); # idem
rect sapphire (5,5)(6,6); # idem
try to write this in a map file and feed it to epiphany....
:)))
Of course, there are some limitations:
- there must be only one player per map;
- there must be only one exit per map;
- map borders are automagically made of steel;
- map width and height must be 32 (but it really no matter, as epiphany 0.5.0 do not use this value);
- the numbar of maps is hardcoded into an header... sorry, I'll fix it in the next release :)
ciao
giuppe <giuseppe.da@gmail.com>
denever <denever@users.sf.net>
PS: Send us your maps!! We want to play them... and maybe to insert them into the game :)
|