Changes

Jump to: navigation, search

10th Floor

262 bytes removed, 04:09, 9 December 2010
Collision Detection Against Walls
[[File:CollisionDetectionAgainstWalls.jpg|400px]]
Collision detection with the map structure is simplified by the use of simple int array that holds the tile type data stored in the map array. Considering the fact that the total number of Box objects created easily exceeds 1000 (when loading a 20 by 20 map), we thought it might will be more efficient to compare the integer tile type codes instead of than actually retrieving and comparing floating point coordinates of the main character object and wall objects. To add more efficiency, as described in the Design::image above, update(int) module, it selectively retrieves only the necessary tile data from the tile array and does the simple comparison with the retrieved tile type codes. Then, it finds the displacement in x-axis and z-axis by splitting determines whether the character movement vector and identifies if there is an obstacle in the direction of each axis and decides to let the player to move can proceed or not.  
=== Interactive Game Environment ===
1
edit

Navigation menu