kriket Posted July 29, 2015 Share Posted July 29, 2015 I am thinking of making a platformer game but without tilemaps cos the extra work needed in photoshop to create seamless tilemaps is just not worth it for me, when I can just put sprites in and make a level out of them (especially since the game will only have about 4, short-medium levels anyway). Can someone give me tips on how I can optimize such a platformer, made without tilemaps, for mobile?Or if this indeed is a good way to go about this? I am thinking about things that other engines like Unity, use. Occlusion culling, texture packing/atlases, etc. Link to comment Share on other sites More sharing options...
drhayes Posted July 29, 2015 Share Posted July 29, 2015 This is a very broad question. Optimize it for what? Have you already started doing this and are having problems? If so, what are those problems? Occlusion culling in a 2d context seems weird -- do you mean for dynamic lighting, or fog of war effects? Or just stuff off-camera? Link to comment Share on other sites More sharing options...
kriket Posted July 30, 2015 Author Share Posted July 30, 2015 This is a very broad question. Optimize it for what? Have you already started doing this and are having problems? If so, what are those problems? Occlusion culling in a 2d context seems weird -- do you mean for dynamic lighting, or fog of war effects? Or just stuff off-camera? Optimize for mobile. I havent started yet, but just wanted to know if it's possible to do this without tilemaps (since tilemaps seem the standard for platformers), and get the thing running on mobile. I mentioned occlusion culling since its a must for a platformer where off-screen there's going to be the rest of the level as well as the rest of the assets, and occlusion culling will theoretically increase performance many-fold. Why is occlusion culling in a 2d platformer weird? Its the standard I would assume. Appreciate any help. Link to comment Share on other sites More sharing options...
drhayes Posted July 30, 2015 Share Posted July 30, 2015 I said "weird" because I've usually heard it in a 3d context, as in "triangles occluded by other triangles via depth" not "things going off-camera". That's why I wanted to make sure I understood what you were asking. Just a bug in my understanding, that's all. Obviously it's going to run update on everything in the world, on-camera or no. There's one consideration. I know Phaser has optimizations around not drawing tilemaps that are off-camera. It doesn't automatically cull offscreen DisplayObjects (including Sprites), it relies on you to set the "autoCull" property. It can get expensive doing the recursive descent into a DO's children, and its children's children, so Phaser makes you make the decision. kriket 1 Link to comment Share on other sites More sharing options...
kriket Posted July 30, 2015 Author Share Posted July 30, 2015 Obviously it's going to run update on everything in the world, on-camera or no. There's one consideration. I know Phaser has optimizations around not drawing tilemaps that are off-camera. It doesn't automatically cull offscreen DisplayObjects (including Sprites), it relies on you to set the "autoCull" property. It can get expensive doing the recursive descent into a DO's children, and its children's children, so Phaser makes you make the decision. Damn, thats thrown a spanner into the works. So tilemaps are better after all for platformers. Really hope Rich can add something here. Link to comment Share on other sites More sharing options...
Recommended Posts