1

I'm working on programming a game, and the game environment is going to be near complete environmental control. Part of that is going to have a player dig/mine and modify the terrain in the Game.I was looking at a bloxel type environment, however I would like a nicer/realistic looking terrain. What I would like help finding/learning, is what is the algorithm/code in jmonkey to make terrain that you could modify (like Space engineers or Sub-nautica)

What I have thought of for a algorithm in short hand:

get point in terrain that the player is attempting to modify
in/decrease its height by 1
do something...

The problem I have with this algorithm, is that it will not allow for players to build caves/mines as well as other things, and the terrain will get stretched. I thought well maybe I can then turn the stretched plane into a bunch of smaller planes/points, and then just use the players orientation so they can make indentations/caves, however I do not see a way to do this in jMonkey and I think this will consume a large amount of resources. How would I do this or, would there be a more efficient way

fftk4323
  • 130
  • 1
  • 12
  • 2
    You might want to take a look at a modeling program, like Blender (it's free). Rather than just moving a point up or down, it allows you to stretch a point in any direction, or add more polygons by subdividing existing polygons. [Check out this video tutorial,](https://cgcookie.com/blender/lessons/1-game-engine-simple-character/) it's pretty neat. It's also *non-trivial to code*, so you'll probably need a lot more research into algorithms and whatnot. – markspace May 21 '15 at 18:38
  • This is a very good point for learning the needed terminology for what I want. I already knew this, however I wasn't thinking of applying the same terminology to this. This also helps me out in a few other parts I will need in the future of the game. Thanks – fftk4323 May 21 '15 at 18:57

0 Answers0