Saturday, February 21, 2009

tac: Rethinking some decisions

I did a quick experiment, and I don't think partitioning the map will help rendering speed. Only drawing a 10x10 is only about 30FPS when the screen is near full. When I zoom in on a 50x50, it's about 27FPS. So partitioning might save me 3FPS...not really worth all the pain. Drawing 200 triangles can't be that slow, right...? I can't really do much about the fill-rate when it's zoomed in.

As for Z-buffering, I may have to use it after all. I just need that flexibility, especially for animations that change depth a lot (missile flying through). I may have to sacrifice alpha-blending and use alpha-testing. There are some other things I can try for sorting, such as sorting only indices and using glDrawElements (so I only have to move around the indices). But I'll use the Z-buffer for now.

I'm pretty stuck right now, so I'm gonna take a break from rendering optimization and move on to the UI and gameplay. I've been sketching up some UI schemes (what to click to do what, etc.), and I think it can be made pretty minimal yet not lose the depth of X-Com's controls. Other iPhone apps, like Safari, employ some pretty slick ways of augmenting the touch controls, such as the magnifying glass for text: touch and hold your finger for 0.5 secs on some text, and a little magnifying glass comes up, and then you can drag to move the cursor between letters precisely.  I'd like to do that for toggling map-layers, or maybe some context sensitive menus.

No comments: