Author Topic: MasterGy is looking for ideas to implement ("i suffer")  (Read 14598 times)

0 Members and 1 Guest are viewing this topic.

Offline MasterGy

  • Seasoned Forum Regular
  • Posts: 327
  • people lie, math never lies
    • View Profile
Re: i suffer
« Reply #30 on: March 06, 2021, 01:56:37 pm »
SMcNeill huh! very good idea! it also coincides with what I’ve been thinking for a long time, but I don’t even know how to get started. "rigid body physics". I'm thinking of an off-road game. If I could solve this, I could help in the dice as well.
I want something like that, but I feel like I’m very short of that. (the interesting thing is that this is a special solution, 95 DOS program, at that time this little primitive game had the most lifelike physics) If I could solve this, I would help in the dice game!

« Last Edit: March 06, 2021, 01:58:09 pm by MasterGy »

Offline MasterGy

  • Seasoned Forum Regular
  • Posts: 327
  • people lie, math never lies
    • View Profile
Re: i suffer
« Reply #31 on: March 06, 2021, 02:35:14 pm »
I found the old programs. i remember my first pc after commodore64 was a 386DX 40mhz machine with hercules monochrome monitor. I loved it !!! DOS folder qbasic.exe !!! not even interested in anything but this! I couldn’t even make rudimentary games in color because that monitor only knew 2 colors. I don’t want to tire you of this, but if you’re not angry, I’ll show you a couple. I still used a lot of goto here, it wasn’t structured. I also did a Tetris game, just loading it into qb64 the characters don't show up because the value of ascii is different here. Here, for example, is a number system conversion program. You specify the number system you enter, you also enter the number, and it converts. I'm trying to revive the tetris to qb64. I translate Hungarian into English

Code: QB64: [Select]
  1. DECLARE SUB atalakito (decimalisszam)
  2. DECLARE SUB bekeres (decimalisszam)
  3.  
  4.  
  5. PRINT "SZŹMRENDSZER ŹTVŹLT˘ program                            (C)T˘th Gyula 1998-03-28"
  6. LOCATE 3, 4
  7. PRINT "  Ez a program b rmely sz mot  t tud sz molni k‚t 2-22 sz mrendszer k”z”tt."
  8. bekeres x
  9.  
  10. atalakito x
  11.  
  12. SUB atalakito (szam)
  13.     k$ = "0123456789ABCDEFGHIJKLMNOP"
  14.     FOR szr = 2 TO 22
  15.         PRINT USING "##"; szr;: PRINT "-number system (0-" + MID$(k$, szr, 1); ") :";
  16.         IF szr ^ 20 < szam THEN PRINT " It does not fit ": GOTO ss
  17.         xszam = szam: s$ = "": FOR h = 30 TO -6 STEP -1
  18.             IF h = -1 THEN s$ = s$ + "."
  19.             a = INT(xszam / (szr ^ h))
  20.             s$ = s$ + MID$(k$, a + 1, 1): xszam = xszam - a * szr ^ h
  21.         NEXT h
  22.         FOR h = 1 TO LEN(s$): IF MID$(s$, h, 1) <> "0" THEN EXIT FOR
  23.         NEXT h: PRINT MID$(s$, h)
  24.     ss: NEXT szr
  25.  
  26. SUB bekeres (x)
  27.     k$ = "0123456789ABCDEFGHIJKLMNOP"
  28.    11 INPUT "in what number system do you enter?(2-22) "; szr
  29.     IF szr <> INT(szr) OR szr > 22 OR szr < 2 THEN 11
  30.  
  31.     12 PRINT "enter the number ! (using characters: 0-" + MID$(k$, szr, 1) + ")"
  32.     INPUT szam$: ertek = 0
  33.     sz$ = "": FOR t = LEN(szam$) TO 1 STEP -1
  34.         x$ = MID$(szam$, t, 1)
  35.         IF x$ = "." THEN ht = LEN(szam$) - t ELSE sz$ = sz$ + x$
  36.     NEXT t
  37.     sz$ = UCASE$(sz$)
  38.     FOR t = LEN(sz$) TO 1 STEP -1
  39.         x$ = MID$(sz$, LEN(sz$) - t + 1, 1)
  40.         FOR y = 1 TO szr: IF MID$(k$, y, 1) = x$ THEN GOTO ok
  41.         NEXT y: PRINT "wrong character"; LEN(sz$) - t + 1; ". character ! (" + x$ + ")": GOTO 12
  42.         ok:
  43.         ertek = ertek + (y - 1) * szr ^ (LEN(sz$) - t)
  44.     NEXT t
  45.     x = ertek / szr ^ ht
  46.  

Offline MasterGy

  • Seasoned Forum Regular
  • Posts: 327
  • people lie, math never lies
    • View Profile
Re: i suffer
« Reply #32 on: March 06, 2021, 03:21:16 pm »
here is the TETRIS game written 24 years ago :) looking at the source code is a disaster :)

Code: QB64: [Select]
  1. DECLARE SUB idominfo (id$(), kep$(), xkep$())
  2. DECLARE SUB kepprn (kep$())
  3. varakozas = 1
  4. idomokszama = 19
  5.  
  6. DIM kep$(29), xkep$(29), id$(idomokszama - 1, 4)
  7. idominfo id$(), kep$(), xkep$()
  8. GOTO cimlap
  9.  
  10. jatek:
  11.  
  12. idominfo id$(), kep$(), xkep$(): CLS: kepprn kep$()
  13. LOCATE 24, 32: PRINT "Points   :";
  14. LOCATE 4, 12: PRINT "Next      :"
  15. ujalak:
  16. FOR t = 1 TO VAL(RIGHT$(TIME$, 2)): r = RND(1): NEXT t
  17. aktid = kovetkezo
  18. kovetkezo = INT(idomokszama * RND(1)): elfor = 0: x = 9: y = 0
  19. FOR fug = 0 TO 2: LOCATE 3 + fug, 24: PRINT MID$(id$(kovetkezo, 0), 3 * fug + 1, 3): NEXT fug
  20.  
  21.  
  22.  
  23. FOR fug = 0 TO 2: FOR viz = 0 TO 2
  24.         kepp$ = MID$(kep$(y + fug), x + viz, 1)
  25.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  26.         IF idop$ = "±" AND (kepp$ <> " ") THEN GOTO jatekv
  27. NEXT viz, fug
  28.  
  29. s_s = .3
  30. sebesseg = s_s
  31. bt = TIMER
  32. ciklus:
  33.  
  34.  
  35.  
  36. leptek = leptek + 1: 'IF leptek <> varakozas THEN GOTO billentyuk
  37. IF ABS(TIMER - bt) < sebesseg THEN GOTO billentyuk
  38. leptek = 0
  39. bt = TIMER
  40. FOR viz = 0 TO 2: FOR fug = 0 TO 2
  41.         kepp$ = MID$(kep$(y + fug + 1), x + viz, 1)
  42.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  43.         IF idop$ = "±" AND (kepp$ = "°" OR kepp$ = "Ű") THEN GOTO fixalo
  44. NEXT fug, viz
  45. y = y + 1
  46.  
  47. FOR viz = 0 TO 2
  48.  
  49.     kepp$ = MID$(kep$(y - 1), x + viz, 1)
  50.     IF kepp$ <> "Ű" AND kepp$ <> "°" THEN kep$(y - 1) = LEFT$(kep$(y - 1), x + viz - 1) + " " + MID$(kep$(y - 1), x + viz + 1)
  51.  
  52.     FOR fug = 0 TO 2
  53.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  54.         kepp$ = MID$(kep$(fug + y), x + viz, 1): pr$ = kepp$
  55.         IF idop$ = " " AND kepp$ <> "Ű" AND kepp$ <> "°" THEN pr$ = " "
  56.         IF idop$ = "±" AND kepp$ <> "Ű" AND kepp$ <> "°" THEN pr$ = "˛"
  57.         kep$(y + fug) = LEFT$(kep$(y + fug), x + viz - 1) + pr$ + MID$(kep$(y + fug), x + viz + 1)
  58. NEXT fug, viz
  59. kepprn kep$()
  60. pontszam = pontszam + 1: LOCATE 24, 42: PRINT pontszam;
  61.  
  62. billentyuk:
  63.  
  64. a$ = INKEY$
  65. a$ = " " + a$
  66. ky = ASC(RIGHT$(a$, 1))
  67.  
  68. IF ky <> 75 THEN GOTO jobbra:
  69. REM 'nyil balra'                  ( az idom balra mozgatasa )
  70. FOR viz = 0 TO 2: FOR fug = 0 TO 2
  71.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  72.         kepp$ = MID$(kep$(fug + y), x + viz - (1), 1)
  73.         IF idop$ = "±" AND (kepp$ = "°" OR kepp$ = "Ű") THEN GOTO ciklus
  74. NEXT fug, viz: x = x - 1
  75. FOR fug = 0 TO 2
  76.  
  77.     kepp$ = MID$(kep$(fug + y), x + 3, 1)
  78.     IF kepp$ <> "Ű" AND kepp$ <> "°" THEN kep$(y + fug) = LEFT$(kep$(y + fug), x + 2) + " " + MID$(kep$(y + fug), x + 4)
  79.  
  80.     FOR viz = 0 TO 2
  81.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  82.         kepp$ = MID$(kep$(fug + y), x + viz, 1): pr$ = kepp$
  83.         IF idop$ = " " AND kepp$ <> "Ű" AND kepp$ <> "°" THEN pr$ = " "
  84.         IF idop$ = "±" AND kepp$ <> "Ű" AND kepp$ <> "°" THEN pr$ = "˛"
  85.         kep$(y + fug) = LEFT$(kep$(y + fug), x + viz - 1) + pr$ + MID$(kep$(y + fug), x + viz + 1)
  86. NEXT viz, fug
  87.  
  88. jobbra:
  89. IF ky <> 77 THEN GOTO fel
  90. REM 'nyil jobbra'          (az idom jobbra mozgatasa)
  91. FOR viz = 0 TO 2: FOR fug = 0 TO 2
  92.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  93.         kepp$ = MID$(kep$(fug + y), x + viz + (1), 1)
  94.         IF idop$ = "±" AND (kepp$ = "°" OR kepp$ = "Ű") THEN GOTO ciklus
  95. NEXT fug, viz: x = x + 1
  96. FOR fug = 0 TO 2
  97.  
  98.     kepp$ = MID$(kep$(fug + y), x - 1, 1)
  99.     IF kepp$ <> "Ű" AND kepp$ <> "°" THEN kep$(y + fug) = LEFT$(kep$(y + fug), x - 2) + " " + MID$(kep$(y + fug), x)
  100.  
  101.     FOR viz = 0 TO 2
  102.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  103.         kepp$ = MID$(kep$(fug + y), x + viz, 1): pr$ = kepp$
  104.         IF idop$ = " " AND kepp$ <> "Ű" AND kepp$ <> "°" THEN pr$ = " "
  105.         IF idop$ = "±" AND kepp$ <> "Ű" AND kepp$ <> "°" THEN pr$ = "˛"
  106.         kep$(y + fug) = LEFT$(kep$(y + fug), x + viz - 1) + pr$ + MID$(kep$(y + fug), x + viz + 1)
  107. NEXT viz, fug
  108.  
  109. fel:
  110. IF ky <> 72 THEN GOTO le
  111. REM 'nyil fel'                               (az idom forgatasa)
  112. xelfor = elfor: elfor = elfor + 1: IF id$(aktid, elfor) = "" THEN elfor = 0
  113. FOR viz = 0 TO 2: FOR fug = 0 TO 2
  114.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  115.         kepp$ = MID$(kep$(fug + y), x + viz, 1)
  116.         IF idop$ = "±" AND (kepp$ = "°" OR kepp$ = "Ű") THEN elfor = xelfor
  117. NEXT fug, viz
  118. FOR viz = 0 TO 2: FOR fug = 0 TO 2
  119.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  120.         kepp$ = MID$(kep$(fug + y), x + viz, 1): pr$ = kepp$
  121.         IF idop$ = " " AND kepp$ <> "Ű" AND kepp$ <> "°" THEN pr$ = " "
  122.         IF idop$ = "±" AND kepp$ <> "Ű" AND kepp$ <> "°" THEN pr$ = "˛"
  123.         kep$(y + fug) = LEFT$(kep$(y + fug), x + viz - 1) + pr$ + MID$(kep$(y + fug), x + viz + 1)
  124. NEXT fug, viz
  125.  
  126. le:
  127. IF ky <> 80 THEN GOTO vg
  128. sebesseg = s_s / 5: kepprn kep$(): GOTO ciklus
  129.  
  130. REM 'nyil le'    ( lerakni a megfelelo helyre , billentyuk kizarva)
  131. ckls:
  132. FOR viz = 0 TO 2: FOR fug = 0 TO 2
  133.         kepp$ = MID$(kep$(y + fug + 1), x + viz, 1)
  134.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  135.         IF idop$ = "±" AND (kepp$ = "°" OR kepp$ = "Ű") THEN GOTO fixalo
  136. NEXT fug, viz
  137. y = y + 1
  138. pontszam = pontszam + 2: LOCATE 24, 42: PRINT pontszam;
  139. FOR viz = 0 TO 2
  140.  
  141.     kepp$ = MID$(kep$(y - 1), x + viz, 1)
  142.     IF kepp$ <> "Ű" AND kepp$ <> "°" THEN kep$(y - 1) = LEFT$(kep$(y - 1), x + viz - 1) + " " + MID$(kep$(y - 1), x + viz + 1)
  143.  
  144.     FOR fug = 0 TO 2
  145.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  146.         kepp$ = MID$(kep$(fug + y), x + viz, 1): pr$ = kepp$
  147.         IF idop$ = " " AND kepp$ <> "Ű" AND kepp$ <> "°" THEN pr$ = " "
  148.         IF idop$ = "±" AND kepp$ <> "Ű" AND kepp$ <> "°" THEN pr$ = "˛"
  149.         kep$(y + fug) = LEFT$(kep$(y + fug), x + viz - 1) + pr$ + MID$(kep$(y + fug), x + viz + 1)
  150. NEXT fug, viz
  151. kepprn kep$()
  152. GOTO ckls
  153. vg:
  154. sebesseg = s_s
  155. kepprn kep$(): GOTO ciklus
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162. fixalo:
  163. FOR viz = 0 TO 2: FOR fug = 0 TO 2
  164.         idop$ = MID$(id$(aktid, elfor), fug * 3 + viz + 1, 1)
  165.         kepp$ = MID$(kep$(y + fug), x + viz, 1)
  166.         IF idop$ = "±" THEN kep$(y + fug) = LEFT$(kep$(y + fug), x + viz - 1) + "°" + MID$(kep$(y + fug), x + viz + 1)
  167.         IF idop$ = " " AND (kepp$ <> "Ű" AND kepp$ <> "°") THEN kep$(y + fug) = LEFT$(kep$(y + fug), x + viz - 1) + " " + MID$(kep$(y + fug), x + viz + 1)
  168. NEXT fug, viz
  169.  
  170. vizsgalo:
  171. FOR t = 0 TO 21
  172.     IF kep$(t) = " Ű°°°°°°°°°°°°°°°°Ű " THEN GOTO telesor
  173. NEXT t: GOTO ujalak
  174.  
  175. telesor:
  176. pontszam = pontszam + 200: LOCATE 24, 42: PRINT pontszam;
  177. FOR ck = 1 TO 8
  178.     kep$(t) = " Ű°°°°°°°°°°°°°°°°Ű ": kepprn kep$()
  179.     kep$(t) = " Ű                Ű ": kepprn kep$()
  180.     kep$(t) = " ŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰ ": kepprn kep$()
  181. NEXT ck
  182. FOR ck = t TO 1 STEP -1: kep$(ck) = kep$(ck - 1): NEXT ck
  183. kep$(0) = " Ű                Ű "
  184. GOTO vizsgalo
  185.  
  186. cimlap:
  187. FOR fug = 21 TO 0 STEP -1
  188.     kep$(fug) = xkep$(fug)
  189.     kepprn kep$()
  190. NEXT fug
  191.     a$ = INKEY$
  192.     IF a$ = "u" THEN GOTO jatek
  193.     IF a$ = "k" THEN CLS: END
  194.     IF a$ = "i" THEN GOTO bemutato
  195.  
  196. bemutato:
  197. FOR idomok = 1 TO idomokszama
  198.     FOR elford = 0 TO 3: IF id$(idomok - 1, elford) = "" THEN GOTO kv
  199.  
  200.         FOR fug = 0 TO 2: FOR viz = 0 TO 2
  201.                 LOCATE 4 + elford * 4 + fug, (80 - 4 * idomokszama) / 2 + viz + (idomok - 1) * 4
  202.                 idop$ = MID$(id$(idomok - 1, elford), fug * 3 + viz + 1, 1)
  203.                 kepp$ = "°": IF idop$ = "±" THEN kepp$ = "Ű"
  204.                 PRINT kepp$;
  205.         NEXT viz, fug
  206. kv: NEXT elford, idomok
  207. LOCATE 23, 27
  208. PRINT "      Press any key      "
  209.  
  210. jatekv:
  211. LOCATE 24, 42: PRINT pontszam;
  212. FOR fug = 20 TO 0 STEP -1
  213.     kep$(fug) = " Ű°°°°°°°°°°°°°°°°Ű ": kepprn kep$()
  214. NEXT fug
  215.  
  216. SUB idominfo (id$(), kep$(), xkep$())
  217.     id$(0, 0) = "     ±±±±"
  218.     id$(0, 1) = "±±  ±  ± "
  219.     id$(0, 2) = "   ±±±±  "
  220.     id$(0, 3) = " ±  ±  ±±"
  221.  
  222.     id$(1, 0) = "   ±  ±±±"
  223.     id$(1, 1) = " ±  ± ±± "
  224.     id$(1, 2) = "   ±±±  ±"
  225.     id$(1, 3) = " ±± ±  ± "
  226.  
  227.     id$(2, 0) = "   ±± ±  "
  228.     id$(2, 1) = "   ±  ±± "
  229.     id$(2, 2) = "    ± ±± "
  230.     id$(2, 3) = "   ±±  ± "
  231.  
  232.     id$(3, 0) = "    ± ±±±"
  233.     id$(3, 1) = "  ± ±±  ±"
  234.     id$(3, 2) = "   ±±± ± "
  235.     id$(3, 3) = " ±  ±± ± "
  236.  
  237.     id$(4, 0) = "   ±±±   "
  238.     id$(4, 1) = " ±  ±  ± "
  239.  
  240.     id$(5, 0) = "  ±±±±±  "
  241.     id$(5, 1) = "±±  ±  ±±"
  242.  
  243.     id$(6, 0) = " ±  ± ±±±"
  244.     id$(6, 1) = "  ±±±±  ±"
  245.     id$(6, 2) = "±±± ±  ± "
  246.     id$(6, 3) = "±  ±±±±  "
  247.  
  248.     id$(7, 0) = "   ±±±± ±"
  249.     id$(7, 1) = "±± ±  ±± "
  250.     id$(7, 2) = "   ± ±±±±"
  251.     id$(7, 3) = " ±±  ± ±±"
  252.  
  253.     id$(8, 0) = " ±  ±±  ±"
  254.     id$(8, 1) = "    ±±±± "
  255.  
  256.     id$(9, 0) = "  ± ±± ± "
  257.     id$(9, 1) = "   ±±  ±±"
  258.  
  259.     id$(10, 0) = "±±± ± ±±±"
  260.     id$(10, 1) = "± ±±±±± ±"
  261.  
  262.     id$(11, 0) = "  ±  ±±±±"
  263.     id$(11, 1) = "±±±  ±  ±"
  264.     id$(11, 2) = "±±±±  ±  "
  265.     id$(11, 3) = "±  ±  ±±±"
  266.  
  267.     id$(12, 0) = " ± ±±± ± "
  268.  
  269.     id$(13, 0) = "   ±± ±±±"
  270.     id$(13, 1) = "  ± ±± ±±"
  271.     id$(13, 2) = "   ±±± ±±"
  272.     id$(13, 3) = "±± ±± ±  "
  273.  
  274.     id$(14, 0) = "    ±±±±±"
  275.     id$(14, 1) = "±± ±±  ± "
  276.     id$(14, 2) = "   ±±±±± "
  277.     id$(14, 3) = " ±  ±± ±±"
  278.  
  279.     id$(15, 0) = " ± ±±±± ±"
  280.     id$(15, 1) = " ±±±±  ±±"
  281.     id$(15, 2) = "± ±±±± ± "
  282.     id$(15, 3) = "±±  ±±±± "
  283.  
  284.     id$(16, 0) = "   ±± ±± "
  285.  
  286.     id$(17, 0) = "    ±    "
  287.  
  288.     id$(18, 0) = "   ±±    "
  289.     id$(18, 1) = "    ±  ± "
  290.  
  291.  
  292.     FOR t = 0 TO 20: kep$(t) = " Ű                Ű ": NEXT t
  293.     kep$(21) = " " + STRING$(18, "Ű") + " "
  294.  
  295.     xkep$(0) = " ŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰ "
  296.     xkep$(1) = " Ű°°°°°°°°°°°°°°°°Ű "
  297.     xkep$(2) = " Ű°°           °°°Ű "
  298.     xkep$(3) = " Ű°             °°Ű "
  299.     xkep$(4) = " Ű  T E T R I S  °Ű "
  300.     xkep$(5) = " Ű               °Ű "
  301.     xkep$(6) = " Ű    G A M E    °Ű "
  302.     xkep$(7) = " Ű°             °°Ű "
  303.     xkep$(8) = " Ű°°           °°°Ű "
  304.     xkep$(9) = " Ű°°°°°°°°°°°°°°°°Ű "
  305.     xkep$(10) = " Ű°(C)T˘TH GYULA °Ű "
  306.     xkep$(11) = " Ű°  1997-12-30  °Ű "
  307.     xkep$(12) = " Ű°°°°°°°°°°°°°°°°Ű "
  308.     xkep$(13) = " Ű°U - new game°°°Ű "
  309.     xkep$(14) = " Ű°°°°°°°°°°°°°°°°Ű "
  310.     xkep$(15) = " Ű°I - characters°Ű "
  311.     xkep$(16) = " Ű°°°°°°°°view°°°°Ű "
  312.     xkep$(17) = " Ű°°°°°°°°°°°°°°°°Ű "
  313.     xkep$(18) = " Ű°K - exit°°°°°°°Ű "
  314.     xkep$(19) = " Ű°°°from game°°°°Ű "
  315.     xkep$(20) = " Ű°°°°°°°°°°°°°°°°Ű "
  316.     xkep$(21) = " ŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰŰ "
  317.  
  318.  
  319.  
  320. SUB kepprn (kep$())
  321.     FOR t = 0 TO 21: LOCATE 2 + t, 31: PRINT kep$(t);: NEXT t
  322.  

