我发现了一篇关于世界一代的好文章,可以找到here.
它很好地描述了需要做什么,但是我很难弄清楚如何用python完成它。我相信是在as3里做的,但我不确定。无论如何,我还为perlin noise找到了libtcod函数:
noise2d=libtcod.noise_new(2)
value = libtcod.noise_turbulence_perlin(noise2d,[0.5,0.7],32.0)
我真的不知道如何实现这一点,然后根据高度分配字符。在
如果有人能帮我把文章中的步骤翻译成python,我会非常感激的。谢谢
Tags:
这是我几年前写的一个类,它为我的rogulelike原型DomeriaRL创建一个世界地图。相关部分在^{} method 。在
它将噪波应用于高度贴图,将其规格化,并基于高度贴图的值创建平铺。在
我使用颜色贴图来创建从一种瓷砖到另一种瓷砖的平滑过渡。在
示例世界地图如下所示:
{1美元^
请注意,这个游戏使用libtcod1.5.1b1,一些函数名在较新版本中发生了变化。在
相关问题 更多 >
编程相关推荐