ID:2304259
Oct 11 2017, 4:18 pm
|
|||||||||||||
| |||||||||||||
You can see that that glide, which uses a pixel offset, is gliding vertically instead of along the transform. Just make a real fix instead of doing a bandaid fix because the bandaid fix you already did clearly doesn't work. Also, now if you use KEEP_TOGETHER the offsets that occur when you have turfs in vis_contents don't work. If you're wondering what the red stuff in the corner is I was testing what would happen if you put turfs from multiple z-levels on the same vis_contents. Turns out that it displays both of them. A feature I will make use of to optimize visibility. |
The last two updates were quick fixes for unrelated issues. Chances are I'm likely to revert the last change outright, since I don't think there's a good comprehensive way to handle this.
|
i've been thinking about this issue the past few days, and the effect he's trying to replicate could be achieved through a BYOND library that utilizes either polar coordinates, or by defining a new x and y prime using the rotated angle (taught through the study of conic sections in pre-calc). but polar coordinates would probably result in the least ugly code.
there are no polar coordinate libraries on the dev forum, but i could probably make one. its difficult to translate using a tile-based system, but by combining tile-based with the pixel_x and pixel_y its possible to convert to byond coordinates. i'll look into this. |
Rotating an X/Y graph is not linear algebra. it's a late pre-calculus concept called conic sections.
You are changing the relationship between input and output, and glide() does not currently take that into account you are free to make your own version of glide() that takes it into account |
In response to Mista-mage123
|
|
Mista-mage123 wrote:
Rotating an X/Y graph is not linear algebra. it's a late pre-calculus concept called conic sections. Actually it is linear algebra; matrix transforms are linear algebra. And also conic sections are often taught prior to that in regular algebra, although by definition they aren't linear. |
Conic sections are the family of equations governed by ax^2+bxy+cy^2+dx+ey+f=0, and they're called conic sections because they're a 2D cross-section of two infinite cones that touch at their tips.
They aren't linear algebra because the equations aren't linear; they're quadratic. Only in the degenerate case where you're dealing with a straight line (a=b=c=0) are they ever linear. |
A "real" fix is going to be mighty iffy though. The interplay of pixel/step offsets (and therefore also glides) and transforms isn't easily dealt with in this kind of situation.