Offline MasterGy

  • Seasoned Forum Regular
  • Posts: 327
  • people lie, math never lies
    • View Profile
Re: i suffer
« Reply #33 on: March 07, 2021, 05:30:16 am »
I have tried this too, although I have seen a similar one here

Code: QB64: [Select]
  1.  
  2. gdb = 100 'number of balls
  3. gsugar = 15 'radius of balls
  4. ero = 2 'energy
  5.  
  6. ' use a smaller radius for more balls
  7.  
  8. DIM ball(gdb - 1, 3) 'ball array index 0=posX  1=posY  2=forceX  3=forceY
  9. kepx = 800: kepy = 600: kep = _NEWIMAGE(kepx, kepy, 32): SCREEN kep
  10.  
  11. 'install random ball
  12. FOR t = 0 TO gdb - 1
  13.     masikpoz:
  14.     ball(t, 0) = (kepx - gsugar * 4) * RND(1) + gsugar * 2
  15.     ball(t, 1) = (kepy - gsugar * 4) * RND(1) + gsugar * 2
  16.     FOR t2 = 0 TO gdb - 1
  17.         tavx = ball(t, 0) - ball(t2, 0): tavy = ball(t, 1) - ball(t2, 1): tav = SQR(tavx * tavx + tavy * tavy)
  18.         IF (tav <= gsugar * 2) AND t <> t2 THEN GOTO masikpoz
  19.     NEXT t2
  20.  
  21.  
  22. 'to give energy to one of the balls
  23. szog = 360 * RND(1)
  24. ball(0, 2) = SIN(3.14159265 / 180 * szog) * ero
  25. ball(0, 3) = COS(3.14159265 / 180 * szog) * ero
  26.  
  27.  
  28.  
  29. DO: _LIMIT 500: CLS
  30.  
  31.     'wall impact test
  32.     FOR t = 0 TO gdb - 1
  33.         ujra:
  34.         kx = ball(t, 0) + ball(t, 2)
  35.         ky = ball(t, 1) + ball(t, 3)
  36.         IF kx < gsugar OR kx > kepx - gsugar THEN ball(t, 2) = -ball(t, 2)
  37.         IF ky < gsugar OR ky > kepy - gsugar THEN ball(t, 3) = -ball(t, 3)
  38.         ball(t, 0) = ball(t, 0) + ball(t, 2)
  39.         ball(t, 1) = ball(t, 1) + ball(t, 3)
  40.     NEXT t
  41.  
  42.     'ball crash test
  43.     FOR t = 0 TO gdb - 1
  44.         FOR t2 = t + 1 TO gdb - 1
  45.             tavx = ball(t, 0) - ball(t2, 0)
  46.             tavy = ball(t, 1) - ball(t2, 1)
  47.             tav = SQR(tavx * tavx + tavy * tavy)
  48.             IF (tav <= gsugar * 2) AND t2 <> t THEN
  49.  
  50.                 utk = utk + 1
  51.                 angle = ATN((ball(t2, 1) - ball(t, 1)) / (ball(t2, 0) - ball(t, 0)))
  52.                 ex1 = ball(t, 2) * COS(-angle) - ball(t, 3) * SIN(-angle)
  53.                 ey1 = ball(t, 2) * SIN(-angle) + ball(t, 3) * COS(-angle)
  54.                 ex2 = ball(t2, 2) * COS(-angle) - ball(t2, 3) * SIN(-angle)
  55.                 ey2 = ball(t2, 2) * SIN(-angle) + ball(t2, 3) * COS(-angle)
  56.                 ball(t, 2) = ex2 * COS(angle) - ey1 * SIN(angle)
  57.                 ball(t, 3) = ex2 * SIN(angle) + ey1 * COS(angle)
  58.                 ball(t2, 2) = ex1 * COS(angle) - ey2 * SIN(angle)
  59.                 ball(t2, 3) = ex1 * SIN(angle) + ey2 * COS(angle)
  60.  
  61.             END IF
  62.     NEXT t2, t
  63.     'draw
  64.     FOR t = 0 TO gdb - 1
  65.     CIRCLE (ball(t, 0), ball(t, 1)), gsugar: NEXT t
  66.     LOCATE 1, 1: PRINT "crash:"; utk
  67.     _DISPLAY
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: i suffer
« Reply #34 on: March 08, 2021, 08:24:10 pm »
Hello ! I'm bored.

