Author Topic: Wormhole  (Read 4068 times)

0 Members and 1 Guest are viewing this topic.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Wormhole
« on: July 09, 2019, 01:21:04 pm »
Hi all. I don't know if any of you remember this program from the 90's. But someone made this and posted it, I believe, to the newsgroup comp.lang.basic.misc back then. It shows a wormhole effect and 3D text. After I post the original, the next post on this thread will be what I did with it last night to make text like this in other programs. I think this was made by someone named Travis Schultz. I added the _FULLSCREEN at the top to see it better.

Code: QB64: [Select]
  1. LOCATE 24, 5
  2. COLOR 255
  3. PALETTE 255, 63 * 65536 + 63 * 256 + 63
  4. PRINT " PLEASE WAIT - INITIALIZING ";
  5. VIEW SCREEN(0, 0)-(319, 179)
  6. READ scr$
  7. linen = 1
  8. linep = 1
  9.  
  10. 'OUT 968, 0
  11. 'FOR i = 1 TO 765
  12. 'OUT 969, 0
  13. 'NEXT i
  14.  
  15. OUT 968, 12
  16. OUT 969, 63
  17. OUT 969, 0
  18. OUT 969, 0
  19. OUT 968, 9
  20. OUT 969, 0
  21. OUT 969, 0
  22. OUT 969, 63
  23. FOR a = 1 TO 62
  24.     FOR c = 0 TO 255
  25.         OUT &H3C7, c: r = INP(&H3C9): g = INP(&H3C9): b = INP(&H3C9)
  26.         IF r > 0 THEN r = r - 1
  27.         IF g > 0 THEN g = g - 1
  28.         IF b > 0 THEN b = b - 1
  29.         OUT &H3C8, c: OUT &H3C9, r: OUT &H3C9, g: OUT &H3C9, b
  30.     NEXT c
  31.     WAIT &H3DA, 8
  32. n = 0
  33. x = 5
  34. FOR I = 200 TO 40 STEP -1
  35.     n = n + 1
  36.     IF n = 6 THEN n = 1
  37.     x = x / 1.003
  38.     FOR j = 1 TO 10
  39.         CIRCLE (160, I), x, n, , , .5
  40.         x = x * 1.003
  41.     NEXT j
  42.  
  43. VIEW SCREEN(0, 0)-(319, 199)
  44.  
  45. DIM c(265)
  46. FOR I = 1 TO 6
  47.     c(I) = I * (63 / 6)
  48. FOR I = 7 TO 256
  49.     c(I) = 0
  50.  
  51. FOR I = 1 TO 49
  52.  
  53. LINE (0, 0)-(320, 10), 0, BF
  54.  
  55. LOCATE 1, 32
  56. PRINT "SCHULTZ"
  57. FOR I = 248 TO 320
  58.     FOR j = 0 TO 10
  59.         IF POINT(I, j) > 0 THEN LINE ((I - 196) * 2, j * 2 + 50)-((I - 196) * 2 + 2, j * 2 + 52), 15, BF
  60.     NEXT j
  61.  
  62. FOR I = 100 TO 220
  63.     FOR j = 49 TO 75
  64.         IF POINT(I, j) = 15 THEN GOTO skip2j
  65.         IF POINT(I + 1, j + 1) = 15 THEN PSET (I, j), 50
  66.         IF POINT(I, j + 1) = 15 OR POINT(I + 1, j) = 15 THEN PSET (I, j), 49
  67.         IF POINT(I - 1, j + 1) = 15 OR POINT(I + 1, j - 1) = 15 THEN PSET (I, j), 48
  68.         IF POINT(I, j - 1) = 15 OR POINT(I - 1, j) = 15 THEN PSET (I, j), 47
  69.         IF POINT(I - 1, j - 1) = 15 THEN PSET (I, j), 46
  70.         skip2j:
  71.     NEXT j
  72. FOR I = 100 TO 220
  73.     FOR j = 49 TO 75
  74.         IF POINT(I, j) = 15 THEN PSET (I, j), 32 - (j - 49)
  75.     NEXT j
  76.  
  77. FOR I = 1 TO 5
  78.     n = I * 12
  79.     c = n * 65536 + n * 256 + n
  80.     PALETTE I + 45, c
  81.  
  82. LINE (0, 0)-(320, 10), 0, BF
  83.  
  84. FOR I = 1 TO 50
  85.     r = I + 13
  86.     g = I - 1
  87.     c = g * 256 + r
  88.     PALETTE I + 150, c
  89.  
  90. FOR I = 0 TO 15
  91.     c = I * 4
  92.     n = c * 65536 + c * 256 + c
  93.     PALETTE I + 16, n
  94.  
  95. LOCATE 1, 12
  96. PRINT "TRAVIS"
  97. DIM ass(200, 8)
  98. GET (50, 0)-(250, 8), ass()
  99. LINE (50, 0)-(250, 8), 0, BF
  100. ax = 0
  101. av = 0
  102.  
  103. DIM text(312 * 8)
  104.  
  105.     OUT 968, 1
  106.     FOR j = 1 TO 5
  107.         OUT 969, c(j)
  108.         OUT 969, 0
  109.         OUT 969, 0
  110.     NEXT j
  111.  
  112.     PUT (ax, 0), ass(), PSET
  113.     ax = ax + av
  114.     IF ax < 50 THEN av = av + 1 ELSE av = av - 1
  115.  
  116.     b = c(5)
  117.     FOR j = 5 TO 2 STEP -1
  118.         c(j) = c(j - 1)
  119.     NEXT j
  120.     c(1) = b
  121.  
  122.     z = TIMER * 100
  123.     DO
  124.     LOOP WHILE TIMER * 100 - z < 1
  125.  
  126.     tm = tm + 1
  127.     IF tm < 3 THEN GOTO skip2l
  128.     GET (16, 180)-(311, 199), text()
  129.     PUT (8, 180), text(), PSET
  130.     LOCATE 24, 39
  131.     DO
  132.         at$ = MID$(scr$, linep, 1)
  133.         linep = linep + 1
  134.         IF linep > LEN(scr$) THEN
  135.             linep = 1
  136.             linen = linen + 1
  137.             IF linen > 16 THEN: linen = 1: RESTORE
  138.  
  139.         END IF
  140.         IF sl > ln THEN sl = 1
  141.         IF at$ = "*" THEN clr = 1
  142.         IF at$ = "@" THEN clr = 2
  143.         IF at$ = "#" THEN clr = 3
  144.         IF at$ = "$" THEN clr = 4
  145.         IF at$ = "%" THEN clr = 12
  146.         IF at$ = "^" THEN clr = 9
  147.         IF at$ = "&" THEN clr = 255
  148.     LOOP WHILE INSTR("*@#$%^&", at$) > 0
  149.     COLOR clr
  150.     PRINT at$;
  151.     tm = 1
  152.     skip2l:
  153.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
  154. 'If you are reading this, we told you about it!!!
  155.  
  156. DATA "  *P@R#O$G*R@A#M$E*D@ *B$Y* $M*Y"
  157.  
  158.  



Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Wormhole
« Reply #1 on: July 09, 2019, 01:22:56 pm »
Here is what I did with it last night. You type 1 word or 2 small words and it forms them into 3D text.  I might play around with this more and change colors, etc. if I can.

