Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CloudZimmermann

Pages: [1]
1
I had a wonderful time exploring the world of color palettes in screen mode 0 while on my vacation. This collection of programs attempts to recreate the look of several popular installers and setup programs. They are an artistic exploration to rediscover the how and why developers created the final appearance of these programs.

Enjoy!
PS> Thank you [banned user] for sharing your art! It was inspiring and I lost part of my vacation delving into this because of you!

2
Programs / Star Parallax Screensavers (Vertical / Horizontal)
« on: May 16, 2020, 05:00:30 pm »
Programs: Star Parallax Screensavers (Vertical / Horizontal)
Created: May 16th, 2020
Creator: Cloud Zimmermann



Code: QB64: [Select]
  1. ' Program: Star Parallax Screensaver (Vertical)
  2. ' Created: May 16th, 2020
  3. ' Creator: Cloud Zimmermann
  4.  
  5. SCREEN 7, 1, 0, 1
  6.  
  7. CONST screenWidth% = 320
  8. CONST screenHeight% = 200
  9. CONST count% = 200
  10. DIM SHARED stars%(count%, 5)
  11.  
  12. FOR i% = 1 TO count% - 1
  13.     CALL resetStar(i%, 1)
  14. NEXT i%
  15.  
  16.     CLS
  17.     FOR i% = 1 TO count% - 1
  18.         IF stars%(i%, 2) > screenHeight% THEN
  19.             CALL resetStar(i%, 0)
  20.         ELSE
  21.             stars%(i%, 2) = stars%(i%, 2) + stars%(i%, 3)
  22.         END IF
  23.         PSET (stars%(i%, 1), stars%(i%, 2)), stars%(i%, 4)
  24.     NEXT i%
  25.     PCOPY 0, 1
  26.     _LIMIT 60
  27.  
  28. SUB resetStar (starSelected%, init%)
  29.     IF init% = 1 THEN
  30.         stars%(starSelected%, 2) = INT(RND * screenHeight%) + 1
  31.     ELSE
  32.         stars%(starSelected%, 2) = 1
  33.     END IF
  34.  
  35.     stars%(starSelected%, 1) = INT(RND * screenWidth%) + 1
  36.     stars%(starSelected%, 3) = INT(RND * 3) + 1
  37.  
  38.     SELECT CASE INT(RND * 3) + 1
  39.         CASE 1
  40.             stars%(starSelected%, 4) = 15
  41.         CASE 2
  42.             stars%(starSelected%, 4) = 7
  43.         CASE ELSE
  44.             stars%(starSelected%, 4) = 8
  45.     END SELECT
  46.  
  47.  

Code: QB64: [Select]
  1. ' Program: Star Parallax Screensaver (Horizontal)
  2. ' Created: May 16th, 2020
  3. ' Creator: Cloud Zimmermann
  4.  
  5. SCREEN 7, 1, 0, 1
  6.  
  7. CONST screenWidth% = 320
  8. CONST screenHeight% = 200
  9. CONST count% = 200
  10. DIM SHARED stars%(count%, 5)
  11.  
  12. FOR i% = 1 TO count% - 1
  13.     CALL resetStar(i%, 1)
  14. NEXT i%
  15.  
  16.     CLS
  17.     FOR i% = 1 TO count% - 1
  18.         IF stars%(i%, 1) > screenWidth% THEN
  19.             CALL resetStar(i%, 0)
  20.         ELSE
  21.             stars%(i%, 1) = stars%(i%, 1) + stars%(i%, 3)
  22.         END IF
  23.         PSET (stars%(i%, 1), stars%(i%, 2)), stars%(i%, 4)
  24.     NEXT i%
  25.     PCOPY 0, 1
  26.     _LIMIT 60
  27.  
  28. SUB resetStar (starSelected%, init%)
  29.     IF init% = 1 THEN
  30.         stars%(starSelected%, 1) = INT(RND * screenWidth%) + 1
  31.     ELSE
  32.         stars%(starSelected%, 1) = 1
  33.     END IF
  34.  
  35.     stars%(starSelected%, 2) = INT(RND * screenHeight%) + 1
  36.     stars%(starSelected%, 3) = INT(RND * 3) + 1
  37.  
  38.     SELECT CASE INT(RND * 3) + 1
  39.         CASE 1
  40.             stars%(starSelected%, 4) = 15
  41.         CASE 2
  42.             stars%(starSelected%, 4) = 7
  43.         CASE ELSE
  44.             stars%(starSelected%, 4) = 8
  45.     END SELECT
  46.  
  47.  

