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

Get help using Construct 2

Post » Mon Sep 28, 2015 9:43 pm

[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-
Last edited by DurandalCorp on Thu Oct 01, 2015 2:10 am, edited 1 time in total.
B
5
S
1
Posts: 23
Reputation: 426

Post » Mon Sep 28, 2015 11:09 pm

DurandalCorp wrote: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...
Image
B
64
S
23
G
7
Posts: 1,481
Reputation: 10,823

Post » Thu Oct 01, 2015 2:10 am

Thanks so much. It worked.
B
5
S
1
Posts: 23
Reputation: 426


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests