[Patch] Improve large map creation speed

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

girth
Engineer
Engineer
Posts: 33
Joined: 28 Apr 2007 05:02

Re: [Patch] Improve large map creation speed

Post by girth »

Eddi wrote:errr... what exactly are you trying to achieve? if placing a random tree, filter first for tiles that can actually grow a tree? doesn't sound very fast at all.
No? If you maintained an array of tiles with no trees on them, you could choose them when attempting to place trees on the map? You could throw the array away after generation, if it takes too much memory.
People smarter than me can let me know if it's worth pursuing... :P
MJP wrote:The tree generation takes ~0.5% of the time took to generate a 8192*8192 map.
No issue then. :)
I just see that for large maps, the amount of passes the default tree generation code does is quite a lot, which seemed a little wasteful to me.
But if the end result isn't slow, there's bigger fish to fry, I'm sure.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests