Croweley Posted April 7, 2015 Share Posted April 7, 2015 Hey all, I'm about to use a tilemap for our game, which needs 1- A ground layer2- A layer for players and non-tile objects (which are groups, not sprites)3- An upper (above player) layer I'm curious about the best method to go about this, performance-wise. My first thought was to maintain a list of tile Sprites, indexed from an Atlas (which would be my tileset). I'd have one list for ground tiles, and one for upper tiles. Then I could simply maintain 3 Groups (ground, players, upper). With the upper and lower groups utilizing SpriteBatch, would this perform better than Phaser's built-in tilemap system? (since I won't need to maintain 2 canvases for the tile layers, and would only process the tiles I need to render). If there is a better way (ie- using tilemap) then I'd love to hear about it! Link to comment Share on other sites More sharing options...
Croweley Posted April 8, 2015 Author Share Posted April 8, 2015 Perhaps there is a better way to word this. I have 2 questions: 1- Which would perform better - two 1280px x 720px TileMapLayers, or two SpriteBatch groups containing 40px x 40px sprites to fill a 1280px x 720px resolution? 2- If a TileMapLayer has only one visible 40x40 tile in it, is its entire 1280 x 720 canvas rendered (ie- all pixels processed, or just the 40 x 40 tile)? Link to comment Share on other sites More sharing options...
Recommended Posts