Hi bored :P
I have a good project I have not seen anyone tackle yet, (I will be shortly), Create a routine to display THEDRAW images :-)
If you dont know what those are you might be too young heheh
I love using THEDRAW and would love to implement the results in my QB projects.

there ya go -

seeeee, now ya not so bored
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: i suffer
« Reply #35 on: March 08, 2021, 09:02:15 pm »
Oh check out Boids on the Internet, that's a cool one too!

Offline xra7en

  • Seasoned Forum Regular
  • Posts: 284
    • View Profile
Re: i suffer
« Reply #36 on: March 08, 2021, 09:22:38 pm »
Oh check out Boids on the Internet, that's a cool one too!

GAWD!!! TYVM for not saying "G****" it"

what is boids? all i see is some AI life gen proggy
I just like re-writing old DOS book games into modern QB64 code - weird hobby, I know!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: i suffer
« Reply #37 on: March 09, 2021, 02:32:56 am »
Here is my attempt at Boids from some time ago, watch where you point the mouse it scares them off!

Code: QB64: [Select]
  1. _Title "Boid Watching 3  by bplus 2018-09-07"
  2. 'QB64 version 2017 1106/82 (the day before they switched to version 1.2)
  3. 'from Boid Watching.bas for QB64 version 2017 1106/82 B+ 2018-04-28
  4. 'from Boid Watching.txt for JB 2.0 B+ 2018-04-28
  5. 'from networking.bas  SmallBASIC 0.12.9 [B+=MGA] 2017-04-14
  6. ' combined with
  7. 'Mouse school critter attract or repell.txt for JB 2.0 B+ 2018-04-26
  8. ' plus what I picked up generally from the videos
  9.  
  10. '2018-09-07 try a quick fix
  11.  
  12. Const xmax = 1200
  13. Const ymax = 700
  14. Screen _NewImage(xmax, ymax, 32)
  15. _ScreenMove 100, 40
  16.  
  17.  
  18. 'Boid behavior based on several modes
  19.  
  20. centerMode = 1 ' on / off
  21. cf = .01 'centering factor how strong a pull from 0 to 1  .01 is week .1 pretty strong!
  22.  
  23. headMode = 1 ' on / off
  24. sway = _Pi / 6 'just turn neighbor towards neighbor
  25. hf = .2 'heading factor how strong an influence  0 to 1
  26.  
  27. spaceMode = 1 ' on / off
  28. spacing = 15 'space amount approx
  29.  
  30. noise = 10 'general randomness added to movements individualism
  31.  
  32. Boids = 50
  33.  
  34. Dim Shared x(Boids), y(Boids), z(Boids), a(Boids), r(Boids), c(Boids) As _Unsigned Long, predator
  35.  
  36. For i = 1 To Boids
  37.     newCritter i
  38.  
  39. land& = _NewImage(xmax, ymax, 32)
  40. _Dest land&
  41. drawLandscape
  42.  
  43.     _PutImage , land&, 0
  44.     If InKey$ = "q" Then End
  45.     For i = 1 To Boids
  46.         m = _MouseInput: mb = _MouseButton(1): mx = _MouseX: my = _MouseY
  47.  
  48.         For j = i + 1 To Boids
  49.  
  50.             If distance(x(i), y(i), x(j), y(j)) < 100 Then
  51.  
  52.                 'sway the neighbors towards each other
  53.                 If headMode Then
  54.                     If a(i) > a(j) Then
  55.                         a(i) = a(i) - sway * hf
  56.                         a(j) = a(j) + sway * hf
  57.                     Else
  58.                         a(i) = a(i) + sway * hf
  59.                         a(j) = a(j) - sway * hf
  60.                     End If
  61.                 End If
  62.  
  63.                 'stickiness stay close to neighbors, close distance between
  64.                 If centerMode Then
  65.                     If x(i) > x(j) Then
  66.                         x(i) = x(i) - cf * (x(i) - x(j))
  67.                         x(j) = x(j) + cf * (x(i) - x(j))
  68.                     Else
  69.                         x(i) = x(i) + cf * (x(j) - x(i))
  70.                         x(j) = x(j) - cf * (x(j) - x(i))
  71.                     End If
  72.                     If y(i) > y(j) Then
  73.                         y(i) = y(i) - cf * (y(i) - y(j))
  74.                         y(j) = y(j) + cf * (y(i) - y(j))
  75.                     Else
  76.                         y(i) = y(i) + cf * (y(j) - y(i))
  77.                         y(j) = y(j) - cf * (y(j) - y(i))
  78.                     End If
  79.                 End If
  80.  
  81.                 'don't let them bunch up
  82.                 If spaceMode Then
  83.                     ' The following is STATIC's adjustment of ball positions if overlapping
  84.                     ' before calcultion of new positions from collision
  85.                     ' Displacement vector and its magnitude.  Thanks STxAxTIC !
  86.                     nx = x(j) - x(i)
  87.                     ny = y(j) - y(i)
  88.                     nm = Sqr(nx ^ 2 + ny ^ 2)
  89.                     If nm < spacing + 20 Then
  90.                         nx = nx / nm
  91.                         ny = ny / nm
  92.                         ' Regardless of momentum exchange, separate the balls along the lone connecting them.
  93.                         While nm < spacing + 30
  94.                             x(j) = x(j) + .1 * spacing * nx
  95.                             y(j) = y(j) + .1 * spacing * ny
  96.                             x(i) = x(i) - .1 * spacing * nx
  97.                             y(i) = y(i) - .1 * spacing * ny
  98.                             nx = x(j) - x(i)
  99.                             ny = y(j) - y(i)
  100.                             nm = Sqr(nx ^ 2 + ny ^ 2)
  101.                             nx = nx / nm
  102.                             ny = ny / nm
  103.                         Wend
  104.                     End If 'spacer
  105.                 End If 'space Mode
  106.             End If 'distance
  107.         Next
  108.         'IF y(i) < 30 OR y(i) > ymax - 30 THEN a(i) = a(i) + sway
  109.         'out of sight
  110.         If x(i) < -1 * r(i) Or x(i) > xmax + r(i) Or y(i) < -1 * r(i) Or y(i) > ymax + r(i) Then 'start new
  111.             newCritter i
  112.         End If
  113.         If distance(x(i), y(i), mx, my) < 75 Then
  114.             a(i) = _Atan2(my - y(i), mx - x(i)) + _Pi
  115.             predatorMode = 1
  116.         Else
  117.             predatorMode = 0
  118.         End If
  119.  
  120.         'update points
  121.         x(i) = x(i) + 10 * Cos(a(i)) + Rnd * noise - .5 * noise
  122.         y(i) = y(i) + 10 * Sin(a(i)) + Rnd * noise - .5 * noise
  123.  
  124.         drawBoid i
  125.  
  126.     Next
  127.     'mouse predator
  128.     'COLOR _RGB32(160, 0, 0)
  129.     'fcirc mx, my, 25
  130.  
  131.     _Display
  132.     _Limit 20
  133.  
  134. Sub newCritter (index)
  135.     side = rand(2, 3)
  136.     Select Case side
  137.         Case 0 'right
  138.             x(index) = rand(xmax, xmax + 100)
  139.             y(index) = rand(20, ymax - 20)
  140.             a(index) = _D2R(rand(100, 260))
  141.         Case 2 'left
  142.             x(index) = rand(-100, 0)
  143.             y(index) = rand(20, ymax - 20)
  144.             a(index) = _D2R(rand(-80, 80))
  145.  
  146.         Case 1 'from above
  147.             x(index) = rand(20, xmax - 20)
  148.             y(index) = rand(-100, 0)
  149.             a(index) = _D2R(rand(10, 170))
  150.  
  151.         Case 3 'from below
  152.             x(index) = rand(20, xmax - 20)
  153.             y(index) = rand(ymax, ymax + 100)
  154.             a(index) = _D2R(rand(190, 350))
  155.  
  156.     End Select
  157.     z(index) = Rnd * .6 + .4
  158.     r(index) = rand(10, 12)
  159.     r = rand(10 + Int(z(i) * 40), 40 + Int(z(i) * 40))
  160.     c(index) = _RGB32(r, r, r)
  161.  
  162. 'SUB critter (i)
  163. '    COLOR c&(i)
  164. '    'fcirc x(i), y(i), r(i)
  165. '    IF predator THEN
  166. '        x1 = x(i) + .75 * r(i) * COS(a(i) - _PI(1 / 9) + _PI)
  167. '        y1 = y(i) + .75 * r(i) * SIN(a(i) - _PI(1 / 9) + _PI)
  168. '        x2 = x(i) + .75 * r(i) * COS(a(i) + _PI(1 / 9) + _PI)
  169. '        y2 = y(i) + .75 * r(i) * SIN(a(i) + _PI(1 / 9) + _PI)
  170. '    ELSE
  171. '        x1 = x(i) + .75 * r(i) * COS(a(i) - _PI(1 / 9))
  172. '        y1 = y(i) + .75 * r(i) * SIN(a(i) - _PI(1 / 9))
  173. '        x2 = x(i) + .75 * r(i) * COS(a(i) + _PI(1 / 9))
  174. '        y2 = y(i) + .75 * r(i) * SIN(a(i) + _PI(1 / 9))
  175. '    END IF
  176. '    COLOR _RGB32(255, 255, 255)
  177. '    ' fcirc x1, y1, .25 * r(i)
  178. '    'fcirc x2, y2, .25 * r(i)
  179. '    IF predator THEN
  180. '        x3 = x1 + .125 * r(i) * COS(a(i) + _PI)
  181. '        y3 = y1 + .125 * r(i) * SIN(a(i) + _PI)
  182. '        x4 = x2 + .125 * r(i) * COS(a(i) + _PI)
  183. '        y4 = y2 + .125 * r(i) * SIN(a(i) + _PI)
  184. '    ELSE
  185. '        x3 = x1 + .125 * r(i) * COS(a(i))
  186. '        y3 = y1 + .125 * r(i) * SIN(a(i))
  187. '        x4 = x2 + .125 * r(i) * COS(a(i))
  188. '        y4 = y2 + .125 * r(i) * SIN(a(i))
  189. '    END IF
  190. '    COLOR _RGB32(0, 0, 0)
  191. '    ' fcirc x3, y3, .125 * r(i)
  192. '    'fcirc x4, y4, .125 * r(i)
  193. 'END SUB
  194.  
  195. Sub drawBoid (i)
  196.     r = Rnd * _Pi(1 / 4) 'flapping
  197.     w = _Pi(7 / 12)
  198.     If predator Then
  199.         x1 = x(i) + z(i) * r(i) * Cos(a(i) + _Pi)
  200.         y1 = y(i) + z(i) * r(i) * Sin(a(i) + _Pi)
  201.         x2 = x(i) + z(i) * r(i) * Cos(a(i) + _Pi + w + r)
  202.         y2 = y(i) + z(i) * r(i) * Sin(a(i) + _Pi + w + r)
  203.         x3 = x(i) + z(i) * r(i) * Cos(a(i) + _Pi - w - r)
  204.         y3 = y(i) + z(i) * r(i) * Sin(a(i) + _Pi - w - r)
  205.  
  206.     Else
  207.         x1 = x(i) + z(i) * r(i) * Cos(a(i))
  208.         y1 = y(i) + z(i) * r(i) * Sin(a(i))
  209.         x2 = x(i) + z(i) * r(i) * Cos(a(i) + w + r)
  210.         y2 = y(i) + z(i) * r(i) * Sin(a(i) + w + r)
  211.         x3 = x(i) + z(i) * r(i) * Cos(a(i) - w - r)
  212.         y3 = y(i) + z(i) * r(i) * Sin(a(i) - w - r)
  213.     End If
  214.     filltri x(i), y(i), x1, y1, x2, y2, c(i)
  215.     filltri x(i), y(i), x1, y1, x3, y3, c(i)
  216.  
  217. ' found at [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there]:    http://www.[abandoned, outdated and now likely malicious qb64 dot net website - don’t go there]/forum/index.php?topic=14425.0
  218. Sub filltri (x1, y1, x2, y2, x3, y3, K As _Unsigned Long)
  219.     a& = _NewImage(1, 1, 32)
  220.     _Dest a&
  221.     PSet (0, 0), K
  222.     _Dest 0
  223.     _MapTriangle _Seamless(0, 0)-(0, 0)-(0, 0), a& To(x1, y1)-(x2, y2)-(x3, y3)
  224.     _FreeImage a& '<<< this is important!
  225.  
  226. ''Steve McNeil's  copied from his forum   note: Radius is too common a name
  227. 'SUB fcirc (CX AS LONG, CY AS LONG, R AS LONG)
  228. '    DIM subRadius AS LONG, RadiusError AS LONG
  229. '    DIM X AS LONG, Y AS LONG
  230.  
  231. '    subRadius = ABS(R)
  232. '    RadiusError = -subRadius
  233. '    X = subRadius
  234. '    Y = 0
  235.  
  236. '    IF subRadius = 0 THEN PSET (CX, CY): EXIT SUB
  237.  
  238. '    ' Draw the middle span here so we don't draw it twice in the main loop,
  239. '    ' which would be a problem with blending turned on.
  240. '    LINE (CX - X, CY)-(CX + X, CY), , BF
  241.  
  242. '    WHILE X > Y
  243. '        RadiusError = RadiusError + Y * 2 + 1
  244. '        IF RadiusError >= 0 THEN
  245. '            IF X <> Y + 1 THEN
  246. '                LINE (CX - Y, CY - X)-(CX + Y, CY - X), , BF
  247. '                LINE (CX - Y, CY + X)-(CX + Y, CY + X), , BF
  248. '            END IF
  249. '            X = X - 1
  250. '            RadiusError = RadiusError - X * 2
  251. '        END IF
  252. '        Y = Y + 1
  253. '        LINE (CX - X, CY - Y)-(CX + X, CY - Y), , BF
  254. '        LINE (CX - X, CY + Y)-(CX + X, CY + Y), , BF
  255. '    WEND
  256. 'END SUB
  257.  
  258. Function rand% (lo%, hi%)
  259.     rand% = Int(Rnd * (hi% - lo% + 1)) + lo%
  260.  
  261. Function distance (x1, y1, x2, y2)
  262.     distance = ((x1 - x2) ^ 2 + (y1 - y2) ^ 2) ^ .5
  263.  
  264. Function rdir ()
  265.     If Rnd < .5 Then rdir = -1 Else rdir = 1
  266.  
  267. Sub drawLandscape
  268.     'the sky
  269.     For i = 0 To ymax
  270.         midInk 0, 0, 128, 128, 128, 255, i / ymax
  271.         Line (0, i)-(xmax, i)
  272.     Next
  273.     'the land
  274.     startH = ymax - 200
  275.     rr = 70: gg = 70: bb = 90
  276.     For mountain = 1 To 6
  277.         Xright = 0
  278.         y = startH
  279.         While Xright < xmax
  280.             ' upDown = local up / down over range, change along Y
  281.             ' range = how far up / down, along X
  282.             upDown = (Rnd * .8 - .35) * (mountain * .5)
  283.             range = Xright + rand(15, 25) * 2.5 / mountain
  284.             lastx = Xright - 1
  285.             For X = Xright To range
  286.                 y = y + upDown
  287.                 Color _RGB(rr, gg, bb)
  288.                 Line (lastx, y)-(X, ymax), , BF 'just lines weren't filling right
  289.                 lastx = X
  290.             Next
  291.             Xright = range
  292.         Wend
  293.         rr = rand(rr - 15, rr): gg = rand(gg - 15, gg): bb = rand(bb - 25, bb)
  294.         If rr < 0 Then rr = 0
  295.         If gg < 0 Then gg = 0
  296.         If bb < 0 Then bb = 0
  297.         startH = startH + rand(5, 20)
  298.     Next
  299.  
  300. Sub midInk (r1, g1, b1, r2, g2, b2, fr)
  301.     Color _RGB(r1 + (r2 - r1) * fr, g1 + (g2 - g1) * fr, b1 + (b2 - b1) * fr)
  302.  

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: i suffer
« Reply #38 on: March 09, 2021, 02:49:48 am »
Jeez bplus I'm amazed at how damn convincing the scenery looks given few lines of code it took to make it. Nice nice.
You're not done when it works, you're done when it's right.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: i suffer
« Reply #39 on: March 09, 2021, 02:18:00 pm »
Oh yeah, I think that landscape thing was something I picked up from Aurel, years *6 ago, much tinkering with colors and variable tweaks since.
« Last Edit: March 10, 2021, 10:27:22 am by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: i suffer
« Reply #40 on: March 09, 2021, 07:00:26 pm »
oh yeah, this might light someone's fire!

Code: QB64: [Select]
  1. _Title "Drawlandscape Parallax test" 'started 2019-03-27
  2. 'test if can get end of landscape level to start for big looping background
  3. '2019-03-27 a more gentle adjustment back to Mountain starting height for
  4. 'more seamless connect of back end to front
  5. '2019-03-27 start this file with parallax drawing test
  6.  
  7.  
  8. Screen _NewImage(800, 600, 32)
  9. _ScreenMove 100, 20
  10. Type parallaxType
  11.     handle As Long
  12.     rate As Single 'number of pixels per frame added to le (leading edge)
  13.     le As Single
  14. nLevels = 6
  15. Dim Shared para(1 To nLevels) As parallaxType
  16.  
  17. Dim Shared scape&
  18. LoadLandscape
  19. scapeWidth = _Width(para(1).handle)
  20. scapeHeight = _Height(para(1).handle)
  21.  
  22. While t < 6000
  23.     Cls
  24.     For i = 1 To nLevels
  25.         If para(i).le + 800 > scapeWidth Then
  26.             te = scapeWidth - para(i).le
  27.             _PutImage (0, 0)-(te, scapeHeight), para(i).handle, 0, (scapeWidth - te, 0)-(scapeWidth, scapeHeight)
  28.             _PutImage (te, 0)-(800, scapeHeight), para(i).handle, 0, (0, 0)-(800 - te, scapeHeight)
  29.  
  30.         Else
  31.             _PutImage (0, 0)-(800, scapeHeight), para(i).handle, 0, (para(i).le, 0)-(para(i).le + 800, scapeHeight)
  32.         End If
  33.  
  34.         para(i).le = para(i).le - para(i).rate
  35.         If para(i).le < 0 Then para(i).le = scapeWidth
  36.     Next
  37.     t = t + 1
  38.     _Display
  39.     _Limit 120
  40.  
  41. Sub LoadLandscape
  42.     cur& = _Dest
  43.     xmax = 800 * 3.25: ymax = 600
  44.     hdl& = 1
  45.     para(hdl&).handle = _NewImage(xmax, ymax, 32)
  46.     _Dest para(hdl&).handle
  47.  
  48.     For i = 0 To ymax
  49.         midInk 0, 0, 128, 128, 128, 200, i / ymax
  50.         Line (0, i)-(xmax, i)
  51.     Next
  52.     'the land
  53.     startH = ymax - 200
  54.     rr = 70: gg = 70: bb = 90
  55.     For mountain = 1 To nLevels
  56.         If mountain > 1 Then
  57.             para(mountain).handle = _NewImage(xmax, ymax, 32)
  58.             _Dest para(mountain).handle
  59.         End If
  60.         Xright = 0
  61.         y = startH
  62.         Color _RGB(rr, gg, bb)
  63.         While Xright < xmax - 50
  64.             ' upDown = local up / down over range, change along Y
  65.             ' range = how far up / down, along X
  66.             upDown = (Rnd * .8 - .4) * (mountain * .5)
  67.             range = Xright + rand%(15, 25) * 2.5 / mountain
  68.             If range > xmax - 50 Then range = xmax - 50
  69.             lastx = Xright - 1
  70.             For x = Xright To range 'need less flat tops
  71.                 test = y + upDown
  72.                 test2 = y - upDown
  73.                 If Abs(test - startH) < .13 * startH Then y = test Else y = test2: upDown = -upDown
  74.                 Line (lastx, y)-(x, ymax), , BF 'just lines weren't filling right
  75.                 lastx = x
  76.             Next
  77.             Xright = range
  78.         Wend
  79.         x = lastx + 1
  80.         dy = (startH - y) / 50 'more gentle adjustment back to start of screen
  81.         While x <= xmax
  82.             y = y + dy
  83.             Line (lastx, y)-(x, ymax), , BF 'just lines weren't filling right
  84.             lastx = x
  85.             x = x + 1
  86.         Wend
  87.         rr = rand%(rr - 15, rr): gg = rand%(gg - 15, gg): bb = rand%(bb - 25, bb)
  88.         If rr < 0 Then rr = 0
  89.         If gg < 0 Then gg = 0
  90.         If bb < 0 Then bb = 0
  91.         startH = startH + mountain * rand%(2, 10)
  92.         para(mountain).le = xmax - 800
  93.         para(mountain).rate = mountain * .5
  94.     Next
  95.     _Dest cur&
  96.  
  97. Function rand% (lo%, hi%)
  98.     rand% = Int(Rnd * (hi% - lo% + 1)) + lo%
  99.  
  100. Sub midInk (r1%, g1%, b1%, r2%, g2%, b2%, fr##)
  101.     Color _RGB(r1% + (r2% - r1%) * fr##, g1% + (g2% - g1%) * fr##, b1% + (b2% - b1%) * fr##)
  102.  
  103.  

Offline Aurel

  • Forum Regular
  • Posts: 167
    • View Profile
Re: i suffer
« Reply #41 on: March 10, 2021, 03:09:40 am »
Yo Mark..
Boid...is really great with that landscape and birds..
could be nice intro for some game i think ...

second..Paralax...looks to me like
Mars rover movin' camera....but on night
really cool..

ps..that landscape i rgink that pjot(BaCon) made it first...
//////////////////////////////////////////////////////////////////
https://aurelsoft.ucoz.com
https://www.facebook.com/groups/470369984111370
//////////////////////////////////////////////////////////////////

Offline MasterGy

  • Seasoned Forum Regular
  • Posts: 327
  • people lie, math never lies
    • View Profile
Re: i suffer
« Reply #42 on: March 13, 2021, 09:55:41 am »
Hey BPLUS ! Landspace is VERY VERY GOOD !! inspiring !!! completely upset my brain! some game should be brought out of this, don't you think ????? don't be mad if you have plans for it, then I won't use your idea for anything!
« Last Edit: March 13, 2021, 09:59:10 am by MasterGy »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: i suffer
« Reply #43 on: March 13, 2021, 10:56:11 am »
@MasterGy

I am so glad you can see the potential of this demo. I look forward to seeing what you will do with it!

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: i suffer
« Reply #44 on: March 13, 2021, 01:52:23 pm »
2-D or not 2-D? That is the question.

If the world were flat, cats would be pushing us over the edge.

Pete


Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/