2 Star 1 Fork 0

FreeBlues / MapSample

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

#MapSample

##环境要求:iOS下的Codea

##使用说明: 随机生成网格地图,地图比较简单,有植物和矿物两种资源,资源随机生成。 植物有三种:松树、杨树、小草 矿物有两种:铁矿、铜矿

##通过参数来控制网格数目、网格大小、资源生成几率

##控制参数比较简单,如下: ###gridCount:网格数目,范围:1100,例如,设为3则生成33的地图,设为100,则生成100100的地图。 ###scaleX:单位网格大小比例,范围:1100,该值越小,则单位网格越小;该值越大,则单位网格越大。 ###scaleY:同上,若与scaleX相同则单位网格是正方形格子。 ###plantSeed:植物生成几率,范围:大于4的数,该值越小,生成的植物越多;该值越大,生成的植物越少。 ###minerialSeed:矿物生成几率,范围:大于3的数,该值越小,生成的矿物越多;该值越大,生成的矿物越少。

##几组参考值:

3*3的地图
gridCount = 3
scaleX = 100
scaleY = 100
plantSeed = 20.0
minerialSeed = 10.0

5*5的地图
gridCount = 5
scaleX = 100
scaleY = 100
plantSeed = 20.0
minerialSeed = 10.0

14*14的地图,矿物中等
gridCount = 14
scaleX = 50
scaleY = 50
plantSeed = 20.0
minerialSeed = 10.0

14*14的地图,矿物稀少
gridCount = 14
scaleX = 50
scaleY = 50
plantSeed = 20.0
minerialSeed = 50.0

70*70的地图,矿物稀少
gridCount = 70
scaleX = 10
scaleY = 10
plantSeed = 20.0
minerialSeed = 50.0

200*200的缩微地图,矿物稀少
gridCount = 200
scaleX = 2
scaleY = 2
plantSeed = 20.0
minerialSeed = 50.0
The MIT License (MIT) Copyright (c) 2015 FreeBlues Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Codea下简单的地图生成器 展开 收起
Lua
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Lua
1
https://gitee.com/hexblues/MapSample.git
git@gitee.com:hexblues/MapSample.git
hexblues
MapSample
MapSample
master

搜索帮助