Jump to: navigation, search

10th Floor

921 bytes added, 04:04, 9 December 2010
Interactive Game Environment
=== Collision Detection Against Walls ===
Collision detection with the map structure is simplified by the use of 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 be more efficient to compare the integer tile type codes instead of actually retrieving and comparing floating point coordinates of the main character object and wall objects. To add more efficiency, in the Design::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 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 or not.
=== Interactive Game Environment ===

Navigation menu