Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Space Blaster: The Sentinel
#11
   

I tried this again, and this time it accepted "I WIN!!" as an entry. 

I looked at the code, I don't see anything in there that would screw up at the save routine.  This very well could've just been a "ME" problem.  As I mentioned, this is the newest laptop from Alienware and here's the basic keyboard layout:

[Image: Alienware-18-Area-51-2025-Features-05-1536x924.jpeg]

As you can see, the right side has no CTRL key.  Instead, they add a large ass "COPILOT" key which is annoying as heck, and all the other keys are crammed in there together and different from my last laptop's layout.  (This has the full keyboard, which I love, whereas my old laptop only had 90ish keys and a minimalist keyboard.)  I'm still getting used to mapping my fingers to the current key configuration and could have simply just tapped ENTER instead of that SHIFT key on the right.   

You can see though, it saved my first blank name score.   Then the "I WIN!!" worked properly for the second try.   Since you can't reproduce the issue, and since it's working *now*, and the code doesn't show any obvious issues which might crash it with such a combination of keypresses, just chalk it up to "Working, but Steve has arthritis, fat fingers, and a new keyboard layout, and probably just screwed up."  LOL!!   

At least, that would be my working theory on it, until the issue showed up again, or somebody else could reproduce the same glitch in some other way.
Reply
#12
LOL, well I’m glad it worked for you and the code looks clean. And, hey, you tripled your score! Well done, space cadet. Thanks for digging deeper.
Reply
#13
(10-03-2025, 05:42 AM)NakedApe Wrote: LOL, well I’m glad it worked for you and the code looks clean. And, hey, you tripled your score! Well done, space cadet. Thanks for digging deeper.

Here's an idea which easily explains what might have happened, and also a suggestion for you:

Let's assume my fingers are fat and these keys are incredible close together.  (Which is both quite true.)  It's not much of a stretch to imagine I reached for the Shift key and tapped the corner of the Enter key as well.

*That* would explain the entire "crash" sequence and what we see with the screenshot. (Just assume I hit Enter *before* I tapped Shift.)
ENTER for a blank name for the high score screen.
Instant transition to the next screen and input from SHIFT to close the program.

So a few ideas/suggestions here:
1) Add a _DELAY before the input routine to continue/quit.  That would give the user time to get their fingers off the keys, the system to register any keystrokes, and such.  Hell, as close as these keys are, I could've hit ENTER and the arrow key, and *both* would read as INKEY$ keypresses.  A _DELAY of even minor time could give time for the user to let up on any keys, then add a _KEYCLEAR after it before your input loop to clear the buffer.

Simple as:
_DELAY .2 'time to release keys or stop system repeat
_KEYCLEAR
DO
   input$ loop
LOOP

OR perhaps:

2) For more visibility and user comfort, remove that "Continue" input routine as it exists completely.   Instead, swap in a _MessageBox call to do that work instead.

https://qb64phoenix.com/qb64wiki/index.p...(function)

continue = _MESSAGEBOX("Quit Game", "Do you want to play again?", "yesno", "question")

The second option there allows for mouse control and keyboard selection, with an interface that most people would instantly recognize.



Just something to consider for that transition between those two screens/inputs. Wink
Reply
#14
Thanks for the suggestions. I made a couple little changes that'll prevent fat finger issues from happening: one character minimum required for your player handle at the high score board, and no more 'any key to end' - gotta mouse click or press <esc> now.  Updated the zip file in the first post.  Smile
Reply
#15
UPDATED: This game now supports JOYSTICKS! Use the stick to spin left and right, assign joystick buttons for firing lasers and switching ship's rotation.
Reply
#16
Well I'll be DAMNED! This looks awesome!!!

Fully retro vibe but done soooooo well I have to tip my hat to you sir! it's things like this that made me interested in games and coding in the first place so nostalgia points are added to! +1 From me!

Unseen

[quote pid="36127" dateline="1758567861"]

[/quote]
Reply
#17
Thanks, @Unseen Machine!! It's great to get positive feedback.  Smile   If you like this game (shameless plug here), try my other, bigger game: Rock Jockey.  It's also very retro (due to my limited programming abilities), but is full of surprises. I'm gonna try to get that one to support joysticks next.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Poly Blaster - a physics-based ball blasting game! RokCoder 30 6,808 02-03-2025, 08:35 AM
Last Post: hsiangch_ong
  Space Explorer johannhowitzer 19 4,012 04-30-2024, 03:44 PM
Last Post: bplus

Forum Jump:


Users browsing this thread: 2 Guest(s)