Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Mine3D: A Web 3D Minesweeper Game (egraether.com)
168 points by nkjoep on April 22, 2017 | hide | past | favorite | 56 comments


I would love this even more if a lined or dotted grid remained in the dead space to differentiate the area of each clue.

In fact, a highlight of the 27 cells within the area of a clue on hover would be great as well.

Otherwise, fantastic work.

GitHub Issues (https://github.com/egraether/mine3D/issues)

Feature Requests (https://mine3d.uservoice.com/forums/136434-general)


Thanks for sharing the links to his github, that's very thoughtful.

Now I feel selfish for having the same thoughts as you about the grid and just quitting the game instead of telling OP.


After winning a game it told be about a secret option, ?cubeSpacing=0.5 that might help visually.


Shameless plug time!

Someone says "minesweeper", I post my implementation. It's an established ritual.

Here go: http://www.ronilan.com/bugsweeper/

Few notes:

1. This is dated January 2014. It is a job interview homework.

2. The HN community has detected a bug and indicated that it should be fixed. That was done March 2017.

3. There are currently no known bugs.

4. The goal of the game is to find the unknowns.

5. No puns intended.

6. Code: http://www.ronilan.com/bugsweeper/js/bugsweeper.js


The best minesweeper implementation is Simon Tatham's, because it guarantees a board that can be solved without guessing.

http://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/mines...

That guarantee allows for playing with high mine counts, which would ordinarily be impossible way too often. The high mine count boards sometimes contain interesting deductions.


Additionally, the board is generated on first click guaranteeing empty space where you click.


How does he guarentee it?


The source code (mines.c) is here:

https://git.tartarus.org/?p=simon/puzzles.git;a=blob;f=mines...

There is code for solving a grid using deductions in this section:

https://git.tartarus.org/?p=simon/puzzles.git;a=blob;f=mines...

And below that is the code that generates grids and checks that they are solvable without taking risks.

A similar approach is used to analyse the difficulty of Sudoku games here:

http://hodoku.sourceforge.net/en/index.php

with different names for the different types of deduction.


Thank you so much! This helps so much.


Normally you'd do that by quickly reshuffling the mines if you guess wrong, although he might've gone the route of checking if it's possible to get into a guess-only state during generation and regenerating the board until no such states exist.


This rendition of the game is amazingly satisfying. Thanks!


Ditto -- but in the process of making my minesweeper implementation, I got a little sidetracked and ended up making it Conway's Game of Life (sadly with no input, just random seeds/observe):

http://game-of-life-manfrin.herokuapp.com/


At this point, you should probably write a bot to post these comments for you!


I spend hours every day refreshing HN looking for the keyword to appear (and secretly, I must admit, also hoping for the next episode In the "PG vs. Seahawks OL" show).

If we start having bots do refreshing and posting for us, then bot will not only be taking our jobs, they'll be taking our hobbies!!

Can't allow that!!!1



I tried it with Firefox and the buttons don't work. No idea why.


This is awesome! I was a pretty serious (classic) minesweeper player and was even ranked pretty highly internationally. Curious: did other people have their intuition translate "incorrectly" at first? I kept on blowing up cells because I hadn't yet fully internalized the changes that occur in 3D (I know the rules are the same, but the "pattern recognition rules" are not quite the same.) It was really interesting having to step back and rework out the implications of things in 3D. In some vague sense I feel like this is a bit like how some mathematical theorems hold in certain number of dimensions but not others (e.g. random walks). Cool game!


Yes, at first I couldn't even beat easy mode because the "obvious" places were unexpectedly mined. Each cell has way more neighbors in 3d, so it becomes hard to use the techniques from classic minesweeper.


I consider myself like an advanced-intermediate player, though my clicking dexterity is not what it once was. Care to share some of your record times? :)


It's been a while, but I think my best time on expert was 63s.


For interesting variants of minesweeper, I like one one the hyperbolic plane ("minefield", one zones in HyperRogue: http://www.roguetemple.com/z/hyper/gallery.php).


This is a cool concept. The one problem that I had, is that it is difficult to tell which cubes the numbers are paired with. I think that it would be more intuitive if the numbers were printed/etched into each face of the cubes (like dice, but with normal numbers).


Unplayable without the standard left+right-button combination:

http://www.minesweeper.info/archive/MinesweeperStrategy/mine...


The ability to mark cubes as "maybe mines" (I think double-right-click in the original) would also be excellent.


Haha Awesome!

Reminds me of a 3D 2048 game I made some years back.

https://kshitij-banerjee.github.io/Cubiks-2048/

Check the dismember view I provided (space bar). That open up the cube to give a better spatial understanding of the board.

That is the problem with 3D games, I realized. Trying to visualize is a pain to most people and deviates them from the game. This was my attempt at solving that.

I think in your case, hovering over a cell and highlighting its adjacent numbers might help create better visual understanding of the state.


>Trying to visualize is a pain to most people and deviates them from the game.

But it's a built-in skill of everyone over the age of a few months old!

Isn't the real problem the inability of 3D interfaces to, ahem, interface, with an innate skill 100% of sighted users have? In other words I think the interfaces are wrong, not the users.


I don't think that's the problem. I think the problem is that "3D" versions have us effectively trying to manipulate the internal 3D state of a box - that's something we're terrible at - we usually interact with 3D objects in a sparse state.


>we usually interact with 3D objects in a sparse state.

I don't know that I can agree with this. There's nothing hard about spearing a meatball with your fork, and some spaghetti, even if it's dense 3D space... So it's not about visualization, more about UX/interaction or interface...


That's cool. I had the same idea (3d minesweeper with semi-transparent blocks) about 10 years ago, but never came around to actually realize it. Great to see how the gameplay is like.

One possible improvement: Add some keyboard mappings for map rotation. E.g. something like WSAD to rotate the cube and QE,RF to strafe vertically and horizontally. I guess it would need some experimentation to figure out what makes sense.


This is fun!

Assuming the developer is listening... I think I ran into a bug related to resizing the window after starting the game. Clicking selected other blocks than I desired.

Also, I'd like to +1 the request to have a grid remain at least on the numbered cells. A partial transparency of numbered cells might be neat because you could see depth better from overlap of cells.


I kept finding it wanted to clip the right hand edge of the puzzle off the right hand side of the browser window. I tend to use square browsers --- am I weird?

And left-dragging to pan wasn't an entirely happy experience; partly because it kept selecting bits of the HTML on the left, and partly because I felt there was something slightly strange about the way rotation worked. Is it traditional arcball or something else?

...but in general I thought it worked really well. I played sweep mode, and liked it a great deal (I did get an unfair puzzle, but guessed correctly and won it. On, um, easy mode).

Update: has something just changed? I can't delete mines in sweep mode any more --- they just blow up instead.


Great job! Really enjoyed playing it. The controls are a bit tough... maybe because i'm using a trackpad on a mac.


What is the stack used?I`d love to read a blog about the making of.


It's hand written WebGL. You can find it on GitHub: https://github.com/egraether/mine3D


This is surprisingly addictive. I'm loving the "bonus" links it sends when you complete a puzzle (although I did get one with near transparent blocks that was murder to attempt).

Example: http://egraether.com/mine3d/?grid=30,16,1,99

Currently only at a 20% win rate, which is frustrating.


Should it work on mobile? How do I rotate the cube? Awesome idea btw!


Wow. Very nice job. Very intuitive. However, you should move the cube into the center of the screen, since that is the center of the players focus.


This would probably be better if each cube had only 6 neighbors because the way it is the areas are pretty large and it gets quite difficult.


I don't think "Space = new game" was a good keyboard control choice. Accidentally lost my game halfway through :/


Note: Should have 2012 in the title


My eset security blocked this url.


cool but, I wish the entire cube scaled to fit inside the window instead of being clipped.


Pretty good game, nice work.


One of those things that are possible but still shouldn't be done.


As a game I agree that it ultimately doesn't work quite as well as the original minesweeper, but I definitely am glad it was made. It's awesome! Visually the cascading effect of boxes being revealed is done so well and it's fun to see familiar patterns from the 2D version show up here -- I'm sure there are many new patterns in this 3d version that I haven't found yet.

Without giving it any thought really, I wonder what modifications (if any) needed to be made to the flood fill algorithm in this version.

https://en.wikipedia.org/wiki/Flood_fill


Sometimes it's more about the challenge really. It started as an university assignment. Later I ported it to WebGL.

The original minesweeper rules don't make for a great game in 3D. I added the "sweep mode", where you can remove mines, to make the game more appealing in 3D


I love this!


Hm, eset smart security is blocking the site for me..


Then don't use eset "smart" security?


Corporate policy for all work laptops...


I think mine is better




Yours displays in a subwindow that's too small for it and has scrollbars. You can click and drag to rotate the cube, but for some reason it doesn't start rotating until after you release the button, which makes rotation very difficult to judge. I spotted a mine, clicked on a "1" next to the mine, and it exploded. If you're not using standard Minesweeper controls, that needs to be clearer. Also, Kongregate made me watch a 30-second ad first.


Sorry for that.

There are many bugs and bad things in the game I did not fix, because I have no time to do. I have to work and find work to make a living.

Maybe the word I say is not clearly, What I mean is I think my game's mechanic/idea is better.

Certainly, http://egraether.com/mine3d/ this is more stable, more beautiful ui, and more light weight.


Yours is not better because it takes too much work to figure out how to even get to the game.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: