Hello all,
not an entirely cocos2d relevant post but I'm hoping some of the helpful people around here might point me in the right direction.
I'm close to wrapping up my game but I get random drops in performance, and the occasional "choke" for half a second where frame skip is visible.
So, I obviously need to optimize, find memory leaks and so forth.
So far, I'm using the xcode "start with performance tool" presets, using CPU sampler to try and figure out what functions are using up the most cpu.
I tick "running sample times", "objective c" and "hide system libraries".
I sometimes see a high peak in EAGLView swapBuffers , is that normal?
My game is comprised by two atlas sprites of 50 capacity each, of which on average 20 are visible on screen.
A certain number of tilemapatlas of 16x16 with 64x64 tiles.
A bunch of 3d buildings, each building requires it's separate opengl call with which it draws the 6 faces of the building (a cube basically).
I'm thinking I could batch the opengl call for all the buildings into one but have no idea of how to construct a vertex array for that, and especially map different textures.
So forgive my blathering, just hope somebody could help me understand which tools I need to use and how.
Any help is as always greatly appreciated!
Thanks
Patrick
[other] Help with optimizing and tools
(3 posts) (2 voices)-
Posted 2 years ago #
-
Personally I uncheck "invert call tree" and check what is taking much time. You don't have any NSLog or any changing Labels by any chance ? (that made my app choke).
spawBuffers is taking like 70% of the time in my app.
Posted 2 years ago # -
Yeah I'm aware of NSLog chocking performance when it outputs to the debugger.
I have changing labels but it's a labelatlas and that shouldn't affect performance too much.
I'll just keep looking and testing I suppose.
ThanksPosted 2 years ago #
Reply
You must log in to post.