Opened 6 years ago
Last modified 5 years ago
#4939 new defect
Always use tile coordinates in rmgen instead of sometimes using fractions
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Backlog |
Component: | Maps | Keywords: | |
Cc: | Patch: |
Description
Few functions in rmgen request fractional coordinates (0...1) rather than coordinates on the tilegrid.
For once, it should be uniform in order to make it as simple as possible.
Secondly, using tile coordinates everywhere has the advantage that one can use
- absolute sizes like
10
without having to usefractionToTiles
scaleByMapSize
and one can confirm sizes by counting polygons in the wireframe view.
Also in the light of #4845, a Vector2D
should be used ideally whenever coordinates are passed, rather than x and z individually, allowing to use the vector operations to simplify the math and reducing the number of arguments.
Luckily these are only very few instances.
Change History (4)
comment:1 by , 6 years ago
comment:4 by , 5 years ago
Replying to elexis:
Few functions in rmgen request fractional coordinates (0...1) rather than coordinates on the tilegrid.
I guess you mean relative coordinates to the map size (map size being the length unit) compared to absolute coordinated in tiles (tile width as length units) which can still be fractions and do not correspond to a specific tile (as I would understand "tile coordinate", though they get to be on a specific tile, the one with floored coordinates)?
Yea, great changes so far. Thanks!
In 20871: