Author Topic: 30 Line Game Challenge  (Read 14259 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: 30 Line Game Challenge
« Reply #30 on: September 18, 2018, 09:51:34 pm »
Hi Terry,

Damn fine game! but I am seeing some IF's.

It's like those bull riding games, if you last 10 secs you did good the heck with the points!
« Last Edit: September 18, 2018, 09:53:41 pm by bplus »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: 30 Line Game Challenge
« Reply #31 on: September 18, 2018, 09:52:01 pm »
I needed a distraction, this challenge was perfect.

Here is my entry - Yellow GOOD ... Red BAD

Code: QB64: [Select]
  1. DIM box(50) AS STRING
  2. SCREEN _NEWIMAGE(640, 480, 32) ' *** YELLOW GOOD ... RED BAD ***
  3.     _LIMIT 30
  4.     CLS
  5.     LOCATE 1, 1
  6.     PRINT STR$(score)
  7.     WEND
  8.     m$ = RIGHT$("0" + LTRIM$(STR$(_MOUSEX)), 3) + RIGHT$("0" + LTRIM$(STR$(_MOUSEY)), 3) ' xxxyyy
  9.     LINE (VAL(LEFT$(m$, 3)) - 10, VAL(RIGHT$(m$, 3)) - 10)-(VAL(LEFT$(m$, 3)) + 10, VAL(RIGHT$(m$, 3)) + 10), _RGB32(255, 255, 255), BF ' white box
  10.     FOR x = 1 TO 50
  11.         IF box(x) = "" OR VAL(MID$(box(x), 4, 3)) > 500 THEN box(x) = RIGHT$("0" + LTRIM$(STR$(INT(RND(1) * 600) + 20)), 3) + "-40" + RIGHT$("0" + LTRIM$(STR$(INT(RND(1) * 10) + 1)), 2) + LTRIM$(STR$(INT(RND(1) * 2)))
  12.         box(x) = LEFT$(box(x), 3) + RIGHT$("0" + STR$(VAL(MID$(box(x), 4, 3)) + VAL(MID$(box(x), 7, 2))), 3) + RIGHT$(box(x), 3) ' add speed to y
  13.         LINE (VAL(LEFT$(box(x), 3)) - 20, VAL(MID$(box(x), 4, 3)) - 20)-(VAL(LEFT$(box(x), 3)) + 20, VAL(MID$(box(x), 4, 3)) + 20), _RGB32(255, VAL(RIGHT$(box(x), 1)) * 255, 0), BF
  14.         IF VAL(LEFT$(m$, 3)) - 10 <= VAL(LEFT$(box(x), 3)) + 20 AND VAL(LEFT$(m$, 3)) + 10 >= VAL(LEFT$(box(x), 3)) - 20 AND VAL(RIGHT$(m$, 3)) - 10 <= VAL(MID$(box(x), 4, 3)) + 20 AND VAL(RIGHT$(m$, 3)) - 10 >= VAL(MID$(box(x), 4, 3)) - 20 THEN
  15.             IF VAL(RIGHT$(box(x), 1)) = 1 THEN
  16.                 score = score + 1
  17.                 box(x) = ""
  18.                 SOUND 220, 1
  19.                 SOUND 440, 1
  20.             ELSE
  21.                 SOUND 220, 10
  22.                 END
  23.             END IF
  24.         END IF
  25.     NEXT x
  26.     _DISPLAY

OK, me not willing to read / follow instructions is pretty much a given but a United States Marine doing the same? Oh the horror!

Hey Terry, Steve put the nix on the use of conditional statements for this challenge, so you and I are disqualified. I mean it doesn't effect me either way, because I'm fully stocked up on tissues...oh shut up Bill!, but I'm really worried this could cost you your pension.

Of course, there's always my challenge... https://www.qb64.org/forum/index.php?topic=596.0

Pete :D
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: 30 Line Game Challenge
« Reply #32 on: September 18, 2018, 10:02:23 pm »
I count 3 IF's in Terry's program. Each will cost 2 more lines but I see some padding eg sounds...

hmm... might be doable?

WHILE _MOUSEINPUT

that's a tough one.

I would let that pass for mouse and graphics game! :)
« Last Edit: September 18, 2018, 10:04:13 pm by bplus »

