Author Topic: Animated Flip The Coin  (Read 4500 times)

0 Members and 1 Guest are viewing this topic.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Animated Flip The Coin
« on: July 15, 2020, 08:20:33 pm »
After all these years I finally decided to make an animated coin flipping program. :) It shows the coin flip up in the air and come down. I added a bit of gravity realism going up and down to make it look more real. But I spent most of the time drawing the sides of the coin, Heads and Tales. I went off of the U.S. Penny as a model and just used CIRCLE, LINE, and PSET commands. What do you all think? I hope you like it. The trickiest part was making the stairs on the monument building because of the 45 (or so) degree angle ends.

Code: QB64: [Select]
  1. 'Flip The Coin - By SierraKen
  2. 'Made on July 15, 2020.
  3.  
  4. SCREEN _NEWIMAGE(800, 600, 32)
  5. _TITLE "Flip The Coin - By SierraKen"
  6. _LIMIT 100
  7. start:
  8. LOCATE 2, 1
  9. INPUT "Press Enter To Flip Coin.", a$
  10. SOUND 200, .5
  11. x = 400: y = 450
  12. tt = .2
  13. yy = 10
  14. yy2 = 1
  15. FOR cc = 1 TO 2
  16.     FOR c = 1 TO 30
  17.         t = t + tt
  18.         IF t > 1 THEN tt = -.3
  19.         IF t < .2 THEN tt = .3
  20.         FOR sz = .25 TO 40 STEP .25
  21.             CIRCLE (x, y), sz, _RGB32(0, 100, 0), , , t
  22.         NEXT sz
  23.         y = y - yy
  24.         yy = yy + yy2
  25.         _DELAY .02
  26.         _DISPLAY
  27.         CLS
  28.     NEXT c
  29.     yy2 = -1
  30.     yy = -10
  31. NEXT cc
  32.  
  33. '-------------- Draw the outcome -----------------
  34. side = INT(RND * 2) + 1
  35. IF side = 1 THEN
  36.     FOR sz = .25 TO 40 STEP .25
  37.         CIRCLE (400, 450), sz, _RGB32(0, 100, 0)
  38.     NEXT sz
  39.     'Head
  40.     FOR sz = .25 TO 20 STEP .25
  41.         CIRCLE (400, 450), sz, _RGB32(0, 255, 0), , , 1.25
  42.     NEXT sz
  43.     'Eye
  44.     FOR sz = .25 TO 3 STEP .25
  45.         CIRCLE (390, 445), sz, _RGB32(0, 100, 0)
  46.     NEXT sz
  47.     'Nose
  48.     FOR sz = .25 TO 5 STEP .25
  49.         CIRCLE (382, 450), sz, _RGB32(0, 255, 0), , , .5
  50.     NEXT sz
  51.     'Mouth
  52.     FOR sz = .25 TO 5 STEP .25
  53.         CIRCLE (388, 457), sz, _RGB32(0, 100, 0), , , .5
  54.     NEXT sz
  55.     'Hair
  56.     FOR hy = 433 TO 455 STEP 3
  57.         FOR hx = 400 TO 420 STEP 3
  58.             IF POINT(hx, hy) = _RGB32(0, 255, 0) THEN CIRCLE (hx, hy), 2, _RGB32(0, 175, 0)
  59.         NEXT hx
  60.     NEXT hy
  61.  
  62. IF side = 2 THEN
  63.     FOR sz = .25 TO 40 STEP .25
  64.         CIRCLE (400, 450), sz, _RGB32(0, 100, 0)
  65.     NEXT sz
  66.     'Building
  67.     LINE (380, 440)-(420, 455), _RGB32(0, 255, 0), B
  68.     LINE (380, 455)-(370, 465), _RGB32(0, 255, 0)
  69.     LINE (420, 455)-(430, 465), _RGB32(0, 255, 0)
  70.     'Stairs
  71.     FOR sty = 455 TO 465 STEP 2
  72.         FOR stx = 369 TO 381
  73.             IF POINT(stx, sty) = _RGB32(0, 255, 0) THEN
  74.                 FOR stx2 = stx TO 430
  75.                     PSET (stx2, sty), _RGB32(0, 255, 0)
  76.                     IF POINT(stx2 + 1, sty) = _RGB32(0, 255, 0) THEN GOTO nex:
  77.                 NEXT stx2
  78.             END IF
  79.         NEXT stx
  80.         nex:
  81.     NEXT sty
  82.     LINE (370, 465)-(430, 465), _RGB32(0, 255, 0)
  83.     LINE (385, 440)-(415, 435), _RGB32(0, 255, 0), B
  84.     'Columns
  85.     xc = 380
  86.     FOR columns = 1 TO 12
  87.         xc = xc + 3.33
  88.         LINE (xc, 440)-(xc, 455), _RGB32(0, 255, 0)
  89.     NEXT columns
  90. GOTO start:
  91.  
