How am I meant to handle tile wrapping given that the Tilemap image size doesn't adapt on runtime?

0 favourites
  • 6 posts
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • I've had a lot of problems with not being able to load Tilemap image URI's during runtime, and I've boiled it down to the Tilemap object's image size not adapting to newly-loaded images.

    To be more specific, while other objects types (Sprites, Backgrounds) adapt their image sizes to fit whatever image that is loaded in during runtime, the Tilemap object apparently demands that nothing exceeds the original image size.

    My questions are:

    • What happens if i load in an image that is smaller than the original image size? Will I just get a lot of blank tiles until the tile row wraps, or will the image size shrink to fit the new, smaller image?
    • What happens if I decide that I need more tile space, and increase the original image size to allow for larger images to be loaded in. Will the tilemap data become messed up, due to the tile row wrapping changing?
    • Is there any way to get around Tilemaps not being able to load in larger images during runtime?

    Thanks in advance.

  • I would say you probably need to take a look at using the json save state, and using it if you need to import stuff besides the texture.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would say you probably need to take a look at using the json save state, and using it if you need to import stuff besides the texture.

    Not sure I'm following. How do you mean?

  • You would essentially create a third party editor when you set the state of the tilemap, use the Browser plug to download the json either Tilemap.TilesJSON, or Tilemap.AsJSON I'm not sure, then import that file into project files for use with Ajax during runtime when you set the texture.

    The json should have all the data you need to completely change an existing tilemap, aside from the image data.

  • You would essentially create a third party editor when you set the state of the tilemap, use the Browser plug to download the json either Tilemap.TilesJSON, or Tilemap.AsJSON I'm not sure, then import that file into project files for use with Ajax during runtime when you set the texture.

    The json should have all the data you need to completely change an existing tilemap, aside from the image data.

    Yeah but I'm not asking how to change the Tilemap image data. I'm asking various questions related to the image size not changing when changing the Tilemap image.

  • Tilemap image data is the tilemap image.

    You have to change the json if you change the texture size.

    That's all there is to it.

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