ID:273366
 
So i started my own pixel movement methodology. I have

http://www.byond.com/members/MrTophat/files/test.zip.zip

to deal with camera issues now... it works just fine now :O... well there isn't mob detection, but that's easy to add >_> now that i have the basis for collision detection laid.

I wanna know how to get rid of that "jump back" look when my mob is at the end of tiles.

I'd also like to move the camera, 3 pixels at a time, but I'm carelessly unaware how to do that. Advice?
mob/proc
Pixel_Move(dir)
var/x = 0
var/y = 0
if(dir == NORTH || dir == NORTHEAST || dir == NORTHWEST)
y = 4
if(dir == SOUTH || dir == SOUTHEAST || dir == SOUTHWEST)
y = -4
if(dir == WEST || dir == NORTHWEST || dir == SOUTHWEST)
x = -4
if(dir == EAST || dir == NORTHEAST || dir == SOUTHEAST)
x = 4
for(var/atom/A in view(1,src))
if(istype(A,/turf) || istype(A,/obj))
if(A.blocked != 0)
src.bxone = src.pix_x + x + 32
src.byone = src.pix_y + y + 32
src.bxtwo = src.pix_x + x + 15 + 32
src.bytwo = src.pix_y + y + 5 + 32
if(A.blocked == 1)
var/x1 = ((A.x - (src.x-1))*32) + A.bxone
var/y1 = ((A.y - (src.y-1))*32) + A.byone
var/x2 = ((A.x - (src.x-1))*32) + A.bxtwo
var/y2 = ((A.y - (src.y-1))*32) + A.bytwo
if(x1 <= src.bxone && src.bxone <= x2 || x1 <= src.bxtwo && src.bxtwo <= x2)
if(y1 <= src.byone && src.byone <= y2 || y1 <= src.bytwo && src.bytwo <= y2)
return
//if(A.blocked == 2)

src.pixel_x += x
src.pixel_y += y
src.pix_x += x
src.pix_y += y
if(src.pix_x >= 33)
//src.loc = locate(src.x + 1,src.y,src.z)
src.x += 1
src.pix_x -= 32
src.pixel_x -= 32

if(src.pix_y >= 33)
// src.loc = locate(src.x,src.y + 1,src.z)
src.y += 1
src.pix_y -= 32

src.pixel_y -=32
if(src.pix_x <= -1)
//src.loc = locate(src.x - 1,src.y,src.z)
src.x -= 1
src.pix_x += 32

src.pixel_x +=32
if(src.pix_y <= -1)
//src.loc = locate(src.x,src.y - 1,src.z)
src.y -= 1
src.pix_y += 32
src.pixel_y +=32
the bulk of the code... ignore the commented out parts... I'm just now curious, i can get the center of the screen to work just fine, but i want to be able to have a graphical display that works as well... confused.
mob
animate_movement=0

//to change camera use
src.client.pixel_y
src.client.pixel_x
//each square you walk try to reset them so they wont get higher than
//the max value and bug your camera
In response to Karffebon
animate movement... of course. Thank you so much! works flawlessly now! yay lag free pixel movement ^_^