ol-web Posted July 3, 2018 Share Posted July 3, 2018 Let's say I make a game in Phaser that: contains just a single scene on that scene there is a giant tilemap loaded with collisions set with ,setCollisionBetween() or similiar there are multiple sprites scattered all across the map, they collide with the player How does Phaser handle the tilemap, the sprites and collision in this case? Does it update the entire tilemap wherever the player is or only the chunk that is currently within the camera bounds? Does it check collisions with tiles and sprites that are only within the camera bounds or everywhere on the map despite the player not even being there? Is everything built for me internally or do I have to implement my own tile,sprite and collision loading to not waste performance? Rissk13 1 Link to comment Share on other sites More sharing options...
samme Posted July 3, 2018 Share Posted July 3, 2018 The map is drawn only within the camera's view. Tile collisions are checked only on tiles adjacent to the sprite (whether in camera or not). ol-web 1 Link to comment Share on other sites More sharing options...
ol-web Posted July 5, 2018 Author Share Posted July 5, 2018 On 7/3/2018 at 6:38 PM, samme said: The map is drawn only within the camera's view. Tile collisions are checked only on tiles adjacent to the sprite (whether in camera or not). oh, that's lovely! so I can make a huge map then. what about sprites scattered all around the map? are they rendered and collision-checked only in camera view too or is better for performance to handle myself? Link to comment Share on other sites More sharing options...
Recommended Posts