Offline Omerta7486

  • Newbie
  • Posts: 33
  • √𝜋²
    • View Profile
Re: 30 Line Game Challenge
« Reply #33 on: September 18, 2018, 10:22:09 pm »
Hey, Terry. That's a pretty neat little game there. I think you're the only one that got fancy with sounds and graphics! Although, not the only one that used conditionals apparently. XD But, still probably the most addictive game here(Must be the colors and the sounds. Haha).

Hey, B+, I imagine with Digit Thief that he has me blindfolded and he's pinning my hand to a table, and making me guess which finger he'll take next. Kind of dark and sadistic! Lol. Oh, yeah, and we're in the seedy underbelly of a Hong Kong restaurant backroom. XD

Hey, Pete. Neat game, it took me a second to figure out the next card was the card that was higher or lower than the last. But, I like it. I've always liked high or low, because it's simple, clean, and with few rules.

Anyway, here's an updated smoother version of my game. Better explanation, and now you can see your score AND how many turns it took you as well!

Code: QB64: [Select]
  1. 2 FOR a% = 0 TO 20000
  2.    3 FOR die%% = 1 TO 6
  3.        4 keep(die%%) = 0
  4.        5 tally(die%%) = 0
  5.        6 dice(die%%) = INT(RND * 6 + 1)
  6.    7 NEXT
  7.    8 kept%% = 0
  8.    9 FOR hand%% = 0 TO 6
  9.        10 FOR hold%% = 0 TO 2
  10.            11 this%% = kept%%
  11.            12 FOR die%% = kept%% + 1 TO 6
  12.                13 PRINT "Welcome to DICE!"; CHR$(13); CHR$(13); "Choose your dice carefully, as after you have made all of your decisions, the game rerolls the dice you did not keep. You MUST keep at least 1 die each hand, and once you have kept 6 dice, you will receive your score for that round."; CHR$(13); CHR$(13); "Your goal is to reach 20000pts! Have Fun!"; CHR$(13); CHR$(13); CHR$(13); "SCORE HELP"; CHR$(13); "----------"; CHR$(13); "1=100  2=0  3=0  4=0  5=50  6=0"; CHR$(13); "Triple 1's=1000 Triple 4's=400"; CHR$(13); "Triple 2's=200  Triple 5's=500"; CHR$(13); "Triple 3's=300  Triple 6's=600"; CHR$(13); "A straight of 1-6=2000"; STRING$(4, 13); "Current score is:"; score%; "/ 20000"; CHR$(13); "Dice rolled in this hand:       "; dice(1); dice(2); dice(3); dice(4); dice(5); dice(6); CHR$(13); "Dice you have kept this round:  "; keep(1); keep(2); keep(3); keep(4); keep(5); keep(6); CHR$(13); CHR$(13); "Keep die"; RTRIM$(STR$(die%%)); "? [It's a"; RTRIM$(STR$(dice(die%%))); "] (1=y 0=n)";
  13.                14 INPUT "", in~%%
  14.                15 keep(kept%% + 1) = _CEIL(in~%% / 255) * dice(die%%)
  15.                16 kept%% = kept%% + _CEIL(in~%% / 255)
  16.                17 tally(keep(kept%%)) = tally(keep(kept%%)) + _CEIL(in~%% / 255)
  17.            18 NEXT
  18.            19 hold%% = 2 * (kept%% - this%%)
  19.        20 NEXT
  20.        21 FOR die%% = 1 TO 6
  21.            22 dice(die%%) = (ABS(keep(die%%) <> 0) * 0) + (ABS(keep(die%%) = 0) * INT(RND * 6 + 1))
  22.        23 NEXT
  23.        24 hand%% = kept%%
  24.    25 NEXT
  25.    26 score% = score% + (tally(1) * 100) + (INT(tally(1) / 3) * 700) + (INT(tally(2) / 3) * 200) + (INT(tally(3) / 3) * 300) + (INT(tally(4) / 3) * 400) + (tally(5) * 50) + (INT(tally(5) / 3) * 350) + (INT(tally(6) / 3) * 600) + (INT(ABS((tally(1) = 1) + (tally(2) = 1) + (tally(3) = 1) + (tally(4) = 1) + (tally(5) = 1) + (tally(6) = 1)) / 6) * 1850)
  26.    27 turn% = turn% + 1
  27.    28 a% = score%
  28. 29 NEXT
  29. 30 PRINT STRING$(22, 13); "Congratulations! You beat 20000pts! You scored"; score%; "in"; turn%; "turns!"
« Last Edit: September 19, 2018, 01:15:05 am by Omerta7486 »
The knowledge that's seeking the favor of another means the murder of self.

Latest version of my game, here  Omertris: Invasion

Offline TerryRitchie

  • Seasoned Forum Regular
  • Posts: 495
  • Semper Fidelis
    • View Profile
Re: 30 Line Game Challenge
« Reply #34 on: September 18, 2018, 10:33:06 pm »
Yeah, I forgot about not being able to use conditionals. I read the post a week ago when it first came out. Should have read it again.

Oh well, was still a hoot to write
In order to understand recursion, one must first understand recursion.

Offline Omerta7486

  • Newbie
  • Posts: 33
  • √𝜋²
    • View Profile
Re: 30 Line Game Challenge
« Reply #35 on: September 18, 2018, 11:46:24 pm »
Yep. It's amazing what you can stuff into 30 lines when you put your mind to it, right?
The knowledge that's seeking the favor of another means the murder of self.

Latest version of my game, here  Omertris: Invasion

FellippeHeitor

  • Guest
Re: 30 Line Game Challenge
« Reply #36 on: September 18, 2018, 11:54:01 pm »
Are we voting yet? Terry's Atari-like little game was amazing!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: 30 Line Game Challenge
« Reply #37 on: September 19, 2018, 12:49:15 am »
Are we voting yet? Terry's Atari-like little game was amazing!

Well if the Challenge was for best game 30 lines of less Terry's game is definitely a strong start but the point of this thread was to do this without IF's.

I don't know what Steve thinks of WHILE _MOUSEINPUT, it seems the only way to get mouse but it's one of those WHILE's....

Here is Terry's Game without the IF's and without sound in attempts to get line count back down to 30. I got it to 32 removing a LOCATE and replacing with _PrintString, I also deducted points when struck by red box instead of ending game.
Code: QB64: [Select]
  1. DIM box(50) AS STRING
  2. SCREEN _NEWIMAGE(640, 480, 32) ' *** YELLOW GOOD ... RED BAD ***   MOD B+ 2018-09-19 remove IF's and sound
  3.     _LIMIT 30
  4.     CLS
  5.     _PRINTSTRING (10, 10), STR$(score) 'one less line for locate
  6.     WEND
  7.     m$ = RIGHT$("0" + LTRIM$(STR$(_MOUSEX)), 3) + RIGHT$("0" + LTRIM$(STR$(_MOUSEY)), 3) ' xxxyyy
  8.     LINE (VAL(LEFT$(m$, 3)) - 10, VAL(RIGHT$(m$, 3)) - 10)-(VAL(LEFT$(m$, 3)) + 10, VAL(RIGHT$(m$, 3)) + 10), _RGB32(255, 255, 255), BF ' white box
  9.     FOR x = 1 TO 50
  10.         istart = -1 * ((box(x) <> "") AND (VAL(MID$(box(x), 4, 3)) <= 500))
  11.         FOR i = istart TO 0
  12.             box(x) = RIGHT$("0" + LTRIM$(STR$(INT(RND(1) * 600) + 20)), 3) + "-40" + RIGHT$("0" + LTRIM$(STR$(INT(RND(1) * 10) + 1)), 2) + LTRIM$(STR$(INT(RND(1) * 2)))
  13.         NEXT i
  14.         box(x) = LEFT$(box(x), 3) + RIGHT$("0" + STR$(VAL(MID$(box(x), 4, 3)) + VAL(MID$(box(x), 7, 2))), 3) + RIGHT$(box(x), 3) ' add speed to y
  15.         LINE (VAL(LEFT$(box(x), 3)) - 20, VAL(MID$(box(x), 4, 3)) - 20)-(VAL(LEFT$(box(x), 3)) + 20, VAL(MID$(box(x), 4, 3)) + 20), _RGB32(255, VAL(RIGHT$(box(x), 1)) * 255, 0), BF
  16.         istart = -1 * (VAL(LEFT$(m$, 3)) - 10 > VAL(LEFT$(box(x), 3)) + 20 OR VAL(LEFT$(m$, 3)) + 10 < VAL(LEFT$(box(x), 3)) - 20 OR VAL(RIGHT$(m$, 3)) - 10 > VAL(MID$(box(x), 4, 3)) + 20 OR VAL(RIGHT$(m$, 3)) - 10 < VAL(MID$(box(x), 4, 3)) - 20)
  17.         FOR i = istart TO 0
  18.             jstart = -1 * (VAL(RIGHT$(box(x), 1)) = 0)
  19.             box(x) = ""
  20.             FOR j = jstart TO 0
  21.                 score = score + 1
  22.                 GOTO skip
  23.             NEXT j
  24.             score = score - 2
  25.         NEXT i
  26.         skip:
  27.     NEXT x
  28.     _DISPLAY
  29.  

Maybe someone can get two more lines out? Yes, but the sound really added to game...

Or maybe someone can start a 30 lines or less challenge without the IF condition, so all of us can compete under same rules.
« Last Edit: September 19, 2018, 12:53:05 am by bplus »

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: 30 Line Game Challenge
« Reply #38 on: September 19, 2018, 01:00:56 am »
A few tricks I could see for maybe avoiding WHILE with _MOUSEINPUT :

FOR I = ABS(_MOUSEINPUT) TO 0 STEP -1
   I = - _MOUSEINPUT
NEXT

****************

Label:
ON ABS(_MOUSEINPUT) GOTO Label

****************

Neither is tested, but I'd think both should work instead of the WHILE...WEND -- which is really the whole point of these style contests:  To have fun and force one to alter their way of thinking to perform otherwise mundane tasks.  ;)
« Last Edit: September 19, 2018, 01:06:07 am by SMcNeill »
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

FellippeHeitor

  • Guest
Re: 30 Line Game Challenge
« Reply #39 on: September 19, 2018, 01:11:00 am »
Here's my entry. Capture the letter being shown by pressing it on your keyboard to score; type a wrong key and lose a point.
Twenty points and you win.

Speed increases as you progress.

Code: QB64: [Select]
  1. SCREEN _NEWIMAGE(600, 600, 32)
  2. _DEST _NEWIMAGE(300, 300, 32)
  3. COLOR , 0
  4. difficulty! = 1.5
  5.     _PRINTSTRING (0, 0), "SCORE:" + STR$(score&), 0
  6.     letter$ = CHR$(INT(RND * 26) + 65)
  7.     x = RND * (_WIDTH - 30)
  8.     y = RND * (_HEIGHT - 30)
  9.     LINE (x, y)-STEP(30, 30), _RGB32(x MOD 200 + (100 * ABS((x MOD 200) < 50)), y MOD 150 + (100 * ABS((y MOD 150) < 50)), x MOD 255 + (100 * ABS((x MOD 150) < 50))), BF
  10.     _PRINTSTRING (x + 11, y + 7), letter$
  11.     start! = TIMER
  12.     DO
  13.         k$ = UCASE$(INKEY$)
  14.         DO WHILE TIMER - start! > difficulty!
  15.             GOTO checkKey
  16.         LOOP
  17.         LINE (0, _HEIGHT - 5)-(((_WIDTH + 5) * ((TIMER - start!) / difficulty!)), _HEIGHT), _RGB32(x MOD 200 + (100 * ABS((x MOD 200) < 50)), y MOD 150 + (100 * ABS((y MOD 150) < 50)), x MOD 255 + (100 * ABS((x MOD 150) < 50))), BF
  18.         _PUTIMAGE , _DEST, _DISPLAY
  19.         _LIMIT 30
  20.     LOOP WHILE k$ < "A" OR k$ > "Z"
  21.     checkKey:
  22.     LINE (x - (300 * (k$ = letter$)), y - (300 * (k$ = letter$)))-STEP(30, 30), _RGBA32(0, 0, 0, 200), BF
  23.     LINE (x - (300 * (k$ <> letter$)), y - (300 * (k$ <> letter$)))-STEP(30, 30), _RGB32(255, 255, 0), B
  24.     score& = score& + ABS(k$ = letter$) - (ABS(k$ <> letter$) * ABS(LEN(k$) > 0))
  25.     difficulty! = difficulty! - (ABS(k$ = letter$) / 100)
  26. LOOP UNTIL score& < 0 OR score& = 21
  27. _PRINTSTRING (_WIDTH / 2 - (LEN("You " + LEFT$("lose...", 7 * ABS(score& < 0)) + LEFT$("win!", 4 * ABS(score& > 0))) * 8) / 2, _HEIGHT / 2 - 8), "You " + LEFT$("lose...", 7 * ABS(score& < 0)) + LEFT$("win!", 4 * ABS(score& > 0)), 0

