Author Topic: Competition  (Read 35300 times)

0 Members and 1 Guest are viewing this topic.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Competition
« Reply #45 on: October 05, 2021, 03:37:38 pm »
bplus,

Here is another "sample". Added a slight echo and modified the pitch... If you like it then I will whip up a batch....

  [ You are not allowed to view this attachment ]  

In reference to, "So you have selected..."  Maybe better to have a small "pool" of responses rather than "selected B", "chosen B" "picked B". Play a random 'pool' response followed by the letter? Just a thought. By the way... The voice does not have a sinister laugh... Cool if it did... I will look for one... *sigh*
« Last Edit: October 05, 2021, 03:45:00 pm by johnno56 »
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #46 on: October 05, 2021, 05:20:39 pm »
@johnno56

000.ogg is getting close, lower and stretch out more?

Yes, like idea of random Your selection was X, you chose X, OK x it is... I don't know how much work I am asking of you.

I don't know if I should encourage this but: (Moo ha ha help from Petr and something from Sound Bible I think.)

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Competition
« Reply #47 on: October 05, 2021, 07:46:12 pm »
Slightly modified (deeper). Also a sample of comments.

  [ You are not allowed to view this attachment ]  
  [ You are not allowed to view this attachment ]  

Cool laugh tracks....
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #48 on: October 05, 2021, 09:06:53 pm »
Yeah ominous nonhuman voice, pretty good. :)

Offline random1

  • Newbie
  • Posts: 86
    • View Profile
Re: Competition
« Reply #49 on: October 05, 2021, 09:48:10 pm »
This is a game I built a while back for my grand kids.   It's controlled completely by left
mouse button. It has 10 repeating levels where the amount of time the shooter has is
reduced for each level.  I think I made it to level 4 once.   I did however add a cheat
that allowed me to kill all the bugs in time.
The only thing with entering the contest was that several of the background screens,
music and sounds downloaded from the web.   

R1

Picture
https://i.postimg.cc/x1Qk9tmC/BUGS.png

level 10
https://i.postimg.cc/Y2gnVCzH/level-10.png
   
« Last Edit: October 05, 2021, 09:59:24 pm by random1 »

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Competition
« Reply #50 on: October 05, 2021, 11:35:56 pm »
bplus,

Here is the complete set of 'version 2' audio files. Alphabet, digits and comments.

  [ You are not allowed to view this attachment ]  

Let me know about the comments. It may be just my hearing, but some of them can be a little hard to make out. Let me know which ones and I will make them a bit louder.

J
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #51 on: October 06, 2021, 08:58:02 am »
Thanks @johnno56

I just started converting to a graphics screen so I can add visual effects. I found some old code by Petr that was reading off letters from words input using data stored in the program. Voice too nice though. I also found a worm screen eater by @RhoSigma that seemed like a good idea for a Crypt setting. Probably code it my own way.


Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #52 on: October 06, 2021, 09:03:27 am »
This is a game I built a while back for my grand kids.   It's controlled completely by left
mouse button. It has 10 repeating levels where the amount of time the shooter has is
reduced for each level.  I think I made it to level 4 once.   I did however add a cheat
that allowed me to kill all the bugs in time.
The only thing with entering the contest was that several of the background screens,
music and sounds downloaded from the web.   

R1

Picture
https://i.postimg.cc/x1Qk9tmC/BUGS.png

level 10
https://i.postimg.cc/Y2gnVCzH/level-10.png
 

Did you use a rail gun that just went back and forth across the screen automatically, you shoot with spacebar for the one key control?  Did bugs move?

Missile Command could be setup like that, you have to anticipate where your missile collides with enemy missile or bomb coming down.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #53 on: October 06, 2021, 01:14:25 pm »
bplus,

Here is the complete set of 'version 2' audio files. Alphabet, digits and comments.

  [ You are not allowed to view this attachment ]  

Let me know about the comments. It may be just my hearing, but some of them can be a little hard to make out. Let me know which ones and I will make them a bit louder.

J

The most garbled confirmation of Choice to my ears is "The Letter Is", the rest are good or good enough.

Letter W is horrible! Try 2 words "Double You"??
N, U, X are weak, the rest are good or good enough.

Thank the gods that oggs are working a little better in Windows 10, not crashing but File Explorer not exactly happy with so many in one folder and sometimes hangs and sometimes just exits the folder. At least no crash! :)

I hope everyone knows even though this dialog is seems mostly between Johnno and I, the files can be shared (between QB64 forum members for Hobby Programming purposes only), right @johnno56 ?

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Competition
« Reply #54 on: October 06, 2021, 10:04:07 pm »
I think that lowering the pitch of the audio may be the problem. I will attempt to "tweak" them or try your "double you" trick or even use a different comment...
Logic is the beginning of wisdom.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Competition
« Reply #55 on: October 07, 2021, 12:43:11 am »
There's always my game...

Code: QB64: [Select]
  1. DIM SHARED lmargin%, rmargin%, topmargin%, screenwidth%, level, ibk, ileadingrow
  2. DIM SHARED irow, icol, inextrnd, imaxalienmissiles, alienforce%, ileadingmax, imaxalienforce, ihits
  3.  
  4. imaxalienforce = 6
  5. imaxalienmissiles = 3
  6. lmargin% = 2
  7. rmargin% = 79
  8. topmargin% = 3
  9. ialiencolstat = 6
  10. iwin = 3
  11. screenwidth% = rmargin% - lmargin% + 1
  12. ibk = 1
  13.  
  14. DIM SHARED a(imaxalienforce) AS STRING * 68
  15.  
  16. SCREEN 0, 0, 0, 0
  17. COLOR 7, 1: CLS
  18.  
  19. REM Make aliens
  20. a1$ = "-<" + CHR$(237) + ">-  "
  21. a$ = a1$ + a1$ + a1$ + a1$ + a1$ + a1$ + a1$ + a1$ + a1$ + a1$
  22.  
  23. CALL qbide
  24. CALL instructions
  25.  
  26.     IF inextrnd = -1 THEN PCOPY 3, 0
  27.     tank$ = CHR$(218) + CHR$(127) + CHR$(191): icolor = 7
  28.     REDIM SHARED bullet%(5), bulletcol%(5), bulletdelay%(5), iltalien(imaxalienforce)
  29.     REDIM SHARED ia(imaxalienmissiles), iy(imaxalienmissiles), ix(imaxalienmissiles)
  30.     REDIM SHARED matrix(imaxalienforce) AS STRING * 10
  31.     alienforce% = imaxalienforce
  32.     level = .65
  33.     iround = iround + 1
  34.     level = level - iround / 15
  35.     inextrnd = -1
  36.     COLOR 7, ibk
  37.  
  38.     REM Set up aliens
  39.     ialiencol = ialiencolstat
  40.     LOCATE 2, ialiencol
  41.     FOR i = 1 TO imaxalienforce
  42.         IF i MOD 1 = 0 THEN PRINT
  43.         LOCATE , ialiencol
  44.         IF i = imaxalienforce THEN ileadingrow = CSRLIN: ileadingmax = ileadingrow
  45.         a(i) = a$
  46.         PRINT a(i)
  47.     NEXT
  48.  
  49.     REM Station
  50.     LOCATE 24, 40, 1, 7, 7
  51.     PRINT tank$;: LOCATE , POS(1) - 2: tanky% = CSRLIN: tankx% = POS(1) + 1
  52.     key$ = INKEY$: SLEEP 1
  53.  
  54.     DO
  55.         z1 = TIMER
  56.         DO
  57.             IF topmargin% + ileadingmax - (imaxalienforce * 2) >= topmargin% + 2 THEN
  58.                 IF imothership <> 0 THEN CALL mship(imothership)
  59.             END IF
  60.             IF ABS(TIMER - z1aliens) > level THEN
  61.                 CALL movealiens(ialiencol, ialiencolstat, iresults)
  62.                 z1aliens = TIMER
  63.             END IF
  64.             IF iresults < 0 THEN EXIT DO
  65.             IF ABS(TIMER - z1ia) > .3 THEN CALL alienmissile(iresults): z1ia = TIMER
  66.  
  67.             DEF SEG = 0
  68.             IF PEEK(1047) MOD 16 = 7 OR PEEK(1047) MOD 16 = 8 THEN
  69.                 key$ = CHR$(32) ' Alt
  70.             ELSE
  71.                 key$ = ""
  72.             END IF
  73.             DEF SEG
  74.  
  75.             SELECT CASE key$
  76.                 CASE CHR$(32)
  77.                     IF flag = 0 THEN switch = switch * -1 - 1: flag = -1
  78.                     SELECT CASE switch
  79.                         CASE 0
  80.                             IF ABS(z9 - TIMER) > .15 THEN
  81.                                 IF POS(1) < screenwidth% THEN COLOR icolor, ibk: LOCATE , POS(1) - 1: PRINT " " + tank$;: LOCATE , POS(1) - 2
  82.                                 tanky% = CSRLIN: tankx% = POS(1)
  83.                                 IF SCREEN(tanky%, tankx% - 2) = 25 OR SCREEN(tanky%, tankx% + 2) = 25 THEN result = -1: EXIT DO
  84.                                 z9 = TIMER
  85.                             END IF
  86.                         CASE -1
  87.                             IF ABS(z9 - TIMER) > .15 THEN
  88.                                 IF POS(1) > lmargin% + 1 THEN COLOR icolor, ibk: LOCATE , POS(1) - 2: PRINT tank$ + " ";: LOCATE , POS(1) - 3
  89.                                 tanky% = CSRLIN: tankx% = POS(1)
  90.                                 IF SCREEN(tanky%, tankx% - 2) = 25 OR SCREEN(tanky%, tankx% + 2) = 25 THEN result = -1: EXIT DO
  91.                                 z9 = TIMER
  92.                             END IF
  93.                     END SELECT
  94.                     IF icolor = 7 THEN
  95.                         FOR i2 = 1 TO 5
  96.                             IF bullet%(i2) = 0 THEN
  97.                                 icolor = 12: COLOR icolor, ibk: GOSUB redraw
  98.                                 bullet%(i2) = -1: reload = TIMER: EXIT FOR
  99.                             END IF
  100.                         NEXT
  101.                     END IF
  102.                 CASE ""
  103.                     IF flag THEN skip = 0: flag = 0
  104.                 CASE CHR$(27): SYSTEM
  105.             END SELECT
  106.  
  107.             IF ABS(z1 - reload) > .6 AND reload <> 0 THEN
  108.                 GOSUB redraw
  109.                 icolor = 7: reload = 0
  110.             END IF
  111.  
  112.             REM Fire
  113.             FOR i = 1 TO 5
  114.                 SELECT CASE bullet%(i)
  115.                     CASE -1: bullet%(i) = tanky% - 1: bulletcol%(i) = tankx%
  116.                     CASE IS > 0
  117.                         IF bulletdelay%(i) = -1 OR bullet%(i) = tanky% - 1 THEN
  118.                             CALL checkcollision(ihitaliens, ialiencol, i4, i)
  119.                             z2bullet = TIMER: bulletdelay%(i) = 0
  120.                             COLOR 7, ibk
  121.                             LOCATE bullet%(i), bulletcol%(i)
  122.                             IF bullet%(i) = topmargin% AND imothership <> 0 THEN
  123.                                 IF SCREEN(ABS(bullet%(i)), bulletcol%(i)) <> 32 THEN
  124.                                     SOUND 1000, .75
  125.                                     LOCATE topmargin%, lmargin%: PRINT SPACE$(screenwidth%);
  126.                                     imothership = 0
  127.                                 END IF
  128.                             END IF
  129.                             PRINT CHR$(24)
  130.                             IF CSRLIN <> 24 THEN LOCATE , bulletcol%(i): PRINT " ";
  131.                             IF ihitaliens <> 0 THEN CALL reprintaliens(ialiencol, ihitaliens, iresults, i4, i, imothership)
  132.                             LOCATE tanky%, tankx%
  133.                             IF bullet%(i) > topmargin% THEN
  134.                                 bullet%(i) = bullet%(i) - 1
  135.                             ELSE
  136.                                 GOSUB erasebullet
  137.                             END IF
  138.                         END IF
  139.                 END SELECT
  140.             NEXT
  141.  
  142.             REM Bullet timer delay
  143.             IF z2bullet <> 0 THEN
  144.                 IF z1 < z2bullet THEN z2bullet = z2bullet - 86400
  145.                 IF z1 - z2bullet >= .06 THEN
  146.                     FOR i2 = 1 TO 5
  147.                         IF bullet%(i2) <> 0 THEN bulletdelay%(i2) = -1
  148.                     NEXT i2
  149.                 END IF
  150.                 EXIT DO
  151.             END IF
  152.         LOOP
  153.         IF iresults < 0 THEN EXIT DO
  154.         IF alienforce% = 0 OR iresults = iwin THEN
  155.             FOR i = 1 TO imaxalienmissiles
  156.                 IF ia(i) <> 0 THEN EXIT FOR
  157.             NEXT
  158.             IF i > imaxalienmissiles THEN iwait = -1
  159.             IF iwait = -1 THEN
  160.                 EXIT DO
  161.             END IF
  162.         ELSE
  163.             iwait = 1
  164.         END IF
  165.     LOOP
  166.  
  167.     key$ = INKEY$
  168.     SLEEP 2
  169.     IF iresults = iwin OR iresults < 0 THEN
  170.         REM end game
  171.         EXIT DO
  172.     END IF
  173.     inextrnd = -1
  174. SELECT CASE iresults
  175.     CASE IS < 0
  176.         COLOR 7, ibk
  177.         LOCATE tanky% - 1, lmargin%
  178.         PRINT SPACE$(screenwidth%);
  179.         LOCATE tanky%, lmargin%
  180.         PRINT SPACE$(screenwidth%);
  181.         key$ = INKEY$
  182.         SOUND 140, 2
  183.         SLEEP 2
  184. CALL qbide
  185. CALL instructions
  186.  
  187. erasebullet:
  188. LOCATE ABS(bullet%(i)), bulletcol%(i): PRINT " ";
  189. bullet%(i) = 0: bulletcol%(i) = 0: bulletdelay%(i) = 0
  190. LOCATE tanky%, tankx%
  191.  
  192. redraw:
  193. COLOR , ibk: LOCATE tanky%, tankx% - 1: PRINT tank$;: LOCATE tanky%, tankx%: COLOR 7, ibk
  194.  
  195. DATA " Loading..."
  196. DATA "EOF"
  197. DATA "Game Over. Thanks for playing..."
  198. DATA "EOF2"
  199.  
  200. SUB alienattack (ialiencolstat, ialiencol)
  201.     z2alienfire = TIMER
  202.  
  203.     i3 = INT(RND * 10)
  204.     FOR i = 1 TO imaxalienmissiles
  205.         IF ia(i) = 0 THEN
  206.             FOR i2 = imaxalienforce TO 1 STEP -1
  207.                 IF RTRIM$(a(i2)) <> "" THEN
  208.                     IF MID$(matrix(i2), i3 + 1, 1) <> "0" THEN
  209.                         i4 = INSTR(i3 * 7 + 1, a(i2), CHR$(237)) + ialiencol
  210.                         EXIT FOR
  211.                     END IF
  212.                 END IF
  213.             NEXT i2
  214.             IF i4 <> 0 THEN
  215.                 ia(i) = (ileadingmax - (imaxalienforce - i2) * 2) * 80 + i4
  216.                 EXIT FOR
  217.             END IF
  218.         END IF
  219.     NEXT i
  220.  
  221.  
  222. SUB alienmissile (iresults)
  223.     irow = CSRLIN: icol = POS(1)
  224.     FOR i = 1 TO imaxalienmissiles
  225.         IF ia(i) <> 0 THEN
  226.             IF iy(i) = 0 THEN
  227.                 iy(i) = ia(i) \ 80: ix(i) = ia(i) MOD 80
  228.                 IF ix(i) = 0 THEN ix(i) = screenwidth%
  229.             END IF
  230.             LOCATE iy(i) + 1, ix(i)
  231.             COLOR 7, ibk
  232.             IF CSRLIN <= 24 THEN
  233.                 IF CSRLIN = 24 THEN IF SCREEN(CSRLIN, ix(i)) <> 32 THEN iresults = -1
  234.                 PRINT CHR$(25);
  235.             ELSE
  236.                 ia(i) = 0
  237.                 LOCATE iy(i), ix(i)
  238.                 PRINT " ";: iy(i) = 0
  239.                 ia(i) = 0
  240.                 LOCATE irow, icol
  241.                 EXIT SUB
  242.             END IF
  243.             LOCATE iy(i), ix(i): PRINT " ";
  244.             iy(i) = iy(i) + 1
  245.         END IF
  246.     NEXT
  247.     LOCATE irow, icol
  248.  
  249.  
  250. SUB checkcollision (ihitaliens, ialiencol, i4, i)
  251.     ihitaliens = 0
  252.     IF ileadingmax MOD 2 = bullet%(i) MOD 2 THEN
  253.         i4 = imaxalienforce - (ileadingmax - bullet%(i)) \ 2
  254.         IF bullet%(i) <= ileadingrow AND i4 > 0 AND i4 <= imaxalienforce THEN
  255.             IF RTRIM$(a(i4)) <> "" THEN
  256.                 IF bulletcol%(i) >= iltalien(i4) AND bulletcol%(i) - ialiencol <= LEN(RTRIM$(a(i4))) THEN
  257.                     IF MID$(a(i4), bulletcol%(i) - ialiencol, 1) > CHR$(32) THEN
  258.                         ihitaliens = bulletcol%(i) - ialiencol + 1
  259.                         i3 = ihitaliens - 7 + 1: IF i3 < 1 THEN i3 = 1: REM count from the "<" symbol.
  260.                         i2 = INSTR(i3 + 1, a(i4), "<") - 1
  261.                         MID$(a(i4), i2, 7) = SPACE$(7)
  262.                         MID$(matrix(i4), (i2 + 1) \ 7 + 1, 1) = "0"
  263.                     END IF
  264.                 END IF
  265.             END IF
  266.         END IF
  267.     END IF
  268.  
  269.     FOR i2 = 1 TO imaxalienmissiles
  270.         IF ia(i2) <> 0 THEN
  271.             IF iy(i2) >= bullet%(i) AND ix(i2) = bulletcol%(i) THEN
  272.                 ihitaliens = -i2
  273.                 EXIT FOR
  274.             END IF
  275.         END IF
  276.     NEXT
  277.  
  278.  
  279. SUB instructions
  280.  
  281.     ''in$ = "EOF"
  282.     IF in$ = "" THEN
  283.         key$ = INKEY$
  284.         LOCATE 3, 3, 1, 7, 7: COLOR 7, ibk
  285.         SLEEP 2
  286.         DO
  287.             READ in$
  288.             IF MID$(in$, 1, 3) = "EOF" THEN EXIT DO
  289.             FOR i = 1 TO LEN(in$)
  290.                 SOUND 400, .1
  291.                 LOCATE , 2 + i
  292.                 PRINT MID$(in$, i, 1);
  293.                 z = TIMER
  294.                 DO
  295.                     IF ABS(z - TIMER) > .1 THEN EXIT DO
  296.                 LOOP
  297.             NEXT
  298.             LOCATE , , 0, 7, 0
  299.             key$ = INKEY$
  300.             SLEEP 1
  301.             PRINT
  302.             LOCATE , 3
  303.         LOOP
  304.         key$ = INKEY$
  305.         SLEEP 1
  306.     END IF
  307.  
  308.     IF in$ = "EOF" THEN
  309.         COLOR 7, 1
  310.         FOR i = 1 TO 5
  311.             LOCATE 2 + i, 2: PRINT SPACE$(78)
  312.         NEXT
  313.         FOR i = 3 TO 24
  314.             LOCATE i, 80: PRINT CHR$(179);
  315.         NEXT
  316.         LOCATE 21, 2: PRINT STRING$(78, " ");
  317.         LOCATE 22, 1: PRINT CHR$(179);
  318.         LOCATE 22, 80: PRINT CHR$(179);
  319.         LOCATE 22, 2: PRINT STRING$(78, " ");
  320.     ELSE
  321.         COLOR 0, 3
  322.     END IF
  323.  
  324.     COLOR 0, 3
  325.     yy% = CSRLIN: xx% = POS(1)
  326.     LOCATE 25, 76 - LEN(LTRIM$(STR$(ihits)))
  327.     PRINT LTRIM$(STR$(ihits));
  328.     LOCATE 25, 80 - LEN(LTRIM$(STR$(imaxalienforce - alienforce%)))
  329.     PRINT "0";
  330.     LOCATE yy%, xx%
  331.  
  332.     PCOPY 0, 3: REM save skin
  333.  
  334.  
  335. SUB marchdown (ialiencol, ialiencolstat, imotion, iresults)
  336.     COLOR 7, ibk
  337.     ileadingrow = ileadingrow + 1
  338.     ileadingmax = ileadingmax + 1
  339.     COLOR 7, ibk
  340.     FOR i = 1 TO imaxalienforce
  341.         IF RTRIM$(a(i)) <> "" THEN
  342.             ialiencol = ialiencolstat + imotion
  343.             LOCATE ileadingmax - (imaxalienforce * 2) + i * 2 - 1, lmargin%
  344.             PRINT STRING$(screenwidth%, " ")
  345.             LOCATE , ialiencol + INSTR(a(i), "-")
  346.             iltalien(i) = POS(1)
  347.             PRINT LTRIM$(RTRIM$(a(i)))
  348.         END IF
  349.     NEXT
  350.     LOCATE irow, icol
  351.     level = level - .025
  352.     IF ileadingrow = 22 THEN iresults = -2
  353.  
  354. SUB movealiens (ialiencol, ialiencolstat, iresults)
  355.     STATIC imotion, imarch, imotiondir
  356.     IF inextrnd = -1 THEN inextrnd = 0: imotion = 0: imarch = 0: imotiondir = 0
  357.     irow = CSRLIN: icol = POS(1)
  358.     yy% = CSRLIN: xx% = POS(1)
  359.     PCOPY 0, 1: SCREEN 0, 0, 1, 0: LOCATE yy%, xx%, 0, 7, 0
  360.     IF imotiondir = 0 THEN imotion = imotion - 1 ELSE imotion = imotion + 1
  361.     COLOR 7, ibk
  362.  
  363.     FOR i = imaxalienforce TO 1 STEP -1
  364.         IF RTRIM$(a(i)) <> "" THEN
  365.             i2 = i2 + 2
  366.             SOUND 400, .03
  367.             ialiencol = ialiencolstat + imotion
  368.             LOCATE ileadingmax - (imaxalienforce - i) * 2, ialiencol + INSTR(a(i), "-")
  369.             IF POS(1) = lmargin% THEN imarch = 1
  370.             iltalien(i) = POS(1)
  371.             IF imotiondir = 0 THEN
  372.                 PRINT LTRIM$(RTRIM$(a(i))); " "
  373.             ELSE
  374.                 LOCATE , POS(1) - 1
  375.                 PRINT " "; LTRIM$(RTRIM$(a(i)))
  376.             END IF
  377.             IF ialiencol + LEN(RTRIM$(a(i))) = screenwidth% THEN imarch = -1
  378.         END IF
  379.     NEXT
  380.  
  381.     IF imarch = 1 THEN imotiondir = 1: CALL marchdown(ialiencol, ialiencolstat, imotion, iresults)
  382.     IF imarch = -1 THEN imotiondir = 0: CALL marchdown(ialiencol, ialiencolstat, imotion, iresults)
  383.     IF imarch = 0 THEN
  384.         IF ABS(TIMER - z2alienfire) > firerate THEN
  385.             firerate = (INT(RND * 10) + 1) / 20
  386.             IF iwait = 0 THEN CALL alienattack(ialiencolstat, ialiencol)
  387.         END IF
  388.     ELSE
  389.         imarch = 0
  390.     END IF
  391.     PCOPY 1, 0: SCREEN 0, 0, 0, 0
  392.     LOCATE irow, icol, 1, 7, 7
  393.  
  394. SUB mship (imothership)
  395.     STATIC x%, mov%, z4, mothership$
  396.  
  397.     yy% = CSRLIN: xx% = POS(1): COLOR 7, ibk
  398.     IF imothership = -1 THEN
  399.         imothership = 1
  400.         x% = lmargin%
  401.         mothership$ = CHR$(254) + CHR$(254) + "O" + CHR$(254) + CHR$(254)
  402.         mov% = 1
  403.     END IF
  404.  
  405.     IF ABS(TIMER - z4) > .05 THEN GOSUB mothership: z4 = TIMER: LOCATE yy%, xx%: EXIT SUB
  406.     ''IF ABS(TIMER - z2) > .2 THEN GOSUB bullets: z2 = TIMER
  407.     LOCATE yy%, xx%
  408.     EXIT SUB
  409.  
  410.     mothership:
  411.     IF x% + LEN(mothership$) = screenwidth% + lmargin% THEN mov% = -1 ELSE IF x% = lmargin% THEN mov% = 1
  412.     x% = x% + mov%
  413.     LOCATE topmargin%, x%
  414.     PRINT mothership$;
  415.     IF x% > 1 AND mov% = 1 THEN
  416.         LOCATE , POS(1) - LEN(mothership$) - 1: PRINT " ";
  417.     END IF
  418.     IF mov% = -1 THEN PRINT " ";
  419.     RETURN
  420.  
  421.  
  422. DEFINT A-H, J-Z
  423. SUB qbide
  424.     PALETTE 2, 59
  425.     COLOR 15, 1
  426.     CLS
  427.  
  428.     COLOR 0, 7
  429.     LOCATE 1, 1
  430.     PRINT SPACE$(80)
  431.     LOCATE 1, 1: PRINT "   File  Edit  View  Search  Run  Debug  Calls  Options                   Help"
  432.  
  433.     COLOR 7, 1
  434.  
  435.     LOCATE 2, 1: PRINT CHR$(218)
  436.     LOCATE 2, 2: PRINT STRING$(78, CHR$(196))
  437.     LOCATE 2, 80: PRINT CHR$(191)
  438.  
  439.     LOCATE 2, 76: PRINT CHR$(180)
  440.     LOCATE 2, 78: PRINT CHR$(195)
  441.  
  442.     COLOR 1, 7
  443.     LOCATE 2, 77: PRINT CHR$(24)
  444.     LOCATE 2, 36: PRINT " Untitled "
  445.  
  446.     COLOR 7, 1
  447.     FOR Rows = 3 TO 24
  448.         LOCATE Rows, 1: PRINT CHR$(179);
  449.         LOCATE Rows, 80: PRINT CHR$(179);
  450.     NEXT Rows
  451.  
  452.     LOCATE 22, 1: PRINT CHR$(195)
  453.     LOCATE 22, 80: PRINT CHR$(180)
  454.     LOCATE 22, 2: PRINT STRING$(78, CHR$(196))
  455.     LOCATE 22, 35
  456.     PRINT " Immediate "
  457.  
  458.     COLOR 0, 7
  459.     LOCATE 21, 3: PRINT STRING$(76, CHR$(176))
  460.     LOCATE 21, 2: PRINT CHR$(27)
  461.     LOCATE 21, 3: PRINT CHR$(219)
  462.     LOCATE 21, 79: PRINT CHR$(26)
  463.     FOR Rows = 4 TO 19
  464.         LOCATE Rows, 80: PRINT CHR$(176)
  465.     NEXT Rows
  466.     LOCATE 3, 80: PRINT CHR$(24)
  467.     LOCATE 4, 80: PRINT CHR$(219)
  468.     LOCATE 20, 80: PRINT CHR$(25)
  469.  
  470.     COLOR 0, 3: LOCATE 25, 1: PRINT " <Shift+F1=Help> <F6=Window> <F2=Subs> <F5=Run> <F8=Step> ";
  471.     LOCATE 25, 59: PRINT SPACE$(4);
  472.     COLOR 0, 3
  473.     LOCATE 25, 63: PRINT CHR$(179);
  474.     LOCATE 25, 64: PRINT SPACE$(6);
  475.     LOCATE 25, 68: PRINT "C  00001:001 ";
  476.  
  477.  
  478. DEFSNG A-H, J-Z
  479. SUB reprintaliens (ialiencol, ihitaliens, iresults, i4, i, imothership)
  480.     IF ihitaliens > 0 THEN
  481.         ihits = ihits + 1
  482.         IF (ihits + 15) MOD 20 = 0 AND imothership = 0 THEN imothership = -1
  483.         LOCATE bullet%(i), lmargin%: PRINT SPACE$(screenwidth%);
  484.         iltalien(i4) = POS(1)
  485.  
  486.         IF RTRIM$(a(i4)) = "" THEN
  487.             alienforce% = alienforce% - 1
  488.             IF alienforce% = 0 THEN iresults = iresults + 1
  489.             IF bullet%(i) = ileadingrow THEN ileadingrow = ileadingrow - 2
  490.         ELSE
  491.             LOCATE bullet%(i), ialiencol + INSTR(a(i4), "-"): PRINT LTRIM$(RTRIM$(a(i4)))
  492.         END IF
  493.     ELSE
  494.         i2 = ABS(ihitaliens)
  495.         LOCATE iy(i2), ix(i2)
  496.         PRINT " ";: iy(i2) = 0
  497.         ia(i2) = 0
  498.         LOCATE irow, icol
  499.         SOUND 1000, .5
  500.     END IF
  501.  
  502.     ihitaliens = 0
  503.     bullet%(i) = -bullet%(i)
  504.  
  505.     COLOR 0, 3
  506.     yy% = CSRLIN: xx% = POS(1)
  507.     LOCATE 25, 76 - LEN(LTRIM$(STR$(ihits)))
  508.     PRINT LTRIM$(STR$(ihits));
  509.     LOCATE 25, 80 - LEN(LTRIM$(STR$(imaxalienforce - alienforce%)))
  510.     PRINT LTRIM$(STR$(imaxalienforce - alienforce%));
  511.     LOCATE yy%, xx%
  512.     COLOR 7, ibk
  513.  