« Last Edit: July 15, 2020, 10:50:47 pm by SierraKen »

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Animated Flip The Coin
« Reply #1 on: July 15, 2020, 10:36:04 pm »
Neat, @SierraKen.  Now when my wife tells me to quit playing with QB64 and cook dinner, I can flip her for it.

I added an edge around the coin to enhance the flipping effect.

- Dav

Code: QB64: [Select]
  1. 'Flip The Coin - By SierraKen
  2. 'Made on July 15, 2020.
  3.  
  4. SCREEN _NEWIMAGE(800, 600, 32)
  5. _TITLE "Flip The Coin - By SierraKen"
  6. _LIMIT 100
  7. start:
  8. LOCATE 2, 1
  9. INPUT "Press Enter To Flip Coin.", a$
  10. SOUND 200, .5
  11. x = 400: y = 450
  12. tt = .2
  13. yy = 10
  14. yy2 = 1
  15. FOR cc = 1 TO 2
  16.     FOR c = 1 TO 30
  17.         t = t + tt
  18.         IF t > 1 THEN tt = -.3
  19.         IF t < .2 THEN tt = .3
  20.         FOR sz = .25 TO 40 STEP .25
  21.             CIRCLE (x, y), sz, _RGB32(0, 255, 0), , , t
  22.             CIRCLE (x, y), sz - 1, _RGB32(0, 100, 0), , , t
  23.         NEXT sz
  24.         y = y - yy
  25.         yy = yy + yy2
  26.         _DELAY .02
  27.         _DISPLAY
  28.         CLS
  29.     NEXT c
  30.     yy2 = -1
  31.     yy = -10
  32. NEXT cc
  33.  
  34. '-------------- Draw the outcome -----------------
  35. side = INT(RND * 2) + 1
  36. IF side = 1 THEN
  37.     FOR sz = .25 TO 40 STEP .25
  38.         CIRCLE (400, 450), sz, _RGB32(0, 255, 0)
  39.         CIRCLE (400, 450), sz - 1, _RGB32(0, 100, 0)
  40.     NEXT sz
  41.     'Head
  42.     FOR sz = .25 TO 20 STEP .25
  43.         CIRCLE (400, 450), sz, _RGB32(0, 255, 0), , , 1.25
  44.     NEXT sz
  45.     'Eye
  46.     FOR sz = .25 TO 3 STEP .25
  47.         CIRCLE (390, 445), sz, _RGB32(0, 100, 0)
  48.     NEXT sz
  49.     'Nose
  50.     FOR sz = .25 TO 5 STEP .25
  51.         CIRCLE (382, 450), sz, _RGB32(0, 255, 0), , , .5
  52.     NEXT sz
  53.     'Mouth
  54.     FOR sz = .25 TO 5 STEP .25
  55.         CIRCLE (388, 457), sz, _RGB32(0, 100, 0), , , .5
  56.     NEXT sz
  57.     'Hair
  58.     FOR hy = 433 TO 455 STEP 3
  59.         FOR hx = 400 TO 420 STEP 3
  60.             IF POINT(hx, hy) = _RGB32(0, 255, 0) THEN CIRCLE (hx, hy), 2, _RGB32(0, 175, 0)
  61.         NEXT hx
  62.     NEXT hy
  63.  
  64. IF side = 2 THEN
  65.     FOR sz = .25 TO 40 STEP .25
  66.         CIRCLE (400, 450), sz, _RGB32(0, 255, 0)
  67.         CIRCLE (400, 450), sz - 1, _RGB32(0, 100, 0)
  68.     NEXT sz
  69.     'Building
  70.     LINE (380, 440)-(420, 455), _RGB32(0, 255, 0), B
  71.     LINE (380, 455)-(370, 465), _RGB32(0, 255, 0)
  72.     LINE (420, 455)-(430, 465), _RGB32(0, 255, 0)
  73.     'Stairs
  74.     FOR sty = 455 TO 465 STEP 2
  75.         FOR stx = 369 TO 381
  76.             IF POINT(stx, sty) = _RGB32(0, 255, 0) THEN
  77.                 FOR stx2 = stx TO 430
  78.                     PSET (stx2, sty), _RGB32(0, 255, 0)
  79.                     IF POINT(stx2 + 1, sty) = _RGB32(0, 255, 0) THEN GOTO nex:
  80.                 NEXT stx2
  81.             END IF
  82.         NEXT stx
  83.         nex:
  84.     NEXT sty
  85.     LINE (370, 465)-(430, 465), _RGB32(0, 255, 0)
  86.     LINE (385, 440)-(415, 435), _RGB32(0, 255, 0), B
  87.     'Columns
  88.     xc = 380
  89.     FOR columns = 1 TO 12
  90.         xc = xc + 3.33
  91.         LINE (xc, 440)-(xc, 455), _RGB32(0, 255, 0)
  92.     NEXT columns
  93. GOTO start:
  94.  

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Animated Flip The Coin
« Reply #2 on: July 15, 2020, 10:42:47 pm »
Looks neat Dav, I thought about doing that too, but never got around to it. I posted a video of my version on the first post.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Animated Flip The Coin
« Reply #3 on: July 15, 2020, 10:50:33 pm »
Actually I like yours better. Am going to delete the video.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Animated Flip The Coin
« Reply #4 on: July 15, 2020, 11:00:54 pm »
Nice.  I'm checking out your MAGIX Music Maker endeavors.   I played around with that program before too.  The Good times jazz one makes me want to whip out my flugelhorn to improv on.

