ID:884425
 
(See the best response by Kaiochao.)
Has anyone created a vector system using BYOND's pixel movement? Or, do you know of a resource that I could use for this?
Forum_account's library was made before native pixel movement and thus utilizes decimal values in its coordinates and vectors.
In response to Kaiochao (#1)
Any chance you could point me to the example/code file? I searched all files for the term "vector" and came up with nothing.
In response to Cloud Magic (#2)
Best response
Do you know what a vector is? BYOND doesn't have special syntax for them, they're commonly used as a pair of variables; x and y offsets or direction and magnitude. The library has vel_x/y which act as a vector added to position each tick, for example.
"Do you know what a vector is?"

No, I'm just asking for examples of something that I don't know what it pertains to or what its function is. That was a stupid question. Thanks for your help, though!
In response to Cloud Magic (#2)
Vectors aren't a pixel movement concept either. I have them in my ProcLib, which is just a collection of functions I commonly use. Vectors in there are actually lists, and you access them using vector[1] as the x component, 2 as y.
In response to Cloud Magic (#4)
It's just, the way you asked about a "vector system" that "used BYOND pixel movement" was kinda specific for something so abstract. It's literally as if you asked, "can I do arithmetic using a combat system?"
In response to Kaiochao (#6)
It's fine I got a little overexcited lol =]
Using pixel offsets instead of floating point vectors solves some issues, for example, with floating point (0.13 + 0.12) is not equal to 0.25.
Visually it wouldn't add much detail either, you can't draw pixel between two pixels on your screen.
However if you happen to encounter situation, where object needs to move 1.5 pixels every step, you can do something like
// this isn't actually 1.5 distance but w/e
real_x = real_x + 1.5
real_y = real_y + 1.5
step_x = round(real_x, 1)
step_y = round(real_y, 1)