Jump to content

Search the Community

Showing results for tags 'dynamic tilemap resize'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hi there! I'm trying to create an indefinite 1-way sidescroller game with a randomly generated World. For this conveniently to work I have prefactored blueprint-Tilemaps with the Tiled-Editor, which I want to glue together whenever the player moves into an unloaded area. I've already achieved to create a big level before it starts by appending layers (layers[0].data-array) together, but this is performance-heavy and does not work well on slow devices. In this context I've decided start with a small pregenerated map, which gets changed while the player is running through the level from left to right. I want to unload chunks of the map when the players leaves them and stick a new blueprint in front before the player reaches the right side, so you think the level is Indefinite. Phase 1: Create a tilemap from a few blueprints stitched together (works) Phase 2: Start the level: the player runs on the map from left right until the level end is near. (works) Phase 3: Randomly pick a prefactored blueprint and stick it on the right side of the map and update the size of it (does not work for me dynamically) Phase 4: Unload/remove left part of the map, which the player has left (have not tried yet) So my question for you: How can I update a tilemap after changing its size so it gets rendered/loaded correctly? Especially changing the world size/borders, as I cannot find a Phaser example for this use case. What I have tried so far: A ) Using the same method from Phase 1: I'm combining Tilemap.layers[0].data from the different blueprints and update layers[0].width and layers[0].height) B ) Adding Layers to the Tilemap.layers Array and offsetting layers[1].x by layers[0].width. A and B do not render the updated tilemap, sadly, even when using .resizeWorld() after the change. Thank you for reading this far and maybe leaving a helpful reply. =)
×
×
  • Create New...