DBP features a curve value command that translates values in a smooth curved fashion, thus it interpolates, no mater how fast the initial movement; thus reducing the delay:
x# = CurveValue( targetX#, x#, delay# ) ` Delay (or as stated by the documentation: 'speed') must be the value of 1 or more; where 1 is instant.
So from these facts you can move a sprite to a mouse location smoothly using floating point variables and a loop, as shown here:
Type Entity
X#
Y#
TargetX#
TargetY#
MoveDelay#
Image
EndType
Item as Entity
Item.MoveDelay# = 10 ` Any value of 1 or above
Do
` Set the target coordinates to where the sprite must move
If MouseClick() && 2 ` If Mouse Button two was clicked
Item.TargetX# = MouseX() : Item.TargetY# = MouseY()
EndIf
` Move x and y floating point values smoothly
Item.X# = CurveValue( Item.TargetX#, Item.X#, Item.Delay# )
Item.Y# = CurveValue( Item.TargetY#, Item.Y#, Item.Delay# )
` Assuming entity image exists and the sprite shares the same ID
Sprite Item.Image, Item.X#, Item.Y#, Item.Image
Loop
The floating point coordinates can be clamped near the target; and the state or event which depends on distance from target can be finalized.
The exact position of the entity is retained in the variable, however the visual uses the nearest pixel to the more precise floating point location, as is the case with DBP's 3D objects.