Sign in to follow this  
AlexLi

expandable Chunk-based Tilemap

Recommended Posts

Hey everyone,

 

I've been using phaser for a few days now and I really love it! :)

 

Now my question:

How do I put severals Tilemaps together so that they act like a single map?

 

I'd like to have the option of an infinite, self generating map.

My first idea was to have like 20x20Tiles large Tilemaps (chunks) which, when the player reaches the edge of each chunk, call the next chunk so that the player can move seamlessly through the map. And if this chunk doesn't exist yet, an algorithm creates it on the fly. This does also allow me to load the chunks dynamically, so that the players in a multiplayer mode don't have to load the entire map at once. So far, so good.

 

But I didn't find any method in the phaser documentation which allows me to realise this idea. The few forum topics which also concern this idea didn't help either. 

(Neither this one nor this one).

 

Instead of going on and writing my own tile-engine I hope that you might have an idea on how to realise this without reinventing the whole wheel ;)

 

 

Hope you can help me! :)

Thank you in advance!

 

(Sorry for my bad english. If something is unclear please tell me.)

 

best regards,

AlexLi

Share this post


Link to post
Share on other sites

A tilemap is ... a map of tiles. you have the tiles (sprites, textures, etc) and the map (a csv file) if you change the csv or create one and load it when you need you have what you want.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.