- Dav

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Animated Flip The Coin
« Reply #5 on: July 15, 2020, 11:05:46 pm »
LOL GREAT!! Thank you for checking those out. I made those songs way back over 10 years ago on Windows XP. lol

Offline Ashish

  • Forum Resident
  • Posts: 630
  • Never Give Up!
    • View Profile
Re: Animated Flip The Coin
« Reply #6 on: July 15, 2020, 11:31:46 pm »
Nice Animation! ;)
if (Me.success) {Me.improve()} else {Me.tryAgain()}


My Projects - https://github.com/AshishKingdom?tab=repositories
OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Animated Flip The Coin
« Reply #7 on: July 15, 2020, 11:38:22 pm »
Thanks Ashish!

I just changed it so if you have to click the coin with the mouse to flip it. :) I also removed the irritating sound. lol Also, Dav I kept your ring idea but I changed your code so the ring doesn't have to be made dozens of times along with the coin-fill in the loop. I just added the ring outside of the loop so the computer doesn't have to deal with that. I also removed _DISPLAY because there's really no reason for it I found out and also it was blocking the rest of the program I think because of the mouse code loops or something.
Anyway, here is the updated version:

Code: QB64: [Select]
  1. 'Flip The Coin - By SierraKen
  2. 'Made on July 15, 2020.
  3. 'Thanks to Dav for the ring around the coin idea.
  4.  
  5. SCREEN _NEWIMAGE(800, 600, 32)
  6. _TITLE "Click the coin to flip it."
  7. _LIMIT 100
  8. x = 400: y = 450
  9. FOR sz = .25 TO 40 STEP .25
  10.     CIRCLE (x, y), sz, _RGB32(0, 100, 0)
  11. NEXT sz
  12. CIRCLE (x, y), 41, _RGB32(0, 255, 0)
  13. 'Building
  14. LINE (380, 440)-(420, 455), _RGB32(0, 255, 0), B
  15. LINE (380, 455)-(370, 465), _RGB32(0, 255, 0)
  16. LINE (420, 455)-(430, 465), _RGB32(0, 255, 0)
  17. 'Stairs
  18. FOR sty = 455 TO 465 STEP 2
  19.     FOR stx = 369 TO 381
  20.         IF POINT(stx, sty) = _RGB32(0, 255, 0) THEN
  21.             FOR stx2 = stx TO 430
  22.                 PSET (stx2, sty), _RGB32(0, 255, 0)
  23.                 IF POINT(stx2 + 1, sty) = _RGB32(0, 255, 0) THEN GOTO nex:
  24.             NEXT stx2
  25.         END IF
  26.     NEXT stx
  27.     nex:
  28. NEXT sty
  29. LINE (370, 465)-(430, 465), _RGB32(0, 255, 0)
  30. LINE (385, 440)-(415, 435), _RGB32(0, 255, 0), B
  31. 'Columns
  32. xc = 380
  33. FOR columns = 1 TO 12
  34.     xc = xc + 3.33
  35.     LINE (xc, 440)-(xc, 455), _RGB32(0, 255, 0)
  36. NEXT columns
  37.  
  38. start:
  39.         mouseX = _MOUSEX
  40.         mouseY = _MOUSEY
  41.         mouseLeftButton = _MOUSEBUTTON(1)
  42.     LOOP
  43.     IF mouseLeftButton THEN
  44.         IF POINT(mouseX, mouseY) <> _RGB32(0, 0, 0) THEN mouseLeftButton = 0: GOTO throw:
  45.     END IF
  46.  
  47.  
  48. throw:
  49. x = 400: y = 450
  50. tt = .2
  51. yy = 10
  52. yy2 = 1
  53. FOR cc = 1 TO 2
  54.     FOR c = 1 TO 30
  55.         t = t + tt
  56.         IF t > 1 THEN tt = -.3
  57.         IF t < .2 THEN tt = .3
  58.         FOR sz = .25 TO 40 STEP .25
  59.             CIRCLE (x, y), sz, _RGB32(0, 100, 0), , , t
  60.         NEXT sz
  61.         CIRCLE (x, y), 41, _RGB32(0, 255, 0), , , t
  62.         y = y - yy
  63.         yy = yy + yy2
  64.         _DELAY .02
  65.         CLS
  66.     NEXT c
  67.     yy2 = -1
  68.     yy = -10
  69. NEXT cc
  70.  
  71. '-------------- Draw the outcome -----------------
  72.  
  73. side = INT(RND * 2) + 1
  74.  
  75. IF side = 1 THEN
  76.     FOR sz = .25 TO 40 STEP .25
  77.         CIRCLE (x, y), sz, _RGB32(0, 100, 0)
  78.     NEXT sz
  79.     CIRCLE (x, y), 41, _RGB32(0, 255, 0)
  80.     'Head
  81.     FOR sz = .25 TO 20 STEP .25
  82.         CIRCLE (400, 450), sz, _RGB32(0, 255, 0), , , 1.25
  83.     NEXT sz
  84.     'Eye
  85.     FOR sz = .25 TO 3 STEP .25
  86.         CIRCLE (390, 445), sz, _RGB32(0, 100, 0)
  87.     NEXT sz
  88.     'Nose
  89.     FOR sz = .25 TO 5 STEP .25
  90.         CIRCLE (382, 450), sz, _RGB32(0, 255, 0), , , .5
  91.     NEXT sz
  92.     'Mouth
  93.     FOR sz = .25 TO 5 STEP .25
  94.         CIRCLE (388, 457), sz, _RGB32(0, 100, 0), , , .5
  95.     NEXT sz
  96.     'Hair
  97.     FOR hy = 433 TO 455 STEP 3
  98.         FOR hx = 400 TO 420 STEP 3
  99.             IF POINT(hx, hy) = _RGB32(0, 255, 0) THEN CIRCLE (hx, hy), 2, _RGB32(0, 175, 0)
  100.         NEXT hx
  101.     NEXT hy
  102.  
  103. IF side = 2 THEN
  104.     FOR sz = .25 TO 40 STEP .25
  105.         CIRCLE (x, y), sz, _RGB32(0, 100, 0)
  106.     NEXT sz
  107.     CIRCLE (x, y), 41, _RGB32(0, 255, 0)
  108.     'Building
  109.     LINE (380, 440)-(420, 455), _RGB32(0, 255, 0), B
  110.     LINE (380, 455)-(370, 465), _RGB32(0, 255, 0)
  111.     LINE (420, 455)-(430, 465), _RGB32(0, 255, 0)
  112.     'Stairs
  113.     FOR sty = 455 TO 465 STEP 2
  114.         FOR stx = 369 TO 381
  115.             IF POINT(stx, sty) = _RGB32(0, 255, 0) THEN
  116.                 FOR stx2 = stx TO 430
  117.                     PSET (stx2, sty), _RGB32(0, 255, 0)
  118.                     IF POINT(stx2 + 1, sty) = _RGB32(0, 255, 0) THEN GOTO nex2:
  119.                 NEXT stx2
  120.             END IF
  121.         NEXT stx
  122.         nex2:
  123.     NEXT sty
  124.     LINE (370, 465)-(430, 465), _RGB32(0, 255, 0)
  125.     LINE (385, 440)-(415, 435), _RGB32(0, 255, 0), B
  126.     'Columns
  127.     xc = 380
  128.     FOR columns = 1 TO 12
  129.         xc = xc + 3.33
  130.         LINE (xc, 440)-(xc, 455), _RGB32(0, 255, 0)
  131.     NEXT columns
  132. GOTO start:
  133.  

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Animated Flip The Coin
« Reply #8 on: July 16, 2020, 03:00:28 pm »
I just added spinning the coin as an option. To toss the coin in the air, you left click it, to spin the coin you right click it.

