making men's morris game

Get help using Construct 2

Post » Mon Oct 07, 2013 11:01 am

Hi. I want to make a men's morris game that includes 3 men's morris,9 men's morris and 12 men's morris.
Actually, I have a lot problem with it.

http://davvas.com/kbzb8o5u4yvm

I want to know how can I move my men in 3 part:
1. create men and placing pieces: The game begins with an empty board. If a player is able to place three of his pieces in a straight line, vertically or horizontally, he has formed a mill and may remove one of his opponent's pieces from the board and the game.
Also you have just 3(for 3 men's morris), 9(for 9 men's morris)and 12(for 12 men's morris)that should at first place them all.
2. moving pieces: after placing all men ,then should move the men just in one step to left or right or up or down.
3. Fly: When a player is reduced to three pieces, there is no longer a limitation of moving to only adjacent points: The player's men may "fly", "hop", or "jump" from any point to any vacant point.

Do you think I need array?
For AI what should I do?

If just answer one of them I'll grateful to you, and try to do rest of them.
      
B
6
S
4
G
1
Posts: 5
Reputation: 1,140

Post » Mon Oct 07, 2013 11:36 am

I'd rather you'd share your capx in another way, because I'm not going to install software to be able to download.

Placing the pieces should be no problem. Just use drag and drop.
Use a global variable and set it to 3,9 or 12 to determine how many sprites must be created.
For moving I would create a boolean for selected and if selected set possible locations to move to visible.

AI will be your biggest problem as is usually the case in strategic games. You will have to create events to make the computer choose the best move in the given situation.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Oct 07, 2013 11:51 am

what way is good? idk another way, could you tell me a way? tnx

yes I don't have problem with first part, actually Idk how make AI because I'm new at C2. and I think this game is a little heavy for a person like me, but I don't have another choice.
B
6
S
4
G
1
Posts: 5
Reputation: 1,140

Post » Mon Oct 07, 2013 12:02 pm

Sharing through Dropbox is what is most used on these forums.

Making artificial intelligence is hard, very hard.
You have to tell the computer what to do in every situation.
If this move is possible do it, if not see if this is possible, if not try this, etcetera. You will have to decide which moves are preferred. In men's morris it is pretty clear that creating a line of three, or preventing the other player to do so are the best moves if possible.
you should also try to randomize the AI movements a bit to not always play the same.

Why do you not have another choice?   
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Oct 07, 2013 2:06 pm

because this is a homework

ok, I try Dropbox.tnx

I think I should ask my problem one by one.

this is mine at dropbox:
https://www.dropbox.com/s/97fd7a1xc66t1dz/9mm.capx
B
6
S
4
G
1
Posts: 5
Reputation: 1,140


Return to How do I....?

Who is online

Users browsing this forum: varr and 5 guests