kriket Posted July 30, 2015 Share Posted July 30, 2015 Posted on phaser forum but thought I might also ask pixi guys as well, since it is a question about rendering. 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 length 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 (of off-screen sprites), texture packing/atlases, etc. 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. Quote Link to comment Share on other sites More sharing options...
xerver Posted July 30, 2015 Share Posted July 30, 2015 > I am thinking about things that other engines like Unity, use. Occlusion culling (of off-screen sprites), texture packing/atlases, etc. You should do all those things. Phaser has features to help with off-screen sprites culling, you will need to pack assets yourself and use sheets. As for using large images on levels, make sure the textures aren't too big. There are maximum sizes to textures to be used on the GPU: http://webglstats.com (see MAX_TEXTURE_SIZE at the very bottom). For mobile 4096 is a good number to stay under (that is the width x height of your image). If your images are too big you will need to break them up and tile them. kriket 1 Quote Link to comment Share on other sites More sharing options...
kriket Posted July 30, 2015 Author Share Posted July 30, 2015 Thank you so much. Game itself will mostly consist of static sprites (terrain), just one animating sprite (player), at most 10 sprites being tweened on screen and a few effects like in "run pixie run". That's all. I knew phaser had features such as object pooling, etc. Forgot that it also did off-screen culling out of the box. Texture packing and spritesheets wont be an issue as I know how to do that. So the only thing I need to take into consideration is to not make any single sprite larger than say 4096. But apart from that a platformer with a medium-length level shouldn't run into other technical difficulties, am I right? Especially since off-screen culling means it really shouldn't matter how long the level is and how many assets the game has in total (although preloading assets will take a bit longer). PS - I loved "Run pixie run" and had a lot of things to learn from such a simple game. Can I pls ask whether you used a 2d effects package for that one and what was it? I want to buy it. Quote Link to comment Share on other sites More sharing options...
xerver Posted July 30, 2015 Share Posted July 30, 2015 AFAIK the only libraries really used were TexturePacker, PIXI, and maybe some tween libs. kriket 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.