Minesweeper

Get help using Construct 2

Post » Sun Feb 16, 2014 11:32 pm

Hello,

I want to create minesweeper, is there any tutorial on how I could do that, or atleast something to begin with.

Thanks guys
B
3
Posts: 4
Reputation: 208

Post » Tue Feb 18, 2014 11:40 pm

Hello again, any help will be much appreciated
B
3
Posts: 4
Reputation: 208

Post » Wed Feb 19, 2014 6:52 am

I don't know of a tutorial exactly like that, but parts would be easy and others not so much.   If this is your first run in C2, I recommend looking at a few tutorials to see how the events process and such.

I would set up an Array to be the size of the minesweep grid. You would have to either manually enter the 0s, 1s, 2s ect OR write an event to proceduraly generate the numbers. (That might be hard...) Then draw a grid of sprites (or learn about the tilemap object and use it) on the screen. Add the Mouse object so you can set up something like
ON CLICK MOUSE_>
- If over gridtile->
    - {use variables or something to find the location in the array} and compare those variable to the array value
        - Change the sprite and any nearby sprites according to the array values (there is a lot to this procedure...)

I dont have the time to put a template together, but it would be a neat little setup if you can get someone to get it started for you...


B
193
S
6
G
7
Posts: 213
Reputation: 10,203

Post » Wed Feb 19, 2014 7:59 am

@Hitch,

check the arcade. someone just posted an excellent minesweeper game there this week. maybe they will help you.
B
81
S
32
G
23
Posts: 1,053
Reputation: 35,965

Post » Thu Feb 20, 2014 1:14 am

So, OK... I went ahead and spent a few hours putting together a quick example of how I would do a MineSweeper clone. I call in Ninesweeper... Dont click the 9s. It is real basic, and is not EXACTLY like the mine version, but it might help get the creative juices flowing.

https://app.box.com/s/6liwytg3tct2fhiyxqyk

Instructions...
Right Click [ ] to show a tile.
If you click a 9, the game is over and all the tiles will display.
If you click a 0, all 0's will display.
Right click to mark a [ ] with a [X] so you dont click that tile. (If you think it has a 9...)

Again, there is A LOT that can be improved...
B
193
S
6
G
7
Posts: 213
Reputation: 10,203

Post » Fri Feb 21, 2014 11:27 pm

Dear Zetar, you are a saint, I've been trying for a week now without getting anywhere, and I'll try your copy. Thank alot man, and sorry if I took from your time more than I should.

Harrio, just did thanks.
B
3
Posts: 4
Reputation: 208


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests