unity中怎么做河流_【(原创)为Unity3D游戏生成2D和3D多边形随机地图(1/3) unity3d 随机移动 unity3d 加入河流 unity3d如何随机出现 unity3d中怎么加入河...

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?注册帐号

9f547f370dcc586bae5ddae68dee88bc.gif

x

本帖最后由 小刺刺 于 2015-6-26 17:10 编辑

这是一篇关于如何生成自定义随机地图的文章,可以生成2D或者3D数据,包含山峰、湖泊、河流、草地等,相对于噪声算法生成的随机地图,这篇文章提供的思路拥有更多的控制权,可以针对你的游戏策划案来做相应的调整。由于工作繁忙,所以将这片翻译拆成三部分来发,敬请谅解。后面会提供对应的u3d工程直接使用。

因能力有限,翻译不到位的地方请多多原谅。

Ivan.Z为游戏生成多边形地图

4 Sep 2010

I wanted to generate interesting game maps that weren’t constrained to be realistic, and I wanted to try some techniques I hadn’t tried before. I usually make tile maps but instead used a different structure. What could I do with 1,000 polygons instead of 1,000,000 tiles? The distinct player-recognizable areas might be useful for gameplay: locations of towns, places to quest, territory to conquer or settle, landmarks, pathfinding waypoints, difficulty zones, etc. I generated maps with polygons, then rasterized them into tile maps that looked like this:

2010年9月4日

我想生成一些有趣的不被现实所束缚的游戏地图,并且想尝试一些新技术。我通常用不同的结构来创建tile map。我怎样才能只使用1000个多边形而不是1百万个tile?对于不同的玩家来说,可识别的游戏区域对可玩性更有帮助:城镇地区,任务地点,可征服或定居的领地,地标,寻路坐标,难度标示区域等。我生成了多边形地图,然后栅格化成tile map,参考下图:

thread-40880-1-1.html

Most procedural map generators, including some of my own previous projects, use noise functions (midpoint displacement, fractal, diamond-square, perlin noise, etc.) to generate a height map. I did not do that here. Instead, I used a graph structure to model the things directed by gameplay constraints (elevation, roads, river flow, quest locations, monster types) and noise functions to model the variety not constrained by gameplay (coastline shape, river placement, tree placement).

大多数程序生成的地图,包括一些我以前的项目,都是使用噪声函数(midpoint displacement, fractal, diamond-square, perlin noise等)来生成一张高度图。在这里我并没有这样做。相反,我用图结构来建模一些被游戏玩法所限制的东西(海拔,道路,河流,任务地点,怪物种类)并用噪声函数将一些不被游戏所限制(比如海岸线形状,河流的位置,树的位置)的变量建模。

There were three main things I wanted for this project: good coastlines, mountains, and rivers. For the coastline, I wanted to make island maps that are surrounded by ocean, so that I don’t have to deal with people walking to the edge of the map. For the mountains, I started with something simple: mountains are whatever’s farthest from the coastline, so that you can always walk uphill to reach the top. For the rivers, I started with something simple: draw rivers from the coast to the mountains, so that you can always follow rivers down to the beach.

我为这个项目定了三个主要的目标:良好的海岸线,山脉,以及河流。对于海岸线,我想创建一个被海洋包围的岛屿地图,这样我就不用处理人物走到地图边缘的情况了。对于山峰,我开始用一些简单的处理:山不管什么情况下都是离海岸线最远的,这样你就可以永远沿着上坡到达顶峰。对于河流,同样简单处理:河流源于海岸终于山峰,这样你就可以始终遵循河流到海滩。

First, try the demo! (Flash) Read on to learn how it works, or get the source code. Here’s the overview of the process:

首先, 尝试Demo ! (注意)请仔细阅读,了解它是如何工作的,或者获取并查看源代码 。下面是这个过程的描述:

thread-40880-1-1.html

Every project will have its own gameplay constraints. For this project, the gameplay constraints were partially taken from Realm of the Mad God, a multiplayer RPG in which players start on the beach playing alone and then later join together on the mountaintop to fight bosses. Elevation directly corresponds to difficulty, and must monotonically increase, so that was a key constraint in the design. Elevation in Minecraft on the other hand isn’t constrained the same way, so the noise function they use works for that game. In multiplayer Age of Empires, the location of resources

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值