[QUOTE=Darkhog;95451]@SilverWarrior: Yeah, I thought so about setting dimensions bu wasn't sure. Will change that bit of code. Also let's say I'd make 2d minecraft (which isn't something I want to do): Grass can only grow on ground, so it is unlikely I'll need to check for other ground tiles, especially in Super Heli Land where it is like 3-4 tiles max./QUOTE]
Yes I understand that grass can only grow on land.
But we are talking about gamemap data structure whic would be used in other parts of the game aswell and not only to determine if there should be gras there or not. Si it is good to plan aghead when designing this as you can save yoursel lots of troubles in future.
And now for the reason why your perlin noise algorithm doesn't alows you to generate infinite maps.
If you take a look at its initalization procedure you will see that it uses deafult random number generator algorithm which ships with FPC and this algorithmonly accepts one input parameter (seed number).
If you want to make perlin noise generator which alows making infinite levels you need to integrate different kind of random number generator algorithm into it. This algorithm must be capable of accepting athleast two inputs (Seed number, Offset). As you may recal from one of my previous posts I did some serching for such algorithm in past but hadn't had much luck in finding it.
Bookmarks