Map zones

Get help using Construct 2

Post » Wed Apr 30, 2014 8:46 am

Hi,

I would like share my thoughts about how handle this. The game idea is like a Risk game.

Q1
I have a map with many regions.
What is best? Each region one sprite or the whole map as background and on top transparents sprites for each zone?

Q2
The user touch one region and I need select the destination regions from the touched region.
The destinations should be selected in function of the action points (AP) that the player left available.

For this I think this approach.

1. Create an array for each region where the values are the posibles destination regions.
For the posibles destinations I need store the AP that must be required to enter into and subtract from the player AP.

2. Only highlighted regions can be touched, so I think put a variable that is put to true or false to examine if is posible touch it.

3. If the movement is posible move the player chip.

How is best to create the arrays? for each sprite? or globally? I guess that is better globally to share positions but then I have the doubt about how identify each sprite ID when the player touch it.

Thoughts?

Salut,
Josep M
B
18
S
2
G
2
Posts: 64
Reputation: 1,220

Post » Wed Apr 30, 2014 10:16 am

JosepM wrote:Hi,

I would like share my thoughts about how handle this. The game idea is like a Risk game.

Q1
I have a map with many regions.
What is best? Each region one sprite or the whole map as background and on top transparents sprites for each zone?

Q2
The user touch one region and I need select the destination regions from the touched region.
The destinations should be selected in function of the action points (AP) that the player left available.

For this I think this approach.

1. Create an array for each region where the values are the posibles destination regions.
For the posibles destinations I need store the AP that must be required to enter into and subtract from the player AP.

2. Only highlighted regions can be touched, so I think put a variable that is put to true or false to examine if is posible touch it.

3. If the movement is posible move the player chip.

How is best to create the arrays? for each sprite? or globally? I guess that is better globally to share positions but then I have the doubt about how identify each sprite ID when the player touch it.

Thoughts?

Salut,
Josep M

frist..i don't suggest to use arrays,you may try Dictionary or just add new value on every region(suggest this)
You said your game's region will have Different(Can touch/Can't touch)..so"Each region one sprite "
B
17
S
7
Posts: 360
Reputation: 2,202

Post » Wed Apr 30, 2014 1:37 pm

Ok. How I add a dictionary for each sprite. I read the documentation and not see that. I guess is a global variable.
Can I add an array into the dictionary?
B
18
S
2
G
2
Posts: 64
Reputation: 1,220


Return to How do I....?

Who is online

Users browsing this forum: Armench, Jackriduk, kiki4construct and 25 guests