Friday 1 June 2012

It Works! Mostly...

My method for tracking the player along the tunnels in Tunnel Flyer is working! I am also able to make the player bounce off of the walls most of the time, issues arise when flying perpendicularly towards the wall, but I should be able to fix that with collision prediction. Something is causing the game to lag however. Currently I am only ever checking against two of the three tunnel segments that I am tracking, when tracking 3, the game was unplayable. Now when only tracking 2, the game is playable but the lag is noticeable. In all, I am excluding 1/3 of the tunnel segments the player is near, and excluding any triangles in the mesh that are too far away from the player. The next best thing second to only ever checking 1 tunnel segment (which seems like a bad idea) is to perhaps make the tunnels larger while keeping a similar triangle count. This way, the player will only ever be nearer to a smaller number of vertices so less computations should be required.

I will try to find a way to profile the game as it is playing to see exactly where the issues are (though I have a pretty good idea), as well as continue to make optimizations until the game is running smoothly.

On a side note, I have begun learning blender for modeling and animations. I'm not that bad though I can't say I'm all that good either, my humanoid ended up looking like someone wearing baggy overalls with an Easter Island head. So now that I know my way around the basics of blender modeling, I am going to start learning animations when I have time. Oh and I won't be using my model, I found a much nicer royalty-free one online and will continue learning with that one instead. Haha

No comments:

Post a Comment