One key: Alt

Hold down to mve and shoot. Release to stop. Hold down again to reverse direction and shoot.

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

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #56 on: October 07, 2021, 12:52:31 am »
Definitely nice one key game! Nice to see that every now and then.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Competition
« Reply #57 on: October 07, 2021, 12:57:25 am »
Thanks! I removed the mouse control option and got rid of the arrow right and left. Thanks to PEEK / POKE support, it which doesn't miss key held status, a single key can b used. It's actually more challenging this way. Not bad for a half days work, made over 12 years ago, as a spoof on why Rob hadn't got around to finishing the compiler!

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

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Competition
« Reply #58 on: October 07, 2021, 03:43:32 am »
Cool game... Cleared the "first wave" (without dying!!!) but not so lucky with the second... A game that I could play without dying too much... A score / hiscore would be nice... I cannot boast about the fact that I survived without a score to convince others... This is so sad...
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Competition
« Reply #59 on: October 07, 2021, 11:37:38 am »
@Pete  Yeah add a high score record keeper, maybe update the spoof for less niche audience.

This game is real contender, it seemsmuch improved with one key control over the version using arrow keys.
You should see the cost cutting they did on my keyboard for arrow keys! I am considering recommending to Qwerkey for Samples, such a Classic in a new improved light, specially now that Johnno says you can actually get through level 1.