Edit: Here is a little bit better than what I first posted in the length of the word(s).

Code: QB64: [Select]
  1. 'Code from an old 1990's Internet Newsgroup post.
  2. INPUT "1 word here:", a$
  3. LOCATE 1, 32
  4. FOR I = 248 TO 420
  5.     FOR j = 0 TO 10
  6.         IF POINT(I, j) > 0 THEN LINE ((I - 196) * 2, j * 2 + 50)-((I - 196) * 2 + 2, j * 2 + 52), 15, BF
  7.     NEXT j
  8.  
  9. FOR I = 100 TO 420
  10.     FOR j = 49 TO 75
  11.         IF POINT(I, j) = 15 THEN GOTO skip2j
  12.         IF POINT(I + 1, j + 1) = 15 THEN PSET (I, j), 50
  13.         IF POINT(I, j + 1) = 15 OR POINT(I + 1, j) = 15 THEN PSET (I, j), 49
  14.         IF POINT(I - 1, j + 1) = 15 OR POINT(I + 1, j - 1) = 15 THEN PSET (I, j), 48
  15.         IF POINT(I, j - 1) = 15 OR POINT(I - 1, j) = 15 THEN PSET (I, j), 47
  16.         IF POINT(I - 1, j - 1) = 15 THEN PSET (I, j), 46
  17.         skip2j:
  18.     NEXT j
  19. FOR I = 100 TO 420
  20.     FOR j = 49 TO 75
  21.         IF POINT(I, j) = 15 THEN PSET (I, j), 32 - (j - 49)
  22.     NEXT j
  23.  
  24. FOR I = 1 TO 5
  25.     n = I * 12
  26.     c = n * 65536 + n * 256 + n
  27.     PALETTE I + 45, c
  28.  
  29. LINE (0, 0)-(320, 10), 0, BF
  30.  
  31.  
« Last Edit: July 09, 2019, 01:44:47 pm by SierraKen »