Pixel Movement

by Forum_account
Pixel Movement
A pixel movement library for isometric and top-down maps.
ID:793552
 
BYOND Version:494
Operating System:Windows XP Pro
Web Browser:Firefox 12.0
Applies to:pixel movement
Status: Open

Issue hasn't been assigned a status value.
    icon_size = "52x196"
map_format = ISOMETRIC_MAP


in the code above, the two values in icon_size is necessary for some odd shaped icons, and also necessary to fill the map to the corners of the screen without much black border seen and with the stretch to screen enabled.

when walking on the map with just the code.dm file and no libraries enabled, i get no walking lags, yet, with the pixel movement library enabled, when the mob walks to the north or south, there is a lag the second value of the icon_size minus about 25 percent of the value. the mob basically walks four steps forward and skips to three steps back. walking east or west does not give a lag.

there is no walking lag when the icon_size has only one value
I took a look at this and I'm not sure what the problem is yet but it seems to be an issue with the camera. The movement seems to be correct but I've found a spot where moving one pixel causes the camera to jump more than one pixel, which could be causing the glitch you see. I'm not sure if it's caused by BYOND (non-square icon sizes have been known to cause odd problems) or if it's caused by the library.
if you can't find the cause to the problem, could you tell me how to stop the camera or movement from the library. i have tried disabling the move proc from the library but for some reason the mob does not move.

i have an idea. how about disabling the camera and then the move proc to see if one of those is the reason for the lag
I'm not sure what you mean by lag. I've seen the camera skip unexpectedly, but I haven't seen lag.

Have you experienced problems with a more reasonable icon size? I'm not sure why you'd have to use a size of 52x196. You can use a size of 52x52 and give turfs larger icons than that, if you'd like for them to occupy more space.
i just could not find a word to describe the problem but skip is what it does.

anything other then 52 in the second value will make the walking skip more of less depending on rather the value is higher or lower than 52. the 196 in the second value is the only way for me to get the map fully stretched to the edges of the window
I can't get consistent results with using different icon sizes in isometric mode. When I set world/icon_size = "52x196" in the Pixel Movement's isometric-demo it shows the tiles as being spaced apart. When I set the icon_size the same way in a smaller sample environment the icons are not spaced apart properly. I wouldn't trust BYOND for an icon size like that. If it works for world/icon_size = 52, find a different way to make the map fill the edges. I'm not sure that this is something I can fix.
the first value in the icon_size will space apart the icon if that icon is not actually 54 in width. the size of my icon is 54x54. the second value will not space apart the icons. i have icons of 54x54 with an icon_size of 54x196 and i see no spacings in the icons displayed at runtime.

the other option i have is disabling the camera or move proc in the pixel movement library. i tried commenting out both camera and move proc but all that does is not move the mob at runtime. could you refer me to these areas in the pixel movement code

I think I found the problem. The library was treating the tile size as being the world's icon_size, but for non-square isometric tiles the height of a tile (the distance in the y direction) is limited by the width of the tile - even with world.icon_size = "52x196", the tiles are really only 52x52.
why can't i just remove all icon_size and world.icon_size from pixel movement. that should solve the problem. correct?

well, anyways, i tried that and now i get an infinite loop
There's more to it than that. The next update to the library will fix this, but in the meantime you can use world/icon_size = 52 and put up with the icons not being stretched properly.
ok. thank you for taking the time to fix this