Why am I getting this B.S

Blitz3D Forums/Blitz3D Programming/Why am I getting this B.S

EpicElrod(Posted 2015) [#1]
I am testing some sprites for a game, and I am running into some crap. This is the code:

Graphics 1600, 900, 16, 1

img_lady=LoadAnimImage( "lady2.png",42,32,0,3 )
MaskImage img_lady,255,255,255

time = CreateTimer(10)

frame = 0
y = 200

SetBuffer BackBuffer()

;Loop
While Not KeyDown( 1 )

Cls

DrawImage img_lady,y,200,frame

frame = frame + 1
If frame => 3 Then frame = 0

y = y + 15
WaitTimer time
Flip

Wend
;Loop End

End

I am trying to get the lady to walk DOWN the screen facing ME, an This is happening:https://www.flickr.com/photos/133563178@N07/18974633160/in/datetaken/

She is supposed to walk down the screen, but she jumps up and down, along the positive X axis, with more than half of her body obscured. Why?


Flanker512(Posted 2015) [#2]
Hi, you inverted x and y when you draw the image :
DrawImage img_lady,y,200,frame

Should be :
DrawImage img_lady,200,y,frame


If your image appears to be cropped it's because of the parameters when you load the anim image :
img_lady=LoadAnimImage( "lady2.png",42,32,0,3 )


42 and 32 are propably wrong, check the help about this command or eventually, share your image.


Matty(Posted 2015) [#3]
Typically with computers the old adage is garbage in garbage out....


EpicElrod(Posted 2015) [#4]
Thank you. And matty, that's not funny.


RemiD(Posted 2015) [#5]

the old adage is garbage in garbage out


:D


stayne(Posted 2015) [#6]
I am trying to get the lady to walk DOWN the screen facing ME


Try waving some cash in the air