How do I make an array map (0s and 1s) with a procedural map

0 favourites
  • 3 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • [SOLVED]

    I can generate rooms randomly and stick them into a tile grid (16px by 16px).

    Now I want to record it into an array using some kind of stepping sprite.

    For example, I spawn a sprite the same size as the tiles I want it to be (16px by 16px), then I check to see if it overlaps a room.

    0 for nothing, 1 for room.

    I move it over by 16px.

    Once it reaches the end, I move the sprite down 16px and repeat the process.

    Can I do some thing like this?

    Project Demo: Generating Rooms

    https:// dl.dropboxusercontent. com/u/103945751/PhysicsProceduralGeneration/index.html

    -Can't post links yet-

  • Now I want to record it into an array using some kind of stepping sprite.

    For example, I spawn a sprite the same size as the tiles I want it to be (16px by 16px), then I check to see if it overlaps a room. ..0 for nothing, 1 for room. ..I move it over by 16px.

    Once it reaches the end, I move the sprite down 16px and repeat the process.

    I think....

    You described something....

    like this:

    Stepping sprite.capx

    ..but of course I could be wrong...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks so much. It worked.

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