Changes

Jump to: navigation, search

10th Floor

12,447 bytes added, 11:36, 28 March 2011
Ryan Wang
[[Image:filename|thumb|widthpx| ]]{{GAM666/DPS901 Index | 20103}}
= 10th Floor Maze =
== Project Marking Percentage ==
== Team Members ==
# [mailto:rmwang@learn.senecac.on.ca?sujbect=GAM666/DPS901 Ryan Wang], Responsibility: Stage creation, textures, collision detection agains stage objects, loading map files.
# [mailto:avathsalan@learn.senecac.on.ca?sujbect=GAM666 Aravinthan Vathsalan], Responsibility TBATraps, collision detection against traps, update character stats in respond to traps (HUD), health bonus # [mailto:gmok@learn.senecac.on.ca?sujbect=GAM666 Geoffrey Mok], Responsibility TBA: HUD(Progress bars, 2D sprite animations), Environment fog, Animated billboards
# [mailto:scborges@learn.senecac.on.ca?subject=gam666 Steve Borges], Responsibility TBA
# [mailto:caangus@learn.senecac.on.ca?subjectgame666 Corey Angus], Responsibility TBA
== Revised Game Proposal ==
[[File:SampleGamePlay.jpg|400px|right]]=== Revised Proposal ======= Game Genre ====Phase 1: First person maze puzzle Phase 2: Action role-playing game === How to play - Stage clear conditions ===<ul><li>Sprint mode: Move the character with arrow keys through the maze and try to find the way out. </li><li>Time attack mode: Find the exit within given time.</li></ul>==== Game Items ====<ul><li>Haste item: Increases character's movement speed by 150% for 10 seconds. (Key 1)</li><li>Dexterity item: Allows player to pass through the obstacles more quickly for 10 seconds. (Key 2)</li><li>Revert ceiling collapse: Makes the collapsed ceiling tiles rise back up into initial position for 20 seconds. (Key 3)</li><li>Stop ceiling collapse: Stops ceiling collapse for 20 seconds. (Key 4)</li></ul> ==== Current Status ====<ul><li>HUD</li><li><del>Map file loader</del></li><li>Main character <del>keyboard control</del>, <del>mouse control</del> & game pad control</li><li><del>Sound effects</del></li><li>Traps, items, enemy characters (next phase)</li><li>Collision detection against <del>map components</del>, enemy characters, traps, <del>obstacles</del> & items</li></ul>
== Map of the World of the Game ==
=== Dynamic Map Configuration ===
==== Overview ====
The game is designed to load map information from map files and dynamically generate game environment and components accordingly. Map configuration is flexible in size and configuration and can be easily modified. As shown in the picture below, tile type is described in numbers and details are as follows:
<ul>
[[File:DynamicMapSystem2.jpg|810px]]
==== Sample map file ====
Below is a sample map configuration file that generates 5 X 9 stage. The image above is drawn based on this map configuration.
1,0|1,0|3,0|9,9|2,0;
2,0|1,0|2,0|1,0|2,0;
0,1|3,0|3,0|3,0|3,0
 
=== Collision Detection Against Walls ===
 
[[File:CollisionDetectionAgainstWalls.jpg|800px]]
Collision detection with the map structure is simplified by the use of simple int array that holds the tile type data. Considering the fact that the total number of Box objects created easily exceeds 1000 (when loading a 20 by 20 map), we thought it will be more efficient to compare the integer tile type codes than actually comparing floating point coordinates. To add more efficiency, as described in the image above, update() module selectively retrieves only the necessary tile data from the tile array and determines whether the character can proceed or not.
=== Interactive Game Environment ===
[[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. Note that this is relative to the orientation of the tile. 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 movingto the left edge and right]]edge of the tile (with only rotation in y axis and moving at thespeed 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 ==
=== Modifications to the framework ===
 
 
=== Progress / Updates ===
==== Aravinthan Vathsalan ====
'''Responsibility: ''' Traps, collision detection against traps, update character stats in respond to traps (HUD), health bonus
 
<ul>
<li>November 22: Modified Object to include new graphic primitive of Pyramid</li>
<li>November 23: Added graphic primitive FloorSpike and implemented components specific to collision detection</li>
<li>November 23: Added graphic primitive Projectile and implemented components specific to collision detection</li>
<li>Added Atom and implemented specific to collision detection</li>
<li>Implemented trap file parser to create traps from specifications of a text file</li>
<li>Integrated map file with logic for placing a trap(s) for a specific tile</li>
<li>Creates traps for a specific tile in the map file and the specifications for the traps from the trap file</li>
<li>Added updated map file with indicators for trap(s) for a specific tile and the specifications of the traps in the associated trap file</li>
<li>Updated player object to have health attribute and updates the health with respect to collision (damage from traps)</li>
<li>Added health bar, health display, and number of restarts (i.e. deaths) to the HUD component</li>
<li>Moves the player back to the starting position when player loses all health and increments number of restarts(resets health and translate the player back to start position)</li>
<li>One time items such as health bonuses (represented as an Atom object with a positive "damage" to health) are destroyed when player collides with it for the first time (does not do so if the player is at max health)</li>
 
</ul>
 
==== Corey Angus ====
'''Responsibility: ''' Enemy AI - To Be Confirmed
==== Geoffrey Mok ====
'''Responsibility: ''' HUD(Progress bars, 2D sprite animations), Environment fog, Animated billboards
 
<ul>
<li>November 14: Modified HUD to display multiple textures</li>
<li>November 16: Added iHUDTexture interface, HUD can now display progress bars</li>
<li>November 19: Added background image for progress bar, implemented progress bar for item duration</li>
<li>November 21: Added basic environment fog</li>
<li>November 23: Added 2D animated sprite functionality to HUDTexture</li>
<li>November 28: Added iEnvironment for more dynamic fog manipulation</li>
<li>December 02: Implementation of billboarding (2D sprite in 3d world, always faces the player)</li>
<li>December 07: Implementation of animated billboards)</li>
</ul>
 
==== Ryan Wang ====
'''Responsibility: ''' Stage/levels design
<ul>
[[File:TenthCeilingCollapse.jpg|200px|thumbnail|right|Fig.R1. Ceiling collapse effect]]
[[File:TenthUserDialog.jpg|200px|thumbnail|right|Fig.R2. Dialog Box UI Design]]
 
<li>October 11: Prepared texture images for the stage components. Created walls, ceilings and floor tiles.</li>
<li>October 31: Added the code that dynamically creates stage components according to the maze matrix.</li>
<li>November 2: Added codes (on the Camera.cpp) for camera movements and keyboard/mouse controls. Implemented simple collision detection against the walls. Added breathing/fainting/walking effects.</li>
<li>November 10: Main character object is created. Character movement is handled in the Design.cpp instead of Camera.cpp. Collision against walls is also handled in the Design.cpp.</li>
<li>November 11: Map is initialized based on the configuration in the map file. Added obstacles. Ceiling tiles collapse as the player travels around. Added sound effects. (Fig.R1)</li>
<li>November 13: Game items are added - Haste item, dexterity item, stop/revert collapse items. Try keys 1-4.</li>
<li>November 14: Added background image in the dialog box. (Fig.R2)</li>
</ul>
 
==== Steve Borges ====
'''Responsibility: ''' Audio
1
edit

Navigation menu