Author Topic: Find The Test Signal On The TV Game!  (Read 1356 times)

0 Members and 1 Guest are viewing this topic.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Find The Test Signal On The TV Game!
« on: June 19, 2020, 01:14:10 am »
Find The Test Signal On The TV Game!
Move your mouse around on the screen like you are moving your antenna.
After you find it, press the left mouse button to find it again!
Just like the "Good 'Ol Days!"
There's no points but it's like a TV simulator. Does it remind you of your youth? :D

Code: QB64: [Select]
  1. 'Find The Test Signal On The TV Game!
  2. 'Move your mouse around on the screen like you are moving your antenna.
  3. 'After you find it, press the left mouse button to find it again!
  4. 'Just like the "Good 'Ol Days!"
  5. '
  6. 'By Sierraken on June 18, 2020.
  7. '
  8. _TITLE "Find the test signal by moving your mouse (antenna) around. Left mouse button to find another one."
  9. SCREEN _NEWIMAGE(800, 600, 32)
  10. t = 20
  11. lx = INT(RND * 800) + 1
  12. ly = INT(RND * 600) + 1
  13.     mouseWheel = 0
  14.         mouseX = _MOUSEX
  15.         mouseY = _MOUSEY
  16.         mouseLeftButton = _MOUSEBUTTON(1)
  17.         mouseRightButton = _MOUSEBUTTON(2)
  18.         mouseMiddleButton = _MOUSEBUTTON(3)
  19.         mouseWheel = mouseWheel + _MOUSEWHEEL
  20.         IF mouseLeftButton = -1 THEN
  21.             lx = INT(RND * 800) + 1
  22.             ly = INT(RND * 600) + 1
  23.         END IF
  24.     LOOP
  25.     fx3 = (mouseX + mouseY) / 100
  26.     IF mouseX > lx - 100 AND mouseX < lx + 100 AND mouseY > ly - 100 AND mouseY < ly + 100 THEN
  27.         LINE (50, 50)-(750, 550), _RGB32(255, 255, 255), BF
  28.         FOR lines = 0 TO 700 STEP 100
  29.             IF lines = 100 THEN c = _RGB32(255, 255, 255)
  30.             IF lines = 200 THEN c = _RGB32(255, 255, 127)
  31.             IF lines = 300 THEN c = _RGB32(127, 255, 255)
  32.             IF lines = 400 THEN c = _RGB32(0, 255, 0)
  33.             IF lines = 500 THEN c = _RGB32(255, 127, 255)
  34.             IF lines = 600 THEN c = _RGB32(255, 0, 0)
  35.             IF lines = 700 THEN c = _RGB32(75, 75, 255)
  36.             LINE (lines, 200)-(lines + 100, 400), c, BF
  37.         NEXT lines
  38.     END IF
  39.     fx2 = fx2 + 1
  40.     IF fx2 > 5 THEN fx2 = 1
  41.     FOR fy = 50 TO 550
  42.         FOR fx = 50 TO 750
  43.             IF tt = 0 THEN t = t + 1
  44.             IF t > 10 THEN tt = 1
  45.             IF tt = 1 THEN t = t - 1
  46.             IF t < -10 THEN tt = 0
  47.             PSET ((SIN(fy * fx3 / fx2) * t) + fx, (SIN(fx * fx3 / fx2) * t) + fy), _RGB32(200, 200, 200)
  48.         NEXT fx
  49.     NEXT fy
  50.     FOR tv = 0 TO 50
  51.         LINE (50 - tv, 50 - tv)-(750 + tv, 550 + tv), _RGB32(150, 127, 0), B
  52.     NEXT tv
  53.     FOR sz = .25 TO 17 STEP .25
  54.         CIRCLE (650, 575), sz, _RGB32(100, 100, 100)
  55.         CIRCLE (700, 575), sz, _RGB32(100, 100, 100)
  56.     NEXT sz
  57.     _DISPLAY
  58.     CLS
  59.     a$ = INKEY$
  60.     IF a$ = CHR$(27) THEN END
  61.  

Offline Ashish

  • Forum Resident
  • Posts: 630
  • Never Give Up!
    • View Profile
