Code center > Bugs and fixes

Changes 2.43 - 2.43.1d

<< < (12/13) > >>

bacillus:
Ok, thanks. I'll update.

Trafalgar:
I noticed in the changelogs that xpos, ypos, and refxpos and refypos are relative to map size instead of in the same units as dist now.

Question: How do dx, sx, etc behave now? Are they in the same units as xpos/ypos, or the same units as dist?

Do we need to do dist(refxpos, 0) to convert refxpos, for instance, to normal units now? (And would that be slow?)

This affects the position and movement code in most of my bots, which generally have a fixed angle of facing that they maintain all the time, and thus have sx and dx on the same axes that xpos and ypos are on. For instance, they may set up to refypos - ypos, and sx to refxpos - xpos.

It also applies to the target-position-prediction on many of my bots, like basically all versions of Guardian.

Numsgil:
The good news is that xpos, ypos, etc. etc. are only affected on large map sizes, so F1 results didn't change (at least from that).

Not sure how the dist or angle operators were affected.

EricL:
dist, angle, xpos and ypos should all use the same units.

For field sizes above size 4, imagine the field is size 32000 X 32000, independent of it's actual dimensions.  Positions, angles and distances are calculated using those units.

dx and sx are still in the same units they have always been.  The amount of thrust they generate does not change as the field size changes.  Note comparing .sx, .dx, etc. to x,y coordinates is apples and oranges.   You cannot now nor could you before assume that thrusting a given amount will move you that amount, even on small fields.  The physics of the sim w.r.t. friction, fluid resistance, the bot's own mass, etc. make them just different things.  One is unit of distance, one is a unit of force.

bacillus:
I still haven't found anything on the trefvel vars. Could you either post a link to where I can find this info, or fill me in here? Thanks in advance.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version