Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1945 simplified
#3
Regarding collision, "just" check if two images overlap. It's easier to understand if you draw some on a paper Smile

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
Reply


Messages In This Thread
1945 simplified - by 1micha.elok - 11-28-2023, 09:17 AM
RE: 1945 simplified - by Marcus - 11-28-2023, 04:46 PM
RE: 1945 simplified - by Marcus - 11-28-2023, 06:17 PM
RE: 1945 simplified - by 1micha.elok - 11-29-2023, 03:49 AM
RE: 1945 simplified - by Marcus - 11-29-2023, 06:01 PM
RE: 1945 simplified - by 1micha.elok - 12-20-2023, 10:18 AM
RE: 1945 simplified - by johnno56 - 11-28-2023, 09:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)