Re: Find The Test Signal On The TV Game!
« Reply #1 on: June 19, 2020, 01:52:10 am »
Very nice! I thought after finding the correct signal, it will play Tom n Jerry. :)
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 bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Find The Test Signal On The TV Game!
« Reply #2 on: June 19, 2020, 02:19:16 am »
Hey!

What's this.PNG
* What's this.PNG (Filesize: 122.99 KB, Dimensions: 805x627, Views: 264)
btv signing off.PNG
* btv signing off.PNG (Filesize: 123.15 KB, Dimensions: 806x631, Views: 238)
« Last Edit: June 19, 2020, 02:27:40 am by bplus »

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: Find The Test Signal On The TV Game!
« Reply #3 on: June 19, 2020, 07:18:58 am »
That's pretty amazing.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Find The Test Signal On The TV Game!
« Reply #4 on: June 19, 2020, 11:24:20 am »
One could demo screen shots from all or many of their programs on a bTV :-))

Maybe Ken can figure it out from this code:
Code: QB64: [Select]
  1. 'Find The Test Signal On The TV Game!
  2. 'Move your mouse around on the screen like you are moving your antenna.
  3. 'After you find it, press the left mouse button to find it again!
  4. 'Just like the "Good 'Ol Days!"
  5. '
  6. 'By Sierraken on June 18, 2020. B+ Mod for images 2020-06-19 AM
  7. '
  8. _TITLE "Find the test signal by moving your mouse (antenna) around. Left mouse button to find another one."
  9. SCREEN _NEWIMAGE(800, 600, 32)
  10. howManyDoYouHave = 1 'for now
  11. DIM btv&(1 TO howManyDoYouHave)
  12. btv&(1) = _LOADIMAGE("US flag.png")
  13.  
  14.  
  15. t = 20
  16. lx = INT(RND * 800) + 1
  17. ly = INT(RND * 600) + 1
  18.     mouseWheel = 0
  19.         mouseX = _MOUSEX
  20.         mouseY = _MOUSEY
  21.         mouseLeftButton = _MOUSEBUTTON(1)
  22.         mouseRightButton = _MOUSEBUTTON(2)
  23.         mouseMiddleButton = _MOUSEBUTTON(3)
  24.         mouseWheel = mouseWheel + _MOUSEWHEEL
  25.         IF mouseLeftButton = -1 THEN
  26.             lx = INT(RND * 800) + 1
  27.             ly = INT(RND * 600) + 1
  28.         END IF
  29.     LOOP
  30.     fx3 = (mouseX + mouseY) / 100
  31.     IF mouseX > lx - 100 AND mouseX < lx + 100 AND mouseY > ly - 100 AND mouseY < ly + 100 THEN
  32.  
  33.         'decide how to get integer from 1 to howManyDoYouHave
  34.         img = 1 ' for 1 image     need formula for many images from mouse and or button clicking of tv buttons
  35.  
  36.         _PUTIMAGE (50, 50)-(750, 550), btv&(img), 0
  37.     END IF
  38.     fx2 = fx2 + 1
  39.     IF fx2 > 5 THEN fx2 = 1
  40.     FOR fy = 50 TO 550
  41.         FOR fx = 50 TO 750
  42.             IF tt = 0 THEN t = t + 1
  43.             IF t > 10 THEN tt = 1
  44.             IF tt = 1 THEN t = t - 1
  45.             IF t < -10 THEN tt = 0
  46.             PSET ((SIN(fy * fx3 / fx2) * t) + fx, (SIN(fx * fx3 / fx2) * t) + fy), _RGB32(200, 200, 200)
  47.         NEXT fx
  48.     NEXT fy
  49.     FOR tv = 0 TO 50
  50.         LINE (50 - tv, 50 - tv)-(750 + tv, 550 + tv), _RGB32(150, 127, 0), B
  51.     NEXT tv
  52.     FOR sz = .25 TO 17 STEP .25
  53.         CIRCLE (650, 575), sz, _RGB32(100, 100, 100)
  54.         CIRCLE (700, 575), sz, _RGB32(100, 100, 100)
  55.     NEXT sz
  56.     _DISPLAY
  57.     CLS
  58.     a$ = INKEY$
  59.     IF a$ = CHR$(27) THEN END
  60.  
  61.  
  62.  
« Last Edit: June 19, 2020, 11:53:55 am by bplus »