Digging game.

I have wanted to make a mining game for years now but never got to it. But now that I see how popular a digging game called minecraft got I want to make a mining game again.

Does anyone have a good method of simulating mining? I was thinking Terrain objects that got the height decreased when “mined” but this wouldn’t allow tunneling. :frowning:

Notch wrote his Minecraft system in a very simple way. Only faces with no neighbors will actually render faces, and faces are sorted into six different lists. These lists sort faces into up, down, north, south, east, and west, and only the faces facing toward the player’s view angles will actually render. This is a really clever way of dropping the polycount.

Essentially, he is storing tile types in an array, and generating meshes based on those faces that are exposed.

Notch previously worked on a project called Wurm Online, and developed a mining engine (the game had a modifiable heightmap, like you described), and the way that they managed holes in the terrain, was simply, to not render triangles over mine entrances. When the player collided with these triangles, he would fall through them, and change scenes to the underground scene, which used square blocks to represent mined out segments. This was a one-dimensional array which stored if a tile was mined out, and the floor/ceiling height of that underground tile.

Search this forum for “holes in heightmap” to find several rather clever methods of managing this.

I would also suggest some research into a marching cubes algorithm.

I’m working on a side-scroller right now that features terrain modification, and luckily, since orthographic displays make this very simple, I can essentially just pop a tunnel in front of the terrain instead of digging into it. Let’s face it though, this is much more difficult in a 3d implementation, and I doubt many people are going to be willing to help you on this subject…

I’ll try to help you further if you run into problems with an actual implementation, but I can’t promise anything.

The terrain class would not allow tunneling, but if you have a fair understanding of math and the mesh class, it shouldn’t be a problem.
As the X,Z floats of a mesh are basicly the same as a terrain, you should be able to tunnel.

Once your tunnel is near the surface. the surface vectors and the tunnel vectors have to blend in a fasion that makes the illution of an opening. you dont have to connect them or anything.

Note that the terrain mesh and the tunnel mesh should not be the same. a mesh per tunnel as it should be.
So if the player is insane -in the long run, more and more vertexes are created so you might want to set a time line on the game level.

With a marching cubes algorithm, this is not true. One mesh per terrain segment, no matter how many tunnesl there are.

true, just offered an example of how i made tunnels in my project, ( might not be the perfect way, but it works great )

True, plus I wouldn’t recommend marching cubes for anyone with any degree of sanity.

I am trying not to have a blocky game like Minecraft but more of a dynamic digging game.

I have seen something in the past that has one giant block for the ground, when you dig it the block divides and divides until there is alot of smaller blocks and an opening where you dug but that would overload the game after a while. :?

I wouldn’t bother. There’s already dozens of these minecraft clones in the works and soon the net will be swimming in them, people will get sick and tired of these games really quick. Notch got in early, made his money and was just in the right place at the right time, nobody who follows will have the same success whatsoever. Minecraft has a charm the others simply wont be able to copy, and frankly a game like Minecraft wont impress users again until a decent one that use unlimited point cloud data comes along and allow for highly realistic terrain.

Besides, the minecraft users are vicious abusive people, just take a look at what they’ve done to Maniac Digger, and the horrific behavior towards anyone not part of their gang on the “official” forum. Be better to not attract their attention.

You’d be better off spending the time while everyone else and their grandmothers are trying to clone Minecraft, with coming up with the next game idea to get its 15 minutes of fame.

I agree completely with OblivionFeet.

Minecraft users and Dwarf Fortress users have recently taken to completely obliterating communities that resemble their games. They demand the attention of their developers, and go ahead on personal vendettas against any game that comes out in the building genre, contains dwarves, or has blocky graphics.

In all seriousness, if it weren’t for the fact that I knew Notch from years and years back when he was just some random swedish dev for some random swedish MMO who did nothing but talk about flowers and go on rants about how much he hates dragons, and fears spiders… (Sorry notch, I have to out you on this, you’re a little off balance, dude. But you’ve got the cash to be called eccentric now, I guess.) I would wholly avoid the Minecraft site. Check out Notch’s twitter if you ever get the chance, look at the threats, demands, and love letters he gets every day…

It’s pretty insane.

Now, I’d suggest distancing yourself from minecraft as much as possible. Why not make a FPS survival game with a tech tree? Similar to a multiplayer FPS Civ IV? I think that’s the sandbox game that’s going to gain the “big thing” indy title in the next two years. (Trust me, these things run in cycles)

Yeah, the general attitude among them is pretty disgusting. If he wasn’t making so much from Minecraft, I’d wonder why he bothers. Spent all this week fixing server issues and getting things up and running and the majority of the fanbase have attacked him cause he didn’t release some update, wow, just wow.

Guess he has to be a little crazy to put up with them eh? :smile:

I’ll second the FPS survival game idea too. It makes me think of the old Robinson’s Requiem and Deus though (never played Civ… lol), which I thought were awesome games, just let down horribly by technology for the time (admire that they tried to avoid blocky polygon terrain, just a shame it failed so badly). The insane amount of detail in surviving though was great. How many games let you amputate your own limbs lol. I’d love to see something like that, but with modern day visuals.

I’m not trying to clone minecraft at all, I’m trying to make an FPS that allows you to dig trenches in the ground and underneath other player’s bases.