Giter Club home page Giter Club logo

hexflow's Issues

Feat: 根据网格相连的位置关系构建纹理的机制

相连的两个格子, 如果是同种地形, 则应在连接处使用连续的纹理; 如果是不同种地形, 则应在连接处使用各自的边缘纹理.

基本思路是在划分为 6 个三角形的 Mesh 上, 对每个三角形的连接情形, 可以划分为16种组合. 在生成纹理坐标时, 就能根据连接状态选择要使用的纹理区域.

  • 简单重复的 uv 坐标的生成算法
  • 连接型纹理的 uv 坐标的生成算法
    • 基于滑动窗口的遍历算法
    • 针对空区块边缘的微小像素点的优化
  • 包含16种情况的纹理

Feat: 随机生成地图

需要具有以下特性:

  • 一个种子即可唯一决定整个地图的地形
  • 不限制区块的生成顺序, 即任意区块可在任意时机生成
  • 相邻区块间具有连续性

可以参考 这个视频 的算法, 尝试用 job 系统实现?

Feat: 地图的保存与载入

目前没 UI, 开局自动读取默认地图, 然后随便丢个 GetKeyDown 或者临时按钮来触发保存

  • 地图保存
  • 地图载入

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.