haelix

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. I had a few questions about Tilemap's implementation and some general questions about having a player walk around a top-down 2d "overworld" and having enemies hundreds of pixels offscreen that the player would eventually walk near. Question 1: Using Tiled to generate a tilemap, is there a maximum size that you can generate using Phaser.Tilemap? I've read 2048x2048 are limits for some mobile devices for an actual "tilesheet" or images, but is there any max size for the map you can generate in Tiled and use in Phaser? Question 2: Does the Tilemap implementation render tiles only in the viewport or maybe a tile or two "offscreen" as a buffer? It doesn't render the entire map and layers? Are offscreen tiles receiving update events (ex: if a tile had its own water animation) or are only the in-viewport tiles receiving update calls? Question 3: Assuming my "Enemy" class on update just walks back and forth until it "spots" the Player, when initializing the tilemap, should I be creating/adding my Enemy classes and placing them way offscreen outside the viewport at initialization and they wont take update/moving/rendering until they're in the viewport? Or should I be listening to viewport xy changes and "spawn" enemies as they walk into the viewport? While the player is moving, are the Enemies actually moving around or do they not start getting those update events until they're inside the viewport? Basically, do Sprites added to a tilemap layer but off screen exist and are able to do things or do they have to be in the viewport for the tilemap to update them? I've found several examples of how to build Tilemap levels platforming and such, but when it's used in this context with other actors existing as children of a tilemap layer, I haven't found much. Anyone know of any good examples of this? Thanks!