GithubHelp home page GithubHelp logo

brinkqiang2cpp / navmeshscene Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fananchong/navmeshscene

0.0 0.0 0.0 12.39 MB

based on recastnavigation, a 3d scene

License: MIT License

C++ 42.17% C 56.85% Batchfile 0.01% Lua 0.12% CMake 0.58% Objective-C 0.28% Shell 0.01%

navmeshscene's Introduction

NavMeshScene

功能

  • 使用recastnavigation构建3D场景,支持Solo Mesh、Tile Mesh、Temp Obstacles
  • 提供游戏对象地面行走
  • 提供游戏对象间碰撞,及事件通知
  • 提供游戏对象与场景碰撞,及事件通知
  • 支持改变地形

build

window

git submodule update --init -- "aoi"
cd build
g.bat

打开 NavMeshScene.sln

linux

64位linux提示gnu/stubs-32.h:No such file or directory的解决方法

ubuntu:sudo apt-get install libc6-dev-i386

CentOS:sudo yum -y install glibc-devel.i686
git submodule update --init -- "aoi"
cd build
g.sh
make config=release_x64

目前性能

图2

相关内容 说明
测试例子 tests/test1
场景大小 1000 * 1000
游戏对象数 5000
AOI半径 0.6
一次op 所有游戏对象都做一次移动

测试机器配置

阿里云ECS服务器,配置: 1 vCPU 2 GB (I/O优化) ecs.t5-lc1m2.small 1Mbps

例子

example2

图1

  • 红色圆柱为受玩家控制的游戏对象
  • 绿色圆柱为AI游戏对象
  • 黄色圆柱为动态障碍物,可以改变地形

地图资源说明

NavMeshScene 加载的地图资源使用 exampe2 工具导出的。

exampe2 在 recastnavigation 工具基础上,对文件头做对齐处理;增加了地图bounds等信息这些操作。

同时,也支持 recastnavigation 原工具导出的资源格式。

DOTO

  • 基于offMeshLink增加跳跃的功能与例子
  • 新增新的随机地图位置算法,原随机算法对于Tile类型大地图太慢

navmeshscene's People

Contributors

brinkqiang avatar fananchong avatar

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.