11-08-2022, 05:47 PM
(11-08-2022, 04:11 PM)Pete Wrote: Nice. Without it, I'd probably just code:
Code: (Select All)INPUT CarX.position, CarY.position
speedx = 1
IF CarX.position - CarY.position THEN CarX.position = CarX.position + (CarX.position - CarY.position) / ABS(CarX.position - CarY.position) * speedx
PRINT CarX.position
SLEEP
CLS
RUN
Aye, you can always code around notusing it. Most commands are like that. Don't like _PRINTSTRING? Use LOCATE, PRINT, CSRLIN, and POS to duplicate its behavior.
One thing you have to admit though, comparing our two codes -- yours has a lot more to process going on under the hood. In a game, where FPS matters, that might might a world of difference if inside some inner loop.