Edit: changed the location of the _LIMIT line so it's more processor efficient.

 [ You are not allowed to view this attachment ]  
« Last Edit: September 19, 2018, 03:12:52 pm by FellippeHeitor »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: 30 Line Game Challenge
« Reply #40 on: September 19, 2018, 01:13:56 am »
Steve: "To have fun and force one to alter their way of thinking to perform otherwise mundane tasks."  ;)

Yep! I was lost for awhile without my favorite IF but FOR does have a condition branching built-in that can be used.

Another way might be throwing an error? Like when reading data.

Offline Omerta7486

  • Newbie
  • Posts: 33
  • √𝜋²
    • View Profile
Re: 30 Line Game Challenge
« Reply #41 on: September 19, 2018, 01:18:52 am »
Quote from: bplus
Or maybe someone can start a 30 lines or less challenge without the IF condition, so all of us can compete under same rules.

We all can compete under the same rules. No conditionals. Lol. It wouldn't be much of a challenge otherwise.
The knowledge that's seeking the favor of another means the murder of self.

Latest version of my game, here  Omertris: Invasion

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: 30 Line Game Challenge
« Reply #42 on: September 19, 2018, 01:29:37 am »
Here's my entry. Capture the letter being shown by pressing it on your keyboard to score; type a wrong key and lose a point.
Twenty points and you win.

Fun and fast! It's just random letters, so it's different every time. Steve made one just like it once, but it kept spelling out "Steve is awesome" Now that gets old fast.

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

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: 30 Line Game Challenge
« Reply #43 on: September 20, 2018, 07:42:33 pm »
Hy guys
I am more asleep than how usually I am (at this time ...) :-)
 but is it  real that the challange was about NO conventional flow instructions?
No WHILE WEND, IF THEN ELSE END IF, DO WHILE LOOP, DO LOOP WHILE, DO UNTIL LOOP, DO LOOP UNTIL, >, < , >=, <=,
No trick like '$include:'Megafile.BI', or more instructions on the same linecode with :

but while I was thinking how to make an IF without an IF , I have had so many ideas but so poor productive time to code and I have forgotten the instructions ON KEY GOSUB and ON x GOSUB /facepalm a simple way to control event/variable  without IF .
In the while I've stucked into my first attempt to make an ASCII game and this is the result:
Code: QB64: [Select]
  1. _MOUSEMOVE 10, 10
  2.     mH% = mH% - 1
  3.     FOR moveHer% = mH% TO -1 STEP -1
  4.         mH% = 33000
  5.         GOSUB 2
  6.     NEXT
  7.     CLS , 1
  8.     COLOR 4, 2
  9.     _PRINTSTRING (HerY, HerX), CHR$(2)
  10.     _PRINTSTRING (1, 1), "Be Cupid! Let meet he  and she  and gain their loves ! you arrive upon her    and leftclick to meet her"
  11.     FOR fakeInput% = -1 TO _MOUSEINPUT STEP -1
  12.         FOR fakeBtn1% = -1 TO _MOUSEBUTTON(1) STEP -1
  13.             FOR match% = 0 TO (2 XOR SCREEN(_MOUSEY, _MOUSEX)) STEP -1
  14.                 _PRINTSTRING (25, 5), "    The power of love!   "
  15.                 _PRINTSTRING (15, 25), "TO PLAY AGAIN PRESS ENTER, ANY OTHER KEY TO QUIT "
  16.                 SLEEP
  17.                 FOR quit% = -1 TO _KEYDOWN(13) STEP -1
  18.                     GOTO 1
  19.                 NEXT quit%
  20.                 SYSTEM
  21.     NEXT match%, fakeBtn1%, fakeInput%
  22.     _LIMIT 200
  23. 2 HerX = INT(RND * (24 - 2)) + 2
  24. HerY = INT(RND * (80 - 2)) + 2
  25.  

