Saturday, February 5, 2011

New week of tasks

We are very close to the entire completion of survival mode. Daniel is tying all the loose ends to the end scenario of survival mode in which the player dies, transitions to some sort of game over sequence and then proceed to a high score screen. I've assigned tasks for everyone and if everyone completes their task, we'll be projected to finish in 2 weeks! I have continued to add optimization to our collision code and testing it on the xbox 360 to strike a balance between accurate collisions and not cause slow down in the frame rate. I profiled our current project and I am happy to say that we have done a wonderful job at keeping our code optimized. We predicted the collision would most likely be the most computational heavy portion of our project and we were correct. However, it only takes about 6% of the actual execution time to run. This means most of the work are being done by things we have no control over such as the xna framework. We have also decided to cap the max number of enemy ships at around 15. We reasoned that by the time 15 enemies have spawned, there is no chance for you to survive. Deploying on the xbox, I got absolutely no slow downs with 15 enemy ships all shooting lasers at the player. Our next task now is to implement a mesh to mesh collision system with the larger objects such as giant asteroids and boss ships. Spatial hash is dependent on the fact that your position is separated so only other entities that share similar position as you will be considered for collision. At the same time, the algorithm is efficient because we can ignore alot of empty space. With giant ships, they could take over hundreds of grids in which case, collision becomes very slow since we are looping through so much junk again. Therefore, we will first use a boundinsphere to perform a preprocess step to weed out all units that are too far. Then we can take all the entities that are being considered and perform mesh to mesh collision with the giant object. My primary concern is the amount of slowdown that this mesh to mesh algorithm might cause, but with enough optimization, I believe it should not cause any major problems.

No comments:

Post a Comment