11-28-2023, 06:17 PM
Regarding collision, "just" check if two images overlap. It's easier to understand if you draw some on a paper
Code:
for x=0 to 2
dead = bulletX + width(2) > enemyX[x] and bulletX < enemyX[x] + width(3) and
bulletY + height(2) > enemyY[x] and bulletY < enemyY[x] + height(3)
if enemyY[x]>480 or dead then
enemyX[x]=rnd(640)
enemyY[x]=-rnd(50)
else
enemyY[x]=enemyY[x]+speed
endif
next