3
Programs / Stars w/ Time Screensaver
« on: May 15, 2020, 03:11:36 pm »
Program: Stars w/ Time Screensaver
Creator:  Cloud Zimmermann
Date:      1/7/2020

Code: QB64: [Select]
  1. ' Program: Stars w/ Time
  2. ' Creator: Cloud Zimmermann
  3. ' Created: 1/7/2020
  4.  
  5. DECLARE SUB DrawDigit (d AS INTEGER, p AS INTEGER, x AS INTEGER, y AS INTEGER)
  6. DECLARE SUB DrawClock (clock AS ANY)
  7. SCREEN 7, 0, 0, 1
  8.  
  9. quit% = 0
  10.  
  11. TYPE StarType
  12.     x AS INTEGER
  13.     y AS INTEGER
  14.     z AS INTEGER
  15.     c AS INTEGER
  16.  
  17. TYPE ClockType
  18.     x AS INTEGER
  19.     y AS INTEGER
  20.     t AS STRING * 12
  21.     c AS INTEGER
  22.     dx AS INTEGER
  23.     dy AS INTEGER
  24.  
  25. DIM clock AS ClockType
  26. clock.x = 5
  27. clock.y = 5
  28. clock.c = 8
  29. clock.dx = 1
  30. clock.dy = 1
  31.  
  32. count% = 30
  33.  
  34. DIM Star(1 TO count%) AS StarType
  35.  
  36. FOR i% = 1 TO count%
  37.     Star(i%).x = INT(RND * 320) + 1
  38.     Star(i%).y = INT(RND * 200) + 1
  39.     Star(i%).z = INT(RND * 4) + INT(RND * 1) + 1
  40.     Star(i%).c = INT(RND * 16) + 1
  41. NEXT i%
  42.  
  43.  
  44.  
  45. WHILE quit% = 0
  46.     CLS
  47.     IF INKEY$ <> "" THEN quit% = 1
  48.  
  49.     FOR i% = 1 TO count%
  50.         Star(i%).y = Star(i%).y + Star(i%).z
  51.         PSET (Star(i%).x, Star(i%).y), Star(i%).c
  52.         IF Star(i%).y > 200 THEN Star(i%).y = Star(i%).y - 200
  53.     NEXT i%
  54.  
  55.     'LOCATE 5, 5: COLOR 3
  56.     'PRINT TIME$
  57.  
  58.     CALL DrawClock(clock)
  59.  
  60.     PCOPY 0, 1
  61.     _LIMIT 60
  62.  
  63.  
  64. SUB DrawClock (clock AS ClockType)
  65.     clock.x = clock.x + clock.dx
  66.     clock.y = clock.y + clock.dy
  67.  
  68.     tmp$ = TIME$
  69.     FOR pointer% = 1 TO LEN(tmp$)
  70.         digit% = VAL(MID$(tmp$, pointer%, 1))
  71.         CALL DrawDigit(digit%, pointer%, clock.x, clock.y)
  72.     NEXT pointer%
  73.  
  74.     'PSET (clock.x, clock.y), clock.c
  75.  
  76.     IF clock.x <= 0 OR clock.x >= 320 - 46 THEN clock.dx = -clock.dx
  77.     IF clock.y <= 0 OR clock.y >= 200 - 6 THEN clock.dy = -clock.dy
  78.  
  79. SUB DrawDigit (d AS INTEGER, p AS INTEGER, x AS INTEGER, y AS INTEGER)
  80.     tmp$ = "BC11M" + STR$(x) + "," + STR$(y) + " BM+" + STR$(5 * p) + ",0"
  81.     IF d = 1 THEN tmp$ = tmp$ + "BM+3,0D4"
  82.     IF d = 2 THEN tmp$ = tmp$ + "R3D2L3D2R3"
  83.     IF d = 3 THEN tmp$ = tmp$ + "R3D2L3R3D2L3"
  84.     IF d = 4 THEN tmp$ = tmp$ + "D2R3U2D4"
  85.     IF d = 5 THEN tmp$ = tmp$ + "BM+3,0L3D2R3D2L3"
  86.     IF d = 6 THEN tmp$ = tmp$ + "BM+3,0L3D4R3U2L3"
  87.     IF d = 7 THEN tmp$ = tmp$ + "R3D4"
  88.     IF d = 8 THEN tmp$ = tmp$ + "R3D4L3U4D2R3"
  89.     IF d = 9 THEN tmp$ = tmp$ + "R3L3D2R3U2D4"
  90.     IF d = 0 THEN tmp$ = tmp$ + "R3D4L3U4"
  91.     DRAW tmp$
  92.  

