Hello there!
In the track editor you can now use script to place 10 tree blocks at random location at the map.
What I am wondering about: Could someone be able to create a script that created a terrain for you, completely random? This terrain would be of both water, hills, cliffs, mountains and so on.
Or is it impossible to make it completely random?
Request, generate terrain **done, download inside**
Moderator: English Moderator
Request, generate terrain **done, download inside**
Last edited by Frank87 on 08 Sep 2011, 15:03, edited 2 times in total.
Re: Request, generate terrain
I thought of this already as well. But making an authentic terrain script is a lot harder than just placing tree blocks, as you can imagine, I guess^^
If no one else has had the idea already and is working on it, I would like to make one
If no one else has had the idea already and is working on it, I would like to make one

Re: Request, generate terrain
Here my first try:

atm you can set the min and max height and the number of terrain "blocks" with random size.
Tryed first with generating a heightmap(with a fractal function) and then rendering the terrain with the heightmap hights. however, this took very long and so I gave it up and my new algorithm is simply get a random block height, position and size and place it...
regards Alain


atm you can set the min and max height and the number of terrain "blocks" with random size.
Tryed first with generating a heightmap(with a fractal function) and then rendering the terrain with the heightmap hights. however, this took very long and so I gave it up and my new algorithm is simply get a random block height, position and size and place it...
regards Alain
Re: Request, generate terrain
Nice!
But please don't give up, see if there is a way to make a good algorithm. But of course ,if it's too hard I understand that - afterall, I canot make shit at all ;p

Re: Request, generate terrain
I created a terrain generator, I'm very pleased with it 

It places all the three kinds of terrain randomly at random positions. As you can see, you can determine how man blocks will be set and if a certain block type should occur more often (this means, twice as much as normally).
Download: http://konte.org/daten/skripte/Bulldozer.Script.txt
(Place it in \Documents\ManiaPlanet\Scripts\EditorPlugins\TrackMania)


It places all the three kinds of terrain randomly at random positions. As you can see, you can determine how man blocks will be set and if a certain block type should occur more often (this means, twice as much as normally).
Download: http://konte.org/daten/skripte/Bulldozer.Script.txt
(Place it in \Documents\ManiaPlanet\Scripts\EditorPlugins\TrackMania)
Last edited by konte on 05 Feb 2012, 16:26, edited 1 time in total.
Re: Request, generate terrain
This is absoluty amazin, thanks a lot!!
Thumbs up man.
Quick question tho: Would it be hard implenting so the game also used the various water and hill cliffs (the ones in the block selection) ? =)
Thumbs up man.
Quick question tho: Would it be hard implenting so the game also used the various water and hill cliffs (the ones in the block selection) ? =)
Re: Request, generate terrain **done, download inside**
Nice one konte
(Thank you for your very nice tutorial btw
I linked it in my old reference)
(one question I coulnd't find out so far: is it possible to capture the keypress event in an editor plugin? oO if yes, I would have some nice ideas, like a 3d snake inside the editor xD)
My one is not yet as customizable as yours, but you can change some variables inside the script (making an interface too later...) You can: change the minimum and maximum height (f.ex. if you want to get very height mountains you can set a minimum height that is nearly on the maximum, or if you want to have small hills, you can set the minimum to ground height and the maximum to 1, 2 or 3 hills stacked)
My algorithm is a bit different. It has some Terrain templates with different height values (for example if you want height 5, the algorithm will take the terraintemplate:1 time mountain and 2 times hill).
Here my very best result so far:(had a lot of luck xD)

The terrain generator is now also in my plugin collection(check the forum threadfor more infos)
If you want you can give my plugin a try too and give feedback(the download is in the collection thread or direct link
regards
Alain

(Thank you for your very nice tutorial btw

(one question I coulnd't find out so far: is it possible to capture the keypress event in an editor plugin? oO if yes, I would have some nice ideas, like a 3d snake inside the editor xD)
My one is not yet as customizable as yours, but you can change some variables inside the script (making an interface too later...) You can: change the minimum and maximum height (f.ex. if you want to get very height mountains you can set a minimum height that is nearly on the maximum, or if you want to have small hills, you can set the minimum to ground height and the maximum to 1, 2 or 3 hills stacked)
My algorithm is a bit different. It has some Terrain templates with different height values (for example if you want height 5, the algorithm will take the terraintemplate:1 time mountain and 2 times hill).
Here my very best result so far:(had a lot of luck xD)

The terrain generator is now also in my plugin collection(check the forum threadfor more infos)
If you want you can give my plugin a try too and give feedback(the download is in the collection thread or direct link
regards
Alain
Re: Request, generate terrain
Well, my script doesn't pay a lot attention to the height, if there's a 2-level (or more) mountain, that's rather coincidence 
And that's certainly a advantage of your code.
But the disadvantage is that you create only rectangles which doesn't look well on bigger sizes. My script adds always some smaller "add-on" blocks to the main block, if the block is large.

I don't think so, I'll take a look at it tomorrow or Sunday

And that's certainly a advantage of your code.
But the disadvantage is that you create only rectangles which doesn't look well on bigger sizes. My script adds always some smaller "add-on" blocks to the main block, if the block is large.
Thank youFrank87 wrote:This is absoluty amazin, thanks a lot!!
Thumbs up man.
Quick question tho: Would it be hard implenting so the game also used the various water and hill cliffs (the ones in the block selection) ? =)

I don't think so, I'll take a look at it tomorrow or Sunday

Re: Request, generate terrain **done, download inside**
I think Konte's script is better for map making and AK's better for deco.
Who is online
Users browsing this forum: No registered users and 1 guest