08-10-2007, 05:22 PM
Well what you can do is run a loop through every pixel he moves through instead of just moving one pixel at a time. For instance:
Pixel collision, though - badass. Wish I could say I was doing the same. I had to go for grid-based attributes (ie collision) since the server has to be able to process it quickly if I want it to run at any decent speed.
How are you drawing? BitBlt? I just saw a little tearing so I figured it wasn't DirectX.
Seconded.
Code:
Dim StartX as long
Dim ToX as long
Dim i as long
'Move right
for i = StartX to X
if GetPixel(i, UserY) = RGB(0,0,0) Then
'The user stops here
ToX = i
Exit For
end if
next i
UserX = ToX
Pixel collision, though - badass. Wish I could say I was doing the same. I had to go for grid-based attributes (ie collision) since the server has to be able to process it quickly if I want it to run at any decent speed.
How are you drawing? BitBlt? I just saw a little tearing so I figured it wasn't DirectX.
William Wrote:Working on detection and thats a biatch
Seconded.