![]() |
|
Proggies - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Prolific Programmers (https://qb64phoenix.com/forum/forumdisplay.php?fid=26) +---- Forum: bplus (https://qb64phoenix.com/forum/forumdisplay.php?fid=36) +---- Thread: Proggies (/showthread.php?tid=162) |
RE: Proggies - bplus - 08-17-2025 OK that fixed now for detecting the y keypress to play again?
RE: Proggies - hsiangch_ong - 08-17-2025 https://qb64phoenix.com/forum/showthread.php?tid=162&pid=30990#pid30990 (post #223 if you're logged in. post #205 if not logged in. the summer is hot for me.) maybe somebody proposed changes like this. but it might not work on qbjs. when pressing "any" key. even a shift key alone. it was like pressing minus or plus. also i desired escape to get out of the program. didn't care to have to press enter only. so here is how i fixed it. Code: (Select All) 'Option _ExplicitRE: Proggies - bplus - 08-17-2025 @hsiangch_ong Your "fix" breaks the ability for it to spin! Pressing any key (spacebar was the intended key) was needed to spin the thing. After I got code working I wanted to take snapshots to show off different aspects so I used a spacebar key press to spin the thing to a point where I wanted to take a snapshot. The +/- keys were for just adding or subtracting arcs to spinner while it was spinning. Just add line to main loop like this: Code: (Select All) While 1RE: Proggies - dbox - 08-17-2025 (08-17-2025, 12:08 AM)bplus Wrote: OK that fixedInteresting, it works for me. It's possible that because it's in such a tight loop at the end that it was not processing the keypresses. You could try adding the following call to _Limit to the loop starting on line 248 to see if it works any better for you. It's working for me either way. Code: (Select All)
RE: Proggies - SMcNeill - 08-17-2025 You might also want a _KEYCLEAR before that loop, just in case there was something in the INKEY$ buffer making it exit automatically before entering the pause loop. RE: Proggies - bplus - 08-17-2025 Ok I tried _Limit 60 first and then _KeyClear and neither worked ? One of Life's Mysteries I guess. I did find the strike zone though ![]() RE: Proggies - bplus - 08-18-2025 I am up at 4:04 am thinking I have solution to Mystery, Nope! And even Input "";again$ doesn't work though the ? for Input does appear at the top of screen. Nope QBJS is doing the logic of all those loops inside loops different than regular QB64pe does. Oh and talk about differences between QBJS and QB64pe, in QB64 you can see the intended 2 skinny circles in the top view of the pins: Anybody else find the sure strike zone yet? RE: Proggies - bplus - 08-18-2025 (08-17-2025, 08:39 PM)dbox Wrote:(08-17-2025, 12:08 AM)bplus Wrote: OK that fixedInteresting, it works for me. It's possible that because it's in such a tight loop at the end that it was not processing the keypresses. You could try adding the following call to _Limit to the loop starting on line 248 to see if it works any better for you. It's working for me either way. Just to be clear the Bowling code in your QBJS samples is working for you because you played through a whole game and are able to reply to prompt with a y for yes and it works by starting another game of that Bowling code in a Browser? You played a whole game with the code as is in a browser, you didn't just test a little snippet? RE: Proggies - dbox - 08-18-2025 (08-18-2025, 12:24 PM)bplus Wrote: Just to be clear the Bowling code in your QBJS samples is working for you because you played through a whole game and are able to reply to prompt with a y for yes and it works by starting another game of that Bowling code in a Browser? You played a whole game with the code as is in a browser, you didn't just test a little snippet? Yep, I played through the whole thing. It prompted me to play again. I hit ‘y’ and it started a new game. (Also, you are correct that the circles may look a little different in QBJS as they are slightly thicker and antialiased.) RE: Proggies - bplus - 08-18-2025 OK thanks different systems = different results. |