4
Programs / Solar System Screensaver
« on: May 13, 2020, 10:56:54 am »
Program: Solar System Screensaver
Creator:  Cloud Zimmermann
Date:      1/13/2018

Code: QB64: [Select]
  1. 'Program: Solar System Screensaver
  2. 'Creator:  Cloud Zimmermann
  3. 'Date:      1/13/2018
  4.  
  5. RANDOMIZE TIMER 'set the seed of the randomizer to the current number of seconds since midnight
  6. SCREEN 7, 1, 0, 1 'use screen 7 mode (320x200 @256 colors with 7 pages of memory), use color mode, set memory page as 0 for drawing, and set memory page 1 as the selected
  7.  
  8. CONST SCREEN_WIDTH = 320
  9. CONST SCREEN_HEIGHT = 200
  10.  
  11. CONST sphere_count = 4
  12. CONST star_count = 100
  13.  
  14. DIM angle AS SINGLE
  15.  
  16. ' data type for all spheres (suns, planets, gas giants, moons, satellites, ect)
  17. TYPE sphere
  18.     cordinateX AS SINGLE 'x
  19.     cordinateY AS SINGLE 'y
  20.     cordinateZ AS SINGLE 'z
  21.     radius AS INTEGER 'radius of circle
  22.     color AS INTEGER '0 to 16
  23.     rotation_offset AS SINGLE 'saved as degrees
  24.     parent AS INTEGER ' relationship
  25.     direction AS INTEGER ' clockwise or counter-clockwise
  26.     angular_velocity AS SINGLE ' allow for different rotation speeds
  27. DIM spheres(sphere_count) AS sphere
  28.  
  29. 'sample data
  30. spheres(0).radius = 5
  31. spheres(0).parent = -1
  32. spheres(0).direction = 1
  33. spheres(0).color = 11
  34. spheres(0).angular_velocity = .25
  35.  
  36. spheres(1).radius = 2
  37. spheres(1).parent = 0
  38. spheres(1).direction = 1
  39. spheres(1).color = 12
  40. spheres(1).angular_velocity = 4
  41.  
  42. spheres(2).radius = 3.3
  43. spheres(2).parent = -1
  44. spheres(2).rotation_offset = 60
  45. spheres(2).direction = 1
  46. spheres(2).color = 13
  47. spheres(2).angular_velocity = 1
  48.  
  49.  
  50. spheres(3).radius = 4
  51. spheres(3).parent = -1
  52. spheres(3).rotation_offset = 180
  53. spheres(3).direction = -1
  54. spheres(3).color = 14
  55. spheres(3).angular_velocity = 2
  56.  
  57.  
  58. spheres(4).radius = 6
  59. spheres(4).parent = -1
  60. spheres(4).rotation_offset = -300
  61. spheres(4).direction = 1
  62. spheres(4).color = 6
  63. spheres(4).angular_velocity = 1.3
  64.  
  65. TYPE star
  66.     x AS INTEGER
  67.     y AS INTEGER
  68.     c AS INTEGER
  69. DIM stars(star_count) AS star
  70.  
  71. FOR i% = 0 TO star_count
  72.     stars(i%).x = (RND * 320) + 1
  73.     stars(i%).y = (RND * 200) + 1
  74.     stars(i%).c = (RND * 1) + 7
  75. NEXT i%
  76.  
  77.  
  78. ' main loop
  79.     ' draw background
  80.     FOR i% = 0 TO star_count
  81.         PSET (stars(i%).x, stars(i%).y), stars(i%).c
  82.     NEXT i%
  83.  
  84.     COLOR 15 'set color as WHITE for text/graphics
  85.     LOCATE 3, 17 'set text cursor to x,y
  86.     PRINT TIME$ ' print the current time
  87.  
  88.     'LOCATE 5, 17
  89.     'PRINT angle
  90.  
  91.     ' draw the sun
  92.     COLOR 14
  93.     CIRCLE (SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2), 10, , , , 1
  94.     PAINT STEP(0, 0), 14, 14
  95.  
  96.     ' update the global rotation angle
  97.     angle = angle + 0.01
  98.     IF angle > 360 THEN angle = 0
  99.  
  100.     FOR i% = 0 TO sphere_count
  101.  
  102.         ' does this sphere have a parent?
  103.         IF spheres(i%).parent <> -1 THEN
  104.  
  105.             ' draw path of the orbit near the parent
  106.             COLOR 2 '0 is black, 2 is green, 7 is light gray, 8 is dark gray, 15 is white
  107.             CIRCLE (spheres(spheres(i%).parent).cordinateX, spheres(spheres(i%).parent).cordinateY), 8 * spheres(i%).radius, , , , 1 ' draw circle(x,y),radius,,,,aspect ratio
  108.  
  109.             ' calculate the position of the sphere near the parent
  110.             x = (spheres(spheres(i%).parent).cordinateX) + (COS(angle * spheres(i%).angular_velocity + spheres(i%).rotation_offset) * (8 * spheres(i%).radius))
  111.             y = (spheres(spheres(i%).parent).cordinateY) + (SIN(angle * spheres(i%).angular_velocity + spheres(i%).rotation_offset) * (8 * spheres(i%).radius))
  112.             r = spheres(i%).radius
  113.  
  114.         ELSE
  115.  
  116.             ' draw path of orbit
  117.             'COLOR INT(RND * 6) + 1 ' change the color from 1 to 6 (out of 16 possible)
  118.             COLOR 2
  119.             CIRCLE (SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2), SCREEN_HEIGHT / spheres(i%).radius, , , , 1 ' draw circle(x,y),radius,,,,aspect ratio
  120.  
  121.             ' calculate the position of the sphere
  122.             x = (SCREEN_WIDTH / 2) + (COS(spheres(i%).direction * angle * spheres(i%).angular_velocity + spheres(i%).rotation_offset) * (SCREEN_HEIGHT / spheres(i%).radius))
  123.             y = (SCREEN_HEIGHT / 2) + (SIN(spheres(i%).direction * angle * spheres(i%).angular_velocity + spheres(i%).rotation_offset) * (SCREEN_HEIGHT / spheres(i%).radius))
  124.             r = spheres(i%).radius
  125.         END IF
  126.  
  127.         ' save the position of the sphere (for the children)
  128.         spheres(i%).cordinateX = x
  129.         spheres(i%).cordinateY = y
  130.  
  131.         ' draw sphere
  132.         COLOR spheres(i%).color '11 '10
  133.         CIRCLE (x, y), r, , , , 1
  134.         PAINT STEP(0, 0), spheres(i%).color, spheres(i%).color
  135.  
  136.     NEXT i%
  137.  
  138.  
  139.     PCOPY 0, 1 'copy/flip the video memory page from 0 to 1 (so we can see what we have drawn without watching the drawing itself)
  140.     CLS
  141.     _LIMIT (60) 'qb64: limit to 60 loops per second
  142.  
  143.  

Pages: [1]