weixin_39621075
weixin_39621075
2020-12-26 11:49

Cache vision

Vision should be cached somewhere on each tick start for performance, instead of being calculated when needed. Currently, half of the CPU operations are done in NavGrid (ray casting, getting if is walkable etc.)

该提问来源于开源项目:LeagueSandbox/GameServer

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39578674 weixin_39578674 4月前

    It could be done on each move which would match clients vision (onentervision and onleavevision packets).

    点赞 评论 复制链接分享
  • weixin_39621075 weixin_39621075 4月前

    Yeah that's a better idea.

    点赞 评论 复制链接分享
  • weixin_39918690 weixin_39918690 4月前

    Yep, although I wouldn't mind a cache busting + recalculating function in case that's needed for some reason

    点赞 评论 复制链接分享
  • weixin_39862097 weixin_39862097 4月前

    Those methods should only be needed for debugging, we won't want them in production

    点赞 评论 复制链接分享
  • weixin_39931146 weixin_39931146 4月前

    Seems like #820 also reference some solution for the vision system performance .

    点赞 评论 复制链接分享

相关推荐