mine sweep TRUE 3D

The place to discuss MineSweeper3D.
rainman002
Posts: 11
Joined: Mon Feb 04, 2008 9:18 pm

mine sweep TRUE 3D

Post by rainman002 » Mon Feb 04, 2008 9:26 pm

No offense to this really neat game, but the tiling is still technically 2d just mapped on a 3d object. I am a java programmer myself and I am curious what everyone thinks of the idea af making a minesweeper where the "tiles" are really cubes conected like an NaCl crystal of something. Then I could have several different crystal patterns and stuff. The view would be like from a tiny camera flying through it. The cubes/tiles would not be touching but bordering ones will have lines to show connection.

User avatar
robertw
Site Admin
Posts: 676
Joined: Thu Jan 10, 2008 6:47 am
Location: Melbourne, Australia
Contact:

Re: mine sweep TRUE 3D

Post by robertw » Tue Feb 05, 2008 6:17 am

Yes, it's 2D tiles wrapped around 3D shapes. When I had the idea I did a search and found quite a few true 3D versions out there, but none like the one I wanted to make. I tried some of the ones with true 3D tiles, but just found them too confusing and difficult to play. A cube has 26 neighbouring cubes for example!

I like your idea of a crystal-like structure though. The ones I've seen use tightly-packed 3D tiles, and transparency so you can see what's going on, but they are still a challenge to visualise. The crystal structure might be clearer, and allow for less than 26 neighbours by only looking across rods between tiles. Flying through the structure might still make it difficult to get a grasp on where you are etc.

On the other hand, I had an idea where you are inside a 3D shape, with 2D tiles. You could fly down corridors etc, clicking on the tiles on the walls. That might be cool, and maybe I'll get around to it someday. But flying around inside a completely open 3D structure might be more disorienting.

Good luck. If you decide not to go ahead with it, but would still like to see it made someday, let me know and I might be interested in doing something like it myself.

Rob.

rainman002
Posts: 11
Joined: Mon Feb 04, 2008 9:18 pm

few changes + details

Post by rainman002 » Tue Feb 05, 2008 10:38 pm

I did find one screenshot of a tight cube model and there was too much overlap to make sense. I decided to go with spheres as tiles instead of cubes so a tetrahedral crystal would still fit ok (the lines coming out of a cube would be at wierd angles) The style would be like a ball-and-stick model, I'm still deciding whether to use 1 pixel thin lines or thick ones. I'm also thinking of doing it as a free to use applet embeded in a web-page (with class obfuscation for security). Numbers will probably just be right on top of the spheres. Spheres are also much more efficient to draw than cubes due to always circular shape and predictable shading. There are so many crystal patterns that could be used too, to make more variety than cubic. I think my control system should help remedy disorientation...we'll see, This is going to take a good few days/weeks to get a base.

rainman002
Posts: 11
Joined: Mon Feb 04, 2008 9:18 pm

early functional version

Post by rainman002 » Thu Feb 07, 2008 12:16 pm

http://www.duke.edu/~kef14/Games/MineSweeper3D.htm
ok, it isn't user friendly yet...
use left mouse drag to navigate on one plane.
right mouse doesn't work all that well.
hold left+right and drag to go up-down left-right ---(when you got to push left and right mouse, I think you hace to do it at slightly different times, ex. hold left then hold right then drag)
left click on circles to activate.
right click to flag
game reset when mine is hit
~20% are mines.
when critiquing keep out the obvious stuff please.
this will be much better soon.

User avatar
robertw
Site Admin
Posts: 676
Joined: Thu Jan 10, 2008 6:47 am
Location: Melbourne, Australia
Contact:

Post by robertw » Thu Feb 07, 2008 3:28 pm

Hey, you got that up and running pretty quick.

I like how the spheres and rods disappear altogether when the sphere has no neighbouring mines. I think I've seen that in other tight-packed cube-tile games, but some reason hadn't thought of it for the ball-and-rod concept.

Most comments I can think of are obvious, like sometimes you click a mine the first time etc.

Does it tell you when you win? I think I finished a level but it acted like I was still playing.

