help me finding adjacent square's values

Get help using Construct 2

Post » Fri Jul 27, 2012 7:03 pm

Hi all,

I might be trying this game in a dumb way.I am not using Arrays as I didn't find it comfortable enough to though I understand Arrays.

Please see this game ...and help me calculate the values in the adjacent squares of the matrices.



B
6
Posts: 30
Reputation: 585

Post » Fri Jul 27, 2012 7:03 pm

how do i calculate the values of the adjacent matrices ???

without the use of arrays....

if my method is totally flawed ..tell me an alternative

thanks
B
6
Posts: 30
Reputation: 585

Post » Fri Jul 27, 2012 8:13 pm

@pinastro
Surely arrays are the way to go? Representing a 2D matrix as a 2D array is the natural implementation. Any alternative representation would end up looking like an array anyway. So why would you not want to use arrays?Velojet2012-07-27 20:54:44
B
105
S
20
G
12
Posts: 549
Reputation: 20,320

Post » Fri Jul 27, 2012 8:19 pm

Argh, @Tom! This thing ate my post again!

*grumble* Now, what was I saying... ah, yes.

@pinastro:

Without arrays, it would be difficult. You could create additional invisible sprites with collision mask that matches adjacent areas. Just get picked squares' values and do the math with them.

However, I wouldn't recommend this if you plan to do the maths like this every tick. Go with array in that case.Mipey2012-07-27 20:19:37
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155


Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 15 guests