Jump to content

[WIP] MineSweeper


NLMR
 Share

Recommended Posts

Hi, everyone!

 

For my first game, I chose to try and recreate the popular windows game MineSweeper.

 

To appeal to the growing population of softcore players, I added an optional "Noob" mode which grants hints (1 hint at the start, 1 more every 10 correctly placed flag) that let you "check" for bombs.

 

Nothing difficult or fancy, here, just wanted a functionnal game. The whole thing has got about 300 lines of code (comments and HTML included).

 

Let me know what you think, what I could improve (in terms of code or gameplay). If you know some other such classic and/or under-appreciated 2D game that would be interesting to try and adapt in HTML5, I'm looking for challenges to further my experience!

 

Cheers,

 

NLMR

Link to comment
Share on other sites

Thanks for your feedback, BdR!

 

It took me some rework to make it possible, but I've got a(n almost untested) version of it with the flood-reveal feature up and running. I also added the classic color coding for the numbers of adjacent mines.

 

http://nlmr.nolimithost.ga/minesweep_v14.html

 

I will have to go back to it and clean the code according to those changes, but that'll be for next week. I'll try and test this version for bugs over the week-end.

 

'Til next time,

 

NLMR

Link to comment
Share on other sites

Alright for the 1.5 version, I wanted to play with the absolute size of the board and it's components.

http://nlmr.nolimithost.ga/minesweep_v15.html

 

Basically the added dropdown menu gives a factor which is then passed to set the width and height of everything accordingly. It works ok, but I seem to have encountered a puzzling behaviour.
The default size is small (factor : 1). If I change it to medium (1.5) and log the stage.width attribute, it goes from 400 to 600 as expected. Changing it to large (2) gives a correct width of 800. Again, going back to medium from large resize everything correctly. But if I try to go back to small (either from large or medium) then the stage doesn't resize and the board is drawn on the top left of a stage too big.

I've just spent the best part of the last hour trying to figure out the problem with little success. I would greatly appreciate any help from you guys.

NLMR

 

[EDIT : Solved]

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...