# UFO Fleet

4

-SkyLock24- 2021-02-17 20:49

2021-02-17 20:49

-SkyLock24- 2021-02-17 20:50

was8bit 2021-02-17 21:25

Very inspirational :) i made a tweaked version....

2021-02-17 21:25

-SkyLock24- 2021-02-17 22:04

@8bit - woah! How do you make them move that smoothly!

was8bit 2021-02-17 23:01

Wait 1 (or wait vbl) pauses the screen for 1/60 of second... i sped up the movement with

W=(W+1) MOD 10
IF W=0 THEN WAIT 1

Which speeds things up 10x..

was8bit 2021-02-17 23:03

Actually your wait and my wait are both inside the spaceship loop .. so it forces a wait for each spaceship...

It would proably better to do this...

FOR I=0 TO 63
SPRITE I, SPRITEX(I), SPRITEY(I),1
IF LEFT(0) THEN MOVE=-5 ELSE IF RIGHT(0) THEN MOVE=5 ELSE MOVE=0
IF UP(0) THEN MOVEY=-5 ELSE IF DOWN(0) THEN MOVEY=5 ELSE MOVEY=0
SPRITEX(I)=SPRITEX(I)+MOVE
SPRITEY(I)=SPRITEY(I)+MOVEY
NEXT I
WAIT 1

was8bit 2021-02-17 23:08

Timing can be handled in different ways... but inside a DO LOOP with a single WAIT VBL is best practice... this allows you to slow different things at different speeds by adding a

W=(W+1) MOD 10
IF W=0 THEN
... do stuff at a slower speed...
END IF