Code: QB64: [Select]
  1. 'Flip The Coin - By SierraKen
  2. 'Made on July 16, 2020.
  3. 'Thanks to Dav for the ring around the coin idea.
  4.  
  5. SCREEN _NEWIMAGE(800, 600, 32)
  6. _TITLE "Left Click the coin to flip it in the air. Right Click the coin to spin it."
  7. _LIMIT 100
  8. x = 400: y = 450
  9. FOR sz = .25 TO 40 STEP .25
  10.     CIRCLE (x, y), sz, _RGB32(0, 100, 0)
  11. NEXT sz
  12. CIRCLE (x, y), 41, _RGB32(0, 255, 0)
  13. 'Building
  14. LINE (380, 440)-(420, 455), _RGB32(0, 255, 0), B
  15. LINE (380, 455)-(370, 465), _RGB32(0, 255, 0)
  16. LINE (420, 455)-(430, 465), _RGB32(0, 255, 0)
  17. 'Stairs
  18. FOR sty = 455 TO 465 STEP 2
  19.     FOR stx = 369 TO 381
  20.         IF POINT(stx, sty) = _RGB32(0, 255, 0) THEN
  21.             FOR stx2 = stx TO 430
  22.                 PSET (stx2, sty), _RGB32(0, 255, 0)
  23.                 IF POINT(stx2 + 1, sty) = _RGB32(0, 255, 0) THEN GOTO nex:
  24.             NEXT stx2
  25.         END IF
  26.     NEXT stx
  27.     nex:
  28. NEXT sty
  29. LINE (370, 465)-(430, 465), _RGB32(0, 255, 0)
  30. LINE (385, 440)-(415, 435), _RGB32(0, 255, 0), B
  31. 'Columns
  32. xc = 380
  33. FOR columns = 1 TO 12
  34.     xc = xc + 3.33
  35.     LINE (xc, 440)-(xc, 455), _RGB32(0, 255, 0)
  36. NEXT columns
  37.  
  38. start:
  39.         mouseX = _MOUSEX
  40.         mouseY = _MOUSEY
  41.         mouseLeftButton = _MOUSEBUTTON(1)
  42.         mouseRightButton = _MOUSEBUTTON(2)
  43.     LOOP
  44.     IF mouseRightButton THEN
  45.         IF POINT(mouseX, mouseY) <> _RGB32(0, 0, 0) THEN mouseRightButton = 0: GOTO spin:
  46.     END IF
  47.  
  48.     IF mouseLeftButton THEN
  49.         IF POINT(mouseX, mouseY) <> _RGB32(0, 0, 0) THEN mouseLeftButton = 0: GOTO throw:
  50.     END IF
  51.  
  52. spin:
  53.  
  54. x = 400: y = 450
  55. tt = 1
  56. yy = 10
  57. FOR cc = 1 TO 2
  58.     FOR c = 1 TO 25
  59.         t = t + tt
  60.         IF t > 2 THEN tt = -.2
  61.         IF t < 1 THEN tt = .2
  62.         FOR sz = .25 TO 40 STEP .25
  63.             CIRCLE (x, y), sz, _RGB32(0, 100, 0), , , t
  64.         NEXT sz
  65.         CIRCLE (x, y), 41, _RGB32(0, 255, 0), , , t
  66.         x = x - yy
  67.         _DELAY .02
  68.         CLS
  69.     NEXT c
  70.     yy = -10
  71. NEXT cc
  72. FOR cc = 1 TO 2
  73.     FOR c = 1 TO 25
  74.         t = t + tt
  75.         IF t > 2 THEN tt = -.2
  76.         IF t < 1 THEN tt = .2
  77.         FOR sz = .25 TO 40 STEP .25
  78.             CIRCLE (x, y), sz, _RGB32(0, 100, 0), , , t
  79.         NEXT sz
  80.         CIRCLE (x, y), 41, _RGB32(0, 255, 0), , , t
  81.         x = x - yy
  82.         _DELAY .02
  83.         CLS
  84.     NEXT c
  85.     yy = 10
  86. NEXT cc
  87.  
  88.  
  89.  
  90. GOTO outcome:
  91.  
  92. throw:
  93. x = 400: y = 450
  94. tt = .2
  95. yy = 10
  96. yy2 = 1
  97. FOR cc = 1 TO 2
  98.     FOR c = 1 TO 30
  99.         t = t + tt
  100.         IF t > 1 THEN tt = -.3
  101.         IF t < .2 THEN tt = .3
  102.         FOR sz = .25 TO 40 STEP .25
  103.             CIRCLE (x, y), sz, _RGB32(0, 100, 0), , , t
  104.         NEXT sz
  105.         CIRCLE (x, y), 41, _RGB32(0, 255, 0), , , t
  106.         y = y - yy
  107.         yy = yy + yy2
  108.         _DELAY .02
  109.         CLS
  110.     NEXT c
  111.     yy2 = -1
  112.     yy = -10
  113. NEXT cc
  114.  
  115. '-------------- Draw the outcome -----------------
  116.  
  117. outcome:
  118. side = INT(RND * 2) + 1
  119.  
  120. IF side = 1 THEN
  121.     FOR sz = .25 TO 40 STEP .25
  122.         CIRCLE (x, y), sz, _RGB32(0, 100, 0)
  123.     NEXT sz
  124.     CIRCLE (x, y), 41, _RGB32(0, 255, 0)
  125.     'Head
  126.     FOR sz = .25 TO 20 STEP .25
  127.         CIRCLE (400, 450), sz, _RGB32(0, 255, 0), , , 1.25
  128.     NEXT sz
  129.     'Eye
  130.     FOR sz = .25 TO 3 STEP .25
  131.         CIRCLE (390, 445), sz, _RGB32(0, 100, 0)
  132.     NEXT sz
  133.     'Nose
  134.     FOR sz = .25 TO 5 STEP .25
  135.         CIRCLE (382, 450), sz, _RGB32(0, 255, 0), , , .5
  136.     NEXT sz
  137.     'Mouth
  138.     FOR sz = .25 TO 5 STEP .25
  139.         CIRCLE (388, 457), sz, _RGB32(0, 100, 0), , , .5
  140.     NEXT sz
  141.     'Hair
  142.     FOR hy = 433 TO 455 STEP 3
  143.         FOR hx = 400 TO 420 STEP 3
  144.             IF POINT(hx, hy) = _RGB32(0, 255, 0) THEN CIRCLE (hx, hy), 2, _RGB32(0, 175, 0)
  145.         NEXT hx
  146.     NEXT hy
  147.  
  148. IF side = 2 THEN
  149.     FOR sz = .25 TO 40 STEP .25
  150.         CIRCLE (x, y), sz, _RGB32(0, 100, 0)
  151.     NEXT sz
  152.     CIRCLE (x, y), 41, _RGB32(0, 255, 0)
  153.     'Building
  154.     LINE (380, 440)-(420, 455), _RGB32(0, 255, 0), B
  155.     LINE (380, 455)-(370, 465), _RGB32(0, 255, 0)
  156.     LINE (420, 455)-(430, 465), _RGB32(0, 255, 0)
  157.     'Stairs
  158.     FOR sty = 455 TO 465 STEP 2
  159.         FOR stx = 369 TO 381
  160.             IF POINT(stx, sty) = _RGB32(0, 255, 0) THEN
  161.                 FOR stx2 = stx TO 430
  162.                     PSET (stx2, sty), _RGB32(0, 255, 0)
  163.                     IF POINT(stx2 + 1, sty) = _RGB32(0, 255, 0) THEN GOTO nex2:
  164.                 NEXT stx2
  165.             END IF
  166.         NEXT stx
  167.         nex2:
  168.     NEXT sty
  169.     LINE (370, 465)-(430, 465), _RGB32(0, 255, 0)
  170.     LINE (385, 440)-(415, 435), _RGB32(0, 255, 0), B
  171.     'Columns
  172.     xc = 380
  173.     FOR columns = 1 TO 12
  174.         xc = xc + 3.33
  175.         LINE (xc, 440)-(xc, 455), _RGB32(0, 255, 0)
  176.     NEXT columns
  177. GOTO start:
  178.