Changes

Jump to: navigation, search

10th Floor

6,445 bytes added, 15:47, 5 December 2010
Project Status & Documentation
[[File:InteractiveGameEnv.jpg|400px]]
In the game, surrounding stage objects react to the player's motion. For example, ceiling tiles collapse as the player moves around.
 
== Traps ==
 
=== Trap Component of Map File ===
The map file has a format of (''tl'', ''tr'') where ''tl'' represents the tile type, and ''tr'' represents whether there is a trap or another game item for that specific tile.
If the tile is to have no traps on it then place a 0 value for the ''tr'' component; otherwise place a value of 5 to indicate that there is a trap (note that this is simply an indicator for the map file that there is a trap associated to this tile but the full specifications for the this trap are located in the trap file that is independent to this map file).
 
The order of the trap indicators in the map file must correspond to the order of the traps in the trap file, i.e. must have a one-to-one relation (although a tile may have multiple tiles if the '''order''' used for an entry in the trap file starts with 'n' for the first trap, and uses 'r' for each subsequent trap for that tile resulting in multiple traps for a single tile).
 
e.g. The first two entries in the map file is associated to the following traps in the trap file (notice the values of 5 for the trap specifier in the map file):
 
<u>Map File</u>:
 
1,0|1,0|1,0|1,5|1,0|1,0|1,0|1,0|1,0|1,0|1,0|1,0|1,0|1,0|1,0|1,0|1,0|1,0|10,9|3,0;
2,5|2,0|0,5|0,0|0,0|1,0|1,5|0,5|0,0|0,0|2,0|1,0|1,0|1,0|0,0|0,0|1,0|0,0|2,0|2,0;
 
<u>Trap File</u>:
 
//Note: "ROW=?,COL=?" comments refer to the row and column entry in the map file, for quick;
//user testing (i.e. has no significance in trap map parsing code);
//;
/ROW=1,COL=4;
20|n|2|0.45,0.4,0.1|0,0,0.15|-0.10|3.1,0,0|0,1,0|-0.5,4.5,0,0,0,0;
//ROW=2,COL=1;
10|n|1|0.9,0.1,0.02|0,0,0|-0.05|15;
//ROW=2,COL=3;
10|n|2|0.9,0.1,0.02|0,0,0|-0.05|15;
10|r|4|0.9,0.1,0.02|0,0,0|-0.05|15;
//ROW=2,COL=7;
10|n|2|0.9,0.1,0.02|0,0,0|-0.04|15;
10|r|4|0.9,0.1,0.02|0,0,0|-0.04|15;
10|r|3|0.9,0.1,0.02|0,0,0|-0.04|15;
10|r|7|0.9,0.1,0.025|0,0,0|-0.02|25;
10|r|8|0.9,0.1,0.025|0,0,0|-0.02|25;
//ROW=2,COL=8;
20|n|1|0.7,0.35,0.15|0,-0.25,0|-0.15|1,0,0|1,0,0|-1.5,0.25,0,0,0,0;
10|r|2|0.9,0.1,0.02|0,0,0|-0.05|15;
10|r|4|0.9,0.1,0.02|0,0,0|-0.05|15;
 
=== Line Entry Format of Trap File ===
 
<h2>Floor Spike</h2>
<u>Format</u>: '''trapType|order|trapSubType|px,py,pz|posx,posy,posz|pctDamage|noSpikes;'''
 
'''trapType''' = 10 (for floor spike trap)
 
'''order''' = either 'n' or 'r' meaning 'n' is for a new tile or 'r' for the same tile creating multiple traps
 
'''trapSubType''' = 1-8 (depends)
1 - ''faraway edge x-axis''
2 - ''close edge x-axis''
3 - ''edge left z-axis''
4 - ''edge right z-axis''
5 - ''middle x-axis''
6 - ''middle z-axis''
7 - ''diagonal from faraway left to close right''
8 - ''diagonal from faraway right to close left''
 
'''px,py,pz''' = percentage of the trap's size with relation to a single tile size
 
