ID:777259
 
(See the best response by Albro1.)
I'm in the midst of grasping all of the pixel movement system included in BYONDs new system. I was looking at the pixel demo and I was confused about using step x and y. If you alter step x and y (like in the demo to make the smilley face big), wouldnt you have to change the bound x and y of the atom as well?

ex. if the new step size causes an icon to fill a 32x32 area in the bottom left corner of a 64x64 grid (like in the demo), shouldnt the bound x and y be 0 since there are now no empty pixels to the left and bottom of the icon?
You're not thinking about it correctly.

step_x and step_y are the pixel-perfect coordinates of the atom on the current turf. Setting a step_x of 16 on a mob will place it's bottom left corner 16 pixels into the current turf it is on.

bound_x and bound_y are the pixel-perfect positions of the atom's bounding box, which determine when it crosses something.
Say you have an icon of a 16x16 square centered inside of a 32x32 canvas. Setting a bound_width and bound_height of 16 won't place the bounding box over the square itself. To do that, you must set the bound_x and bound_y values to 8, which moves the bounding box's position on the atom 8 pixels to the right and 8 pixels up, respectively.

If any more clarification is needed, please ask.

Did my response help you? Please click the "[X] Votes" box to vote up my response so that others can answer their questions faster!
Can you elaborate or give another example regarding what step x ans step y do? I think I understand a little more though. Are you saying that step x and y dictate the position of the icon relative to the turf it is on?
In response to Raruno
Best response
Raruno wrote:
Are you saying that step x and y dictate the position of the icon relative to the turf it is on?

Yes.

Normally, when setting a mob's loc to a coordinate, they are placed there and the bottom left corner of their bounding box is placed in the bottom left corner of the turf. Now assuming your bound_x and bound_y are set correctly, if you set a mob's loc to a coordinate and then set their step_x to 5 and their step_y to 10, their mob (bounding box, icon, everything) is shifted 5 pixels to the right and 10 pixels up.
How would you know when to set a step x and y
You usually won't have to. They are set automatically whenever you move. You won't have to do anything with them unless you want to.
ok thanks