[Fixed] Fill the Holes Gradually !

Get help using Construct 2

Post » Sat Dec 29, 2012 10:23 pm

Hey Guys ! Guess What ... Another Array Issue ! Yay ... I'm so happy , I'm going to launch myself from the windows !

This one is more detailled , I want to gradually fill the holes that are inclused by 3 or more blocks ... Screenie !




Capxie ! ( Okay ... Doesn't work :( ) !

Thanks for all !
Whiteclaws2012-12-31 16:37:02
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Dec 29, 2012 11:45 pm

Bump it , Bump it , Bump it !
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sun Dec 30, 2012 1:45 pm

Come on , People ! Is this too hard ?
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sun Dec 30, 2012 2:03 pm

Alright, say you go over all the xy elements (for each xy element), and check what the value was (current value), and suppose we say if that value was one then there should be a wall there.... easy right?

Now what if you do compare at xy, and compare what the value was for the next xy, or cell? Say for example current x +1, and current y.
What cell would that be?
What would current x, and current y+1 be?
Current x-1, and current y?
Current x, and current y-1?

Wouldn't that essentially check all 4 cells around the current cell?
And say what if one of those cells returned the value of zero instead of 1.
Would that give you any ideas as far as what to do?
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sun Dec 30, 2012 2:05 pm

@newt , I did indeed think of that a while ago !
The only thing that I can't do is to implement it to C2 , I'm new to arrays and I did my best , but I simply can't do it ...
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sun Dec 30, 2012 2:13 pm

Well first of all, you have to define what you really want to do.

Like define a hole first.
What is a hole?
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sun Dec 30, 2012 2:27 pm

Hole | an opening through something; gap; aperture: a hole in the roof; a hole in my sock.

[Quote] the holes that are inclused by 3 or more blocks [/Quote]

@Newt , Now , what do I do ?Whiteclaws2012-12-30 14:27:59
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sun Dec 30, 2012 2:40 pm

Don't get snippy, besides I think the word you are looking for is enclosed,or included not inclused.

A hole would be defined as a current value of zero, and current x+1, current y with a value of 1, and current x, current y-1 with a value of 1, and current x-1, current y with a value of 1, and current x, currenty-1 with a value of 1.

That's my definition of a hole with all 4 side with a wall.

You want that definition and what other definitions?newt2012-12-30 14:45:17
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sun Dec 30, 2012 2:42 pm

If you want ... I made an algorithm that I can't get going on C2

For Each Elements (X,Y)
- Compare : CurrValue < 8.25
-- ( I'm stuck after dat >.< )

I could make another array and do that all round but I don't know how to do it efficiently ...Whiteclaws2012-12-30 14:43:45
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sun Dec 30, 2012 2:44 pm

The definition that I would prefer is enclosed by 3 or more walls
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Next

Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 23 guests