I usually do something similar to YMM
if keyboard_check(vk_right) and cspeed < mspeed { cspeed += 0.5; }
if keyboard_check(vk_left) and cspeed > -mspeed { cspeed -= 0.5; }
repeat(abs(cspeed)) {
if place_free(x + sign( cspeed ),y) { x += sign( cspeed ); } else { cspeed = 0; }
}
cspeed is the current speed, mspeed is the maximum speed.
I then do something very similar to the code above for the vertical movement.
I find using your own variables and engine, rather then using v/hspeed works much more smoothly.
@ Xion:
I have experimented without using object either, and just having 'collisions' with tiles. It's possible, but requires a bit more work and almost never works as well without a lot of fine tuning.
In my opinion, it is overall a bit easier just to use objects.
is the best way to handle world building to use invisible bounding objects and just tile over them with pretty graphics?
Yeah, that is pretty much what I usually do. Even though it takes time to place the tiles AND the objects, it usually ends up being a bit smoother then just using tiles and having special 'collision' checking with them.