Only other thought is that I'm not sure how I feel about advertising of other minesweeper clones on this forum. I put together this site and forum and pay for its hosting in order to promote my own game, and the forum is for discussing MineSweeper3D. Not that your version is any great threat, at least for the moment :wink:, but it makes me realise that I probably need some sort of policy on the matter in case others come to advertise their own clones on my site. Maybe I'll just wait and see :)

Rob.

User avatar
robertw
Site Admin
Posts: 676
Joined: Thu Jan 10, 2008 6:47 am
Location: Melbourne, Australia
Contact:

Post by robertw » Thu Feb 14, 2008 4:01 pm

robertw wrote:Does it tell you when you win?
Ah, it does now. Just had another look. I find it hard to navigate, but otherwise it seems to work OK. Are you planning to do much more to it?

Rob.

rainman002
Posts: 11
Joined: Mon Feb 04, 2008 9:18 pm

are you the 4d programming guy?

Post by rainman002 » Fri Feb 29, 2008 10:57 pm

I saw that 4d program on this website and I hope you are the same guy. If you are I hope you can help.
The mine sweeper 3D is probably near as good as I will make it.
I just now started to make a 4D Mine Sweeper (same style) and boy is it going to be an adventure. From what I understand the way to eliminate a dimension is to line it up with the view vector then just remove it leaving the other dimensions and scaling the other dimensions depending of what the deleted one was. I don't think that made sense... exemaple: for 3D, the points are rotated and such so the cooditantes are relative to the z dimension exactly the same as they were relative cameras line of sight. then x and y are scaled by a factor of k/z and the point returned is x,y

so... if I can figure out how to rotate the 4D point from its position relative to the line of sight to the position relative to the 4th dimension axis then I will be able to scale stuff pretty easy and dub to 3D then to 2D.

The point... how would I rotate a point in 4 dimensions, or more specific, find the angles for the first question between point a and point (0,0,0,1)

rainman002
Posts: 11
Joined: Mon Feb 04, 2008 9:18 pm

New idea

Post by rainman002 » Thu Mar 06, 2008 2:53 am

Ok, no rotations. I tested this solution in 3d and it worked. The "Camera" object has vectors for its own axes.
Vector "a" is the vector of the line of sight of the camera
"b" is the vector coming out of the top of the camera
"c" is the vactor coming out of the right side of the camera
for point p (camera at origin) the relative position to the camera is:
x = p (dot) "c"
y = p (dot) "b"
z = p (dot) "a"
this works no matter which way the camera is looking
4D is the same same thing with another vector on the camera.
oh, I figured out 4d cross products. I don't know what it is called because I could not find it online.

User avatar
robertw
Site Admin
Posts: 676
Joined: Thu Jan 10, 2008 6:47 am
Location: Melbourne, Australia
Contact:

Post by robertw » Thu Mar 06, 2008 3:27 am

Hey, sorry I didn't get around to replying earlier. Sounds like you're on the right track though. 4D cross product takes 3 vectors as input to produce a 4th. You need to search around the net for info on 4D transforms, although some of it's still hard to follow.

Remember, in 4D rotation is about a plane rather than a line :D It's actually easier to think of it as occurring within a plane, which is the same from 2D up.

After you brought up the idea of true 3D minesweeper, I'd been thinking about 4D. It would be like my MineSweeper3D but instead of 2D tiles on a 3D surface, it would be 3D tiles on a 4D surface. Now TRUE 4D minesweeper would be a real mess!!

Rob.

rainman002
Posts: 11
Joined: Mon Feb 04, 2008 9:18 pm

I think I got it.

Post by rainman002 » Sun Mar 09, 2008 4:38 pm

here is the link: http://www.duke.edu/~kef14/Games/MineSweeper4D.htm
I figured out the cross product thing using the determinate of a 4x4 matrix. I actually tried to figure it out myself by using the pattern of the 3d one and the only mistake I made was that the y and "w" returned the opposite (-/+) of what they should have. It looks soo cool when rotating in the 4th dimension. Also, what you were saying about rotating about a plane vs a line... I managed to avoid it completely using vectors for everything. In 2d, 3d and 4d, it rotates ON a plane regardless of what it rotates around. Heres my 2d example, imaging a face in 2d pointing/facing to the right and the top of the head facing up. I know the exact vector for which direction the top of the head is pointing as well as which way the face is facing. To rotate the head, the "look" vector is scaled down and added to the "up" vector and the "up" is scaled and subtracted from the "look" vector. Then the new "up" and "look" vectors are rescaled to unit vector and the head is now slightly rotated clockwise. This can be done in 3d with either the look/right vectors or the look/up vectors and then there is 3 planes to use in 4d. There are really 3 total in 3d and 12 in 4d but I only use the ones that affect which way it(the viewpoint) is looking. This should help a little bit.
Image
The advantage of this is utter efficiency and ease because the entire program contains absolutely no trig.

