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 - qb4ever

Pages: [1] 2 3
1
Programs / Re: Treasure from the past (DOS World)
« on: April 19, 2019, 12:35:44 pm »
Thanks !

2
Programs / Re: Star Patterns
« on: April 18, 2019, 06:26:33 pm »
What would Pythagoras think of computers and programming? He would love QB64!

Sure !

3
Programs / Re: Alien
« on: April 13, 2019, 05:14:14 am »
Hi qb4ever
cool!

this is my first impression!

Polite graphic, simple and funny.

Yes I can confirm as negative feedback the experience of Prithak
No use of Up arrow key in menu, it works only key down arrow.

Hi Tempodibasic,
yes i will fix soon the menu problem (i will, simply, put IF condition...).
This is a work in progress experiment, I have also prepared a level with enemies.
A presto, ciao.

4
Programs / Re: Alien
« on: April 09, 2019, 01:39:34 pm »
In the third level, after press "F" key, press up arrow key.
Is important keep the heart....

Someone has finished the three levels?

5
Programs / Re: Alien
« on: April 09, 2019, 01:03:26 pm »
Good graphics. Well done, qb4ever!
Can you also add english to the game language?

Thanks.

Hi Ashish,
sure, will be only in english.
Thanks and have a good evening.

6
Programs / Re: Alien
« on: April 09, 2019, 11:48:48 am »
Alright, here are some things that I would like you to improve in this game:
You can't press the upper arrow key? Like come on! I don't know if it is because of the fault in your code but PLEASE FIX IT!
And the transition is REALLY REALLY LONG!!!

Those are my only complaints! But still, really nice game I would say! Keep working on it!

Hi Prithak
Thanks for your suggestions.
To jump I use the up arrow key.
In the next few hours I will check it and update you.
Have a nice evening!

7
Programs / Alien
« on: April 09, 2019, 10:47:15 am »
Good morning / afternoon / evening

In the past few months, I have tried to reproduce a concept based on 80s / 90s platforms.
I attach the executable file of the first 3 levels.
Obviously this is a work in progress.
As soon as possible I will clean the code from many notes (7191 lines ...) and I will post the code, because it is definitely written in a prehistoric way and I will need your advice.
Run the program with audio, because the audio effects are definitely vintage.
In the HELP menu you will see the buttons to use (arrows and spacebar, in addition to the "f" key).
"F" key should be used for platforms near fish and where there is water.
Attention, as soon as you see the platform on the water, press "F" very quickly.
Maybe I'm crazy.
I await your comments.
Enjoy, bye

8
Programs / Re: Circle Packing
« on: April 08, 2019, 07:44:32 am »
Very hypnotic, I am in loop with your program... :o
Well done, great job !

9
Programs / Re: Ball Breaker
« on: April 05, 2019, 02:59:37 am »
A slightly tweaked version which spawns balls at an ever increasing rate as you play, and in which the player shooter is a little more responsive to movements.

Great mix between space invaders and breakout.
Very nice idea !
Have a nice day.

10
Programs / Re: Shooter Start
« on: March 31, 2019, 07:36:13 am »
Woow !

Oh, you mean like this?

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

Edit: Hey, I found the mother ship version! Mouse to move, left click to shoot.

11
Programs / Re: Breakout
« on: March 25, 2019, 05:44:35 am »
Great job !
Probably, the best basic breakout ever.
Have a nice day.

12
Programs / Re: adventure game engine
« on: March 24, 2019, 06:06:18 am »
Hi pforpond,

interesting engine !

Congratulations.

13
Programs / Re: Knight VS Castle
« on: March 09, 2019, 08:59:49 am »
Hi guys
I must remark that the game is also into folder of TheBob at path \programs\samples\thebob\Kong

but the translation is here above posted by me  :-)
until QB64 will not become compatible with Call Absolute with INT calls in hexs

@qb4ever

yes I think to be italian until the lega'll not build the wall along the Rubicone... :-)

I was born and I live in Nocera Inferiore (Salerno)
this is my location on Google map
https://www.qb64.org/forum/index.php?topic=550.msg4458#msg4458

and you?

Sai per me la programmazione è affascinante e divertente. Forse perchè non la vivo come lavoro, infatti sono hobbista.

Hi TempodiBasic, I was born and living in Rome.

Anche per me la programmazione non è un lavoro, ma una ricordo della fine degli anni 80 e inizio dei 90, quando provavo a scrivere un po di codice e fare dei videogiochi per gli amici (quei pochi che allora avevano un PC).
Loro, meri utilizzatori dei loro 286 e 386, non avevano alcuna idea di come facessi a programmare platform o simili :D
Ho riscoperto 4 / 5 mesi fa il QB64, ma, come vedrai, scrivo ancora praticamente in GWBasic o QB45.
Appena avrò tempo, proverò a studiare i nuovi comandi.

Ciao.

14
Programs / Re: 3D OpenWorld Mountains
« on: March 08, 2019, 09:08:45 am »
WOW Ashish !
Stunning job !

15
Programs / Re: Knight VS Castle
« on: March 08, 2019, 05:42:36 am »
Thanks TempodiBasic.

Are you italian ?
Which region are you from ?

A presto, ciao.

Pages: [1] 2 3