Hello,
I am developing a 3D Game with 2D mechanic (I want some objects to be 3d, but some others are 2d, and the mechanic itself is 2d), and I am having performance issues on devices such as iPad, Galaxy Tab (10.1), in another words, the bigger the device, the slower it runs (iPad 2 however runs it smoothly at 60 FPS, since it is considerably more powerful then iPad 1).
My question is: what is the ideal way of working with transparent elements on the game? Even tho our game does not use that many transparent elements during gameplay (only on menu), they are still causing the game to run slow on some devices. I’ve read a great post about Zombieville USA about how its made and I might be very ignorant on the subject (I am, actually), but I dont know what they were doing differently yet.
Here is one of my scenarios:
There is this scene:
And it consists of: animated 2D character (with transparent planes), 4 transparent planes (buttons/logo), 4 transparent background planes (houses layer 1, houses layer 2, ground, ceiling) and 1 diffuse background plane. In another words, transparent elements are the following:
This gave me a 15-20fps performance on iPad 1.
After long readings and understanding some concepts, and people speaking of how merciless transparencies can be, I’ve made some changes: I modeled (poorly) the background transparencies (the 4 transparent planes), and made the parallax effect using the transform instead of the UV. Looks like this on the editor view:
This gives me a 25-35 fps performance on iPad 1. The profiler looks like this:
So, for test purposes, I removed all the remaining transparent geometry… so the scene looks like this:
And the profiler like this:
And it is still at 45-50 fps! So my question is: How is the RIGHT way of handling this? What am I doing wrong? Im not saying 45-50 fps is bad, but if no transparency at all, and 1.7k tris cost the device 10-15 fps… there must be something I am not grasping here.
This is just a menu problem, since I have some scrolling for world selection, it looks terrible at low FPS, and the click events sometimes seen not to be sent due to the FPS, which is also terrible… but it also happens during the game, making the gameplay (its an action/strategy game) awkward… so please, if anyone has any ideas on the right way to tackle this… because I see game menus (and in game scenes) that are extremely complex and animated and full of particles and huge transparent elements… and it runs perfectly… and my simple game is lagging =(
I am sorry for the long post, but I dont know what else to do!
Thank you for your attention,
Best regards,
Allan