Have a fun to search to catch the woman :-)
Thanks to try

PS you guys have posted very good demo
Programming isn't difficult, only it's  consuming time and coffee

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: 30 Line Game Challenge
« Reply #44 on: September 21, 2018, 08:32:03 am »
Dang! TempodiBasic nice, very nice! You did the mouse without a WHILE AND no <, >, <=, >=  but I am not sure how to play game? I try to move mouse He to She but mouse does not obey.

I just suddenly realized how to bring Terry's game back down to 30 lines AND keep the sound AND I am keeping the play going after being hit by red square, just deduct points, still has While for _MOUSEINPUT and now a little mouse arrow and a little flicker on slower machine, I am not getting much flicker:

Code: QB64: [Select]
  1. DIM box(50) AS STRING
  2. SCREEN _NEWIMAGE(640, 480, 32) ' *** YELLOW GOOD ... RED BAD ***   MOD 2 B+ 2018-09-21 remove IF's  Sound is Back! 30 lines!!!
  3.     _LIMIT 30
  4.     CLS
  5.     _PRINTSTRING (10, 10), STR$(score) 'one less line for locate
  6.     WEND
  7.     m$ = RIGHT$("0" + LTRIM$(STR$(_MOUSEX)), 3) + RIGHT$("0" + LTRIM$(STR$(_MOUSEY)), 3) ' xxxyyy
  8.     LINE (VAL(LEFT$(m$, 3)) - 10, VAL(RIGHT$(m$, 3)) - 10)-(VAL(LEFT$(m$, 3)) + 10, VAL(RIGHT$(m$, 3)) + 10), _RGB32(255, 255, 255), BF ' white box
  9.     FOR x = 1 TO 50
  10.         FOR i = -1 * ((box(x) <> "") AND (VAL(MID$(box(x), 4, 3)) <= 500)) TO 0
  11.             box(x) = RIGHT$("0" + LTRIM$(STR$(INT(RND(1) * 600) + 20)), 3) + "-40" + RIGHT$("0" + LTRIM$(STR$(INT(RND(1) * 10) + 1)), 2) + LTRIM$(STR$(INT(RND(1) * 2)))
  12.         NEXT i
  13.         box(x) = LEFT$(box(x), 3) + RIGHT$("0" + STR$(VAL(MID$(box(x), 4, 3)) + VAL(MID$(box(x), 7, 2))), 3) + RIGHT$(box(x), 3) ' add speed to y
  14.         LINE (VAL(LEFT$(box(x), 3)) - 20, VAL(MID$(box(x), 4, 3)) - 20)-(VAL(LEFT$(box(x), 3)) + 20, VAL(MID$(box(x), 4, 3)) + 20), _RGB32(255, VAL(RIGHT$(box(x), 1)) * 255, 0), BF
  15.         FOR i = -1 * (VAL(LEFT$(m$, 3)) - 10 > VAL(LEFT$(box(x), 3)) + 20 OR VAL(LEFT$(m$, 3)) + 10 < VAL(LEFT$(box(x), 3)) - 20 OR VAL(RIGHT$(m$, 3)) - 10 > VAL(MID$(box(x), 4, 3)) + 20 OR VAL(RIGHT$(m$, 3)) - 10 < VAL(MID$(box(x), 4, 3)) - 20) TO 0
  16.             jstart = (-1 * (VAL(RIGHT$(box(x), 1)) = 0))
  17.             FOR j = jstart TO 0
  18.                 score = score + 1
  19.                 SOUND 440, 1
  20.                 GOTO skip
  21.             NEXT j
  22.             SOUND 220, 1
  23.             score = score - 2
  24.             skip:
  25.             box(x) = ""
  26.         NEXT i
  27.     NEXT x
  28.  
  29.  

PS for some reason the FOR statement is not allowing me to substitute jstart into the starting slot like I did do with the other FOR starters, I wonder why? too complex an expression for FOR to handle? Can't be! just look at the iStarter!

If we could make that substitution that would give us another line to bring back _DISPLAY or _MOUSEHIDE.
« Last Edit: September 21, 2018, 10:51:09 am by bplus »