'''posx, posy, posz''' = the percentage of translation to perform on the trap from the origin of the tile (percentage is with relation to a single tile size for x and z axis, while for y axis is relative to the stage height)
 
'''pctDamage''' = (represents percentage of players health that will be either decreased or increased upon collision); > 0 means ''health bonus'', < 0 means ''health loss''
 
'''noSpikes''' = number of spikes
 
e.g.
10|n|5|0.9,0.1,0.1|0,-0.25,0|-0.20|10;
 
<h2>Projectile</h2>
<u>Note:</u> by default is centered in all axis at origin of the tile's dimensions
 
<u>Format</u>: '''trapType|order|trapSubType|px,py,pz|posx,posy,posz|pctDamage|mvx,mvy,mvz|rx,ry|rz|pminx,pmax,pimy,pmaxy,pminz,pmaxz;'''
 
'''trapType''' = 20 (for projectile trap)
 
'''order''' = either 'n' or 'r' meaning 'n' is for a new tile or 'r' for the same tile creating multiple traps
 
'''trapSubType''' = 1-6 (depends)
1 = DOUBLE_EDGE_SPEAR
2 = CROSS
3 = STAR
4 = DIAGONAL_LTR
5 = DIAGONAL_RTL
6 = PIECE_WISE
 
'''px,py,pz''' = percentage of the trap's size with relation to a single tile size
 
'''posx, posy, posz''' = the percentage of translation to perform on the trap from the origin of the tile (percentage is with relation to a single tile size for x and z axis, while for y axis is relative to the stage height)
 
'''pctDamage''' = (represents percentage of players health that will be either decreased or increased upon collision); > 0 means ''health bonus'', < 0 means ''health loss''
 
'''mvx,mvy,mvz''' = percentage for the trap's constant movement with relation to the game's traps forward speed (i.e. how fast to move for constant movement on the trap)
 
'''rx,ry,rz''' = percentage for the trap's constant rotation with relation to the game's traps rotation speed (i.e. how fast to rotate for constant movement on the trap)
 
'''pminx,pmax,pimy,pmaxy,pminz,pmaxz''' = the amount of movement with relation to a single tiles size.
For example, if you want to move a trap along the x-axis from current origin of the trap
to the left of current tile and right of the current tile back and forth, then would do:
-0.5,0.5,0,0,0,0
 
<u>e.g.</u> creates a star projectile with dimensions of 10% of the tile in all directions, and moving
to the left edge and right edge of the tile (with only rotation in y axis and moving at the
speed defined by default) with health loss of 30% upon collision with player: ''20|n|3|0.1,0.1,0.1|0,-0.25,0|-0.3|1,0,0|0,1,0|-0.5,0.5,0,0,0,0;''
 
<h2>Atom</h2>
<u>Note:</u> by default is centered in all axis at origin of the tile's dimensions
 
<u>Format</u>: '''trapType|order|trapSubType|px,py,pz|posx,posy,posz|pctDamage;'''
 
'''trapType''' = 30 (for atom trap)
 
'''order''' = either 'n' or 'r' meaning n is for a new tile or r for the same tile creating multiple traps
 
trapSubType = 1-6 (depends) <u>Note</u>: this sub type for the embedded projectile for the Atom
1 = DOUBLE_EDGE_SPEAR
2 = CROSS
3 = STAR
4 = DIAGONAL_LTR
5 = DIAGONAL_RTL
6 = PIECE_WISE
 
'''px,py,pz''' = percentage of the trap's size with relation to a single tile size
 
'''posx, posy, posz''' = the percentage of translation to perform on the trap from the origin of the tile (percentage is with relation to a single tile size for x and z axis, while for y axis is relative to the stage height)
 
'''pctDamage''' = (represents percentage of players health that will be either decreased or increased upon collision); > 0 means ''health bonus'', < 0 means ''health loss''
 
<u>e.g.</u>
''30|n|3|0.3,0.3,0.15|0,-0.25,0|0.35;''
== Project Status & Documentation ==
1
edit

Navigation menu