0-9194 / 0-9194/mmorpg-servers
World - Positioning of characters translated to tiles instead of absolute positions
- 主要语言
- JavaScript
- 星标
- 1
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
描述
Actually the positioning of characters are in absolute pixels. Any value between the boundaries of the room is valid.
This leads to some positional bugs, since the server and client relies on multiples of pixels (actually 16), if a player happens to be spawned on a number that do not respect this tile size, the validation of movement on server and the tile arrival script on client will not work as expected.
The idea is to, instead of save the absolute pixel value of X and Y, save the tile position (multiple of tile size) on each axis.
For example:
Today, to represent a 320 x 160 position, we save the value as is.
With this new strategy, we save a value representing the multiples. If tile size is 16, than we would save 20 x 10.
Another improvement will be that the movement validation on server and tile arrival on client will need less overhead.
贡献指南
这个仓库没有索引到贡献指南
调研方向
在服务器代码中找到角色位置存储和更新的地方,很可能在玩家或实体类中。理解当前的移动验证和图块到达脚本。更改涉及将绝对像素坐标转换为基于图块的坐标(图块大小的倍数,例如16)。通过确保服务器验证和客户端脚本在新的坐标系下正常工作来进行测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- node.js
- 领域
- backend, game-dev
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100