Trees spreading patch

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
User avatar
Posts: 1160
Joined: 15 Feb 2003 17:32
Location: Villefranche-sur-Saône, France

Trees spreading patch

Post by MagicBuzz » 03 Jul 2018 20:20


I used to play Transport Tycoon from its first version in 1994.

In the original game (TT and TTD) the trees were growing slowly and randomly. But I Don't remember they were covering the whole map so fast.

Now, with OTTD, the tree algorithm was changed, and after some years, the whole map is covered with a dense forest.

While in the original game, trees were mostly eye candy (and a little construction cost challenging), now they pollute the screen, and I play all the time with transparency options enabled for the trees.

This “bug” (or “feature”?) is known for a few years now, and I wonder if someone already tried to fix it.

Today I started to write a small patch to make the tree spreading a little bit more realistic.

In real life, trees mostly grow in forest, and never spread in the middle of meadows without being planted.

Consequently, my patch simply checks before planting a new tree if it’s already at least 6 planted tiles in a radius of 2 tiles.
It also prevent planting alone trees during map generation.
This is a new tree algorithm “Forest”.

New game :
New game with the new algortithm
(830.05 KiB) Not downloaded yet
After 6 years :
Same game after 6 years
(1.45 MiB) Not downloaded yet
See branch on GitHub : ... eSpreading
Last edited by MagicBuzz on 04 Jul 2018 12:51, edited 1 time in total.

Posts: 3
Joined: 21 Jun 2016 04:21

Re: Trees spreading patch

Post by Dalnok » 14 Aug 2018 08:58

Hi MagicBuzz!

I ran into your patch while searching for tree deployment solutions for scenarios. What I'm looking for is how to deploy realistic forests on a scenario. Realistic means that trees growing in clusters not alone and mostly on mountainous areas. Maybe your patch could be used somehow in the scenario editor for this purpose? Or do you know any other tools?


Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 10 guests