Pixel Movement

by Forum_account
Pixel Movement
A pixel movement library for isometric and top-down maps.
ID:768895
 
All that's needed to allow use of bound_x/y (because right now it messes up collisions) is this:
mob
icon = 'mob.dmi'

// My new favorite method of defining bounds
// and why I've needed so much to fix this
bounds = "9,9 to 24,24"


atom/movable
New()
pwidth = bound_width
pheight = bound_height

// Forces the object to appear at the
// bottom-left of the tile, which may not
// be too horrible. You could probably
// set step_x/y in New() too.
pixel_x -= bound_x
pixel_y -= bound_y

// Most important part
bound_x = 0
bound_y = 0

..()
Thanks, I'll make that change for the next update which will probably be soon - the action RPG framework is resulting in a lot of changes to libraries. Pixel Movement and Overlays will be getting updates soon (probably today or tomorrow).
Sorry about bringing this up right after an update, but you mixed up pwidth/height and bound_width/height in atom/movable/New().
If you set the pwidth and not the bound_width, I wouldn't want it to overwrite your pwidth value with the bound_width value (edit: I'm assuming that most people will set pwidth and not bound_width). Is there a way to sort out which values you have or haven't specified?
My guess is whichever isn't the default icon size would be the changed one. If both are changed, you could just make another PixelMovement preference for which to use.
pwidth and pheight default to -1 so I can check if you've changed that, but you'll probably run into cases where both have changed:

mob
pwidth = 24
pheight = 24

other_mob
bounds = "9, 9 to 24, 24"

I'll probably just make it only use bound_width/height if pwidth and pheight are -1, which should cover all cases as long as you're not mixing pwidth and bounds like that.