Making a Mesh Procedural Terrain Generation Game

Started by
3 comments, last by DareDeveloper 10 years ago

What is the best way to create a procedural generation mesh, as in what language, libraries, etc.?</h1>

Using a system of coordinates, I want to be able to make a low poly mesh that can be colored, (no textures,) to be navigated by a player. (There are pictures of what I want it to look like below.)
I am pretty much a newbie to programming, what would be the best language to do this in, what is the best way to approach this project and is there any more that I need to know?
I appreciate all help given!
Is this project too ambitious, should I step away and let this idea simmer for a while, would not all computers be able to run this?
I could also do mesh "tiles" that could be seamlessly connected, like the chunks in minecraft, using a tileset, I could generate terrain.
3 Mar 2014: Initial release
Advertisement

Welcome to the forums! smile.png

I don't really understand your question. You say you want to create a low-poly mesh that can be navigated by the player. I assume the pictures you showed are pictures of how you want your mesh to look like? Can I assume you want the player to walk on it? As long as you keep the terrain small enough, most computers can easily handle this.

You can easily find things on how to create voxel terrain via Google like this link. It shows you how to create voxel terrain in a "blocky" way. Your pictures show a smooth environment however, but not like marching cubes, so you probably want laplacian smoothing, this smoothing algorithm can be applied to the terrain from the previously linked tutorial, or another generator. You will however need to know how to program this, as there are not tutorials for everything. wink.png

This can be programmed in around any language that's not very slow and supports 3D rendering. For beginners, the Unity engine may be your best choice, as there are a lot of good tutorials out there. A language like C++ can also do the job, but I guess even scripting languages could do this. This requires you, however, to have experience in the language and/or tools you are going to use. As you say you are a "newbie" to programming, I recommend doing some basic stuff first. Programming something like this requires physics, 3D rendering and applying some algorithms; I think most beginnners aren't able to complete this project, so I would recommend something like pong first...

Welcome to the forums! smile.png

I don't really understand your question. You say you want to create a low-poly mesh that can be navigated by the player. I assume the pictures you showed are pictures of how you want your mesh to look like? Can I assume you want the player to walk on it? As long as you keep the terrain small enough, most computers can easily handle this.

You can easily find things on how to create voxel terrain via Google like this link. It shows you how to create voxel terrain in a "blocky" way. Your pictures show a smooth environment however, but not like marching cubes, so you probably want laplacian smoothing, this smoothing algorithm can be applied to the terrain from the previously linked tutorial, or another generator. You will however need to know how to program this, as there are not tutorials for everything. wink.png

This can be programmed in around any language that's not very slow and supports 3D rendering. For beginners, the Unity engine may be your best choice, as there are a lot of good tutorials out there. A language like C++ can also do the job, but I guess even scripting languages could do this. This requires you, however, to have experience in the language and/or tools you are going to use. As you say you are a "newbie" to programming, I recommend doing some basic stuff first. Programming something like this requires physics, 3D rendering and applying some algorithms; I think most beginnners aren't able to complete this project, so I would recommend something like pong first...

I have used unity before, but never for something like this, sorry my article wasn't clear, by the way. Anyway, thanks for your help :D.

Really, just about any halfway decent engine should be sufficient, so long as it provides some interface for interacting directly with vertex buffers for geometry. Your pictures indicate a basic heightmap, and many engines provide terrain components that handle this sort of thing fairly well, allowing you to either build the terrain mesh directly or specify the terrain using an intermediate image object.

Starting with 3D might be a bad idea.

You might be able to do something fun in 2D with midpoint displacement first, then move on to cellular automata and build a 2D cave ... and then think about how you can use several algorithms to do something in 3D.

I too think the language question is not really relevant. What you should worry about are algorithms and data structures.

You should be able to use the algorithms with almost any language that supports graphical applications.

The post/image does not quite show what exactly it is that you want to do. In case you are looking for inspiration ...

not just a way to accomplish the results in the picture ... there is a list of algorithms that might be interesting:

http://pcg.wikidot.com/category-pcg-algorithms

There is not too much information on that site but you can google the keywords to learn more about those things.

This looks like something you might want to look into (the image reminded me of this diamond/square example ... and scoll up for midpoint displacement):

http://www.gameprogrammer.com/fractal.html#diamond

You'd have to think about how to accomplish that the rivers are not affected by the transformations. Probably you would have to combine different algorithms for that.

It does not have to be that sophisticated:

http://www.gamedev.net/blog/906/entry-2257027-procedural-terrain/

Given enough eyeballs, all mysteries are shallow.

MeAndVR

This topic is closed to new replies.

Advertisement