Any information on redrawing tilemap in realtime? [SOLVED]

0 favourites
  • 10 posts
From the Asset Store
This is a black tileset with 2 tilemaps, props, one animated character and more.
  • If I have a large tilemap, can I redraw the entire tilemap to form a "new level" rather than loading a new tilemap or a new layout?

  • You can have as many instances of the object as you like.

    You can have as many tilemap objects as you like(in theory).

  • Thanks, but I am aware of that. What I'm trying to figure out is if I have one tilmap with a specific map drawn out, can I change it to a different map? Essentially redrawing the same tilemap? Maybe load it through Json and Arrays?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes, but all instances share the same texture, so you can't change that part.

    On the other hand you can manage them just like every other object using its index, and picking of course.

  • To add the newt's reply, there's the "load" action to load a json. Also there's the Tilemap.TilesJSON to get the json.

  • newt

    Yup, wanting to manage the tilemap using the same textures, just differently drawn out. Thanks!

    R0J0hound

    Yeah, I want to do the "load" action through json or tilemap.tilesJSON, but wanting to know how to do this. Would you happen to know how? Thank you so much for your help!

  • What is there to know?

    You can use project files + ajax or perhaps a dictionary object to store your level data. Project files have the advantage to only being loaded into memory when you need them, while the dictionary would have to be filled immediately.

  • mindfaQ Perhaps I should've posted this in the beginner section as I have no idea how to store in project files + ajax, let alone tilemaps. I'll take a look at some ajax tutorials. Thanks!

    What I am aiming to do once I figure out how to do it:

    1. Store tilemap in project files + ajax

    2. When level is beaten, make a loading screen and load the next sequence of tiles (using the same tilemap) from ajax files.

    My guess:

    I'm guessing I'll have to store the corresponding number of the tilemap into the ajax file and I guess they are ordered 0,1,2,etc...? Then I'll have to store the order of the tile map from left to right, top to bottom. Could be 5,0,0,2,3,etc..., then store them in the ajax file, then recall them using arrays?

  • Here's a super simple example. Use a separate project to have all of your tile maps laid out and get the JSON text from the TextBox. You can then load these strings in your real game on demand.

  • blackhornet Thanks! I also found this that seems to work as well:

    https://c2tutorials.wordpress.com/2014/ ... o-plugins/

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)