Pixel Movement

by Forum_account
Pixel Movement
A pixel movement library for isometric and top-down maps.
ID:121466
 
I posted an update to the HUD Groups library earlier today. See this blog post for more information about that.

Earlier tonight I updated the Pixel Movement library to mirror the recent changes made to the Sidescroller library. These changes remove the "native" and "library" modes, leaving "hybrid" mode as the only mode. This allows for improved performance while also supporting features like ramps, 3D movement, and the possibility for additional movement/collision related capabilities.

The exact changes were:
  • Removed the library and native modes. Since hybrid mode is the only mode, all of the mode-related options and code have been removed.
  • Renamed most of the files. The names are similar: mob-movement.dm became movement.dm, mob-pathing.dm became pathing.dm, hybrid-procs.dm became procs.dm, pixel-movement-hybrid.dm became pixel-movement.dm, mob-debugging.dm became debugging.dm.
  • Added collision.dm which contains code that used to be part of the pixel_move() proc.
  • Removed the NO_FLAGS flag since all flags are needed by pixel_move() now.
  • Removed the offset_x, offset_y, and offset_z vars. The pixel_x, pixel_y, and pixel_z vars can be used instead.
It was a minor change, but now that the built-in step_x and step_y vars can be used to set a mob's pixel offset (instead of using pixel_x and pixel_y to simulate them), the pixel_x/y vars are freed up to be used for actual pixel offsets so they offset_x/y vars could be removed.

I also updated the Shooter Demo to work with the updated version of the Pixel Movement library.
Great news!

Looks like I'll have to change some of the code around in my project to prevent errors, but no biggie.
Hopefully the changes will only be that things were removed (ex: the offset_x var) and can either be removed from your code or replaced with something else (pixel_x, in that case).

If there's any issue you have trouble resolving or any drastic difference in behavior, please let me know.
BYOND really needs a better way to update libs because this is a goddamn clusterfuck.
If it's not going to delete old files, it'd be nice if it kept each version of the library you have downloaded. That way each version would be in its own folder. Maybe it could even list them all in DM so you could pick which version to use.

This situation isn't too bad but I can imagine cases where it'd be much worse. I don't think I've removed any demos and the _readme and _reference files were never included by default, so you just have to delete the other unincluded .dm files in the root folder.