Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
Hello, I'm not sure if this has been talked about before or how how much of a nuisance this might be so I figured I'd ask about it.

Typically when dealing with walk_towards or any of the variations, a mob will move rather jarring unless it's in perfect alignment with the original location. This typically would require the target location to be at exactly 45 degrees. However in a lot of cases the target will not be in such a perfect degree and the player will instead move in an odd fashion in order to line up with target location.

I'm curious if it would be possible to make a visual for movement similar to missile in which a straight line is drawn and the player moves to that location through said line or would such a thing cause issues?

Thanks for your time.
It's not exactly difficult to use "relatively simple" trigonometry to calculate the proper angle between two points and assign a number of pixels to move along each x and y plane. I'm not at my main computer right now, but otherwise I would paste a snippet of the code for my project that handles just that. Trust me, it's not really that hard, nor is the code a chore to read. It's only a couple dozen lines at most.
Is it possible to be used in a code that doesn't allow pixel movement? I believe something like Missile() allows a line to be drawn without interfering with step_size.
Well, yes, so long as you're not explicitly setting a new step_size for anything. You can move a mob using step_x and step_y in the Move() proc.
It's possible to draw a line in tiles using Bresenham's line algorithm and move along that path. You'll still be moving in one of 8 directions every step, though.
I figured adjusting step_x and step_y was no different then adjusting step_size and would cause things to get wonky. If you have a method for achieving a straight line I'm curious how you handle it then. The games I mess with typically use 32 (tile based movement) and I very occasionally would like the character to move in a straight line to a destination that is otherwise not in perfect alignment. While this is also purely a visual affect it's also literal cause I do want the player to end at the location hence why missile doesn't work.