One of my friends wants me to do a 5d one but I'm not sure that will work out. If you have ever seen the 4d rubiks cube it is sort of "all there" but if you have seen the 5d one there is just a cloud of cubes. (look it up if you haven't)

User avatar
robertw
Site Admin
Posts: 676
Joined: Thu Jan 10, 2008 6:47 am
Location: Melbourne, Australia
Contact:

Post by robertw » Sun Mar 09, 2008 4:53 pm

Well done, although pretty confusing :wink:

Can I suggest you don't call them by the same name as my program? Currently you're calling the 3D one MineSweeper 3D. Well, it's the same except you've got an extra space in it :lol: If I ever did do a 4D one, obviously it would be called MineSweeper4D too.

Interesting idea to avoid trig.

Thanks,
Rob.

rainman002
Posts: 11
Joined: Mon Feb 04, 2008 9:18 pm

ok...

Post by rainman002 » Sun Mar 09, 2008 9:22 pm

They are now called 3D/4D Grid Minesweeper. Minesweeper3D was the most obvious name for it so thats why I originally used it. I also can not seem to find a way to make it hard with out being a guessing game so I will probably add a timer to it and make it a "think fast" game.

4D polyhedra are far beyond my current understanding but I'd be quite interested to see minesweeper in it. The only 4D shape I can imagine is the hyper cube and in that, when it is projected to 3d, has some cubes inside others. That is why my "tiles" were 0 dimensional (points) so that way none are inside others. If you understand how this could be done please explain, my head hurts.

rainman002
Posts: 11
Joined: Mon Feb 04, 2008 9:18 pm

2d tiles?

Post by rainman002 » Wed Mar 12, 2008 2:43 pm

You could do 2d tiles in 4d. The graphics would be tricky as to make it possible to tell which side a number is talking about. Perhaps slightly translucent tiles with numbers that stretch/skew to match the perspective shape and are watermarked across the entire size of the tile. That would be an interesting game. Oh, as for clicking on tiles, I'm not sure how you would do that, but the one that the cursor would pick should highlight as a mouse over to clue the user of what they are doing. Tell me if you want to try to make it.

I think I might try to do this in 3d first (like everything) and see If it is a sound concept. If the entire cube lattice were filled with intersecting planes each tile would border up to 12 other 4 share a side coplanarly 4 perpendicular above and 4 below.
Image
it's in two parts so you can see what is going on.
to simplify things, some might be removed, but not the perpendicular ones because then there would be many separate "normal" minesweeper boards. It may be possible to ignore the copanar borders or it can just stay bordering 12... we'll see. This seems a little like yours but this would be like many tessalating versions of the cube from yours(Minesweeper3D).

rainman002
Posts: 11
Joined: Mon Feb 04, 2008 9:18 pm

sorry so late

Post by rainman002 » Sat Mar 15, 2008 12:20 am

I finished this on wednesday but I was lazy and just now put it online.
http://www.duke.edu/~kef14/Games/MineSweeper3DTile.htm
It is a beast of a puzzle, and is quite difficult. a 4d thing like this would be sweet. I look forward to getting time to do that.

User avatar
Alex Doskey
Posts: 16
Joined: Sun Jan 13, 2008 8:10 am
Location: Marrero, Louisiana, USA
Contact:

Post by Alex Doskey » Mon Mar 17, 2008 4:09 pm

Another possibility for true 3D minefields would be to do various space filling lattices. To start with, you can do the more interesting ones from the 28 uniform ones:
http://polyhedra.doskey.com/UniformHoneycombs.html
This would give you varying numbers of neighbors for each cell.

Post Reply