Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
can someone confirm this runs on their system?
#1
This is an old school Atari type game kind of like "Maze Craze" or "Adventure", where players race to finish a 2D maze.

The feedback I got last month was that the controls didn't work and it needed better instructions.

I have updated it to include full instructions, and tested it in QB64PE 3.10.0 and it works (in Windows 10 at least).

For anyone curious, download the attached code and give it a try. 

A main menu is displayed with some options. You can ignore most of the options, and just press 1 for instructions, and 0 to play. 

I had big plans for this game (see bottom of code for a list) but for now I just am curious if this works for anyone, 
so I would appreciate any kind of feedback one way or the other - does it work? Does it suck? Is it fun? Etc.

Thanks and have fun!


Attached Files
.bas   quadventure-1-01.bas (Size: 437.55 KB / Downloads: 53)
Reply
#2
(12-20-2023, 12:19 AM)madscijr Wrote: This is an old school Atari type game kind of like "Maze Craze" or "Adventure", where players race to finish a 2D maze.

The feedback I got last month was that the controls didn't work and it needed better instructions.

I have updated it to include full instructions, and tested it in QB64PE 3.10.0 and it works (in Windows 10 at least).

For anyone curious, download the attached code and give it a try. 

A main menu is displayed with some options. You can ignore most of the options, and just press 1 for instructions, and 0 to play. 

I had big plans for this game (see bottom of code for a list) but for now I just am curious if this works for anyone, 
so I would appreciate any kind of feedback one way or the other - does it work? Does it suck? Is it fun? Etc.

Thanks and have fun!

Works fine on 3.10.0 (32-bit) running on Windows 7 Pro 64-bit.
Was able to figure the basics without even reading the instructions.   Cool

I can see how it could be fun with the right opponent(s), but my cats are lousy at using keyboards.    Undecided

Was going to try a Linux compile, but it looks like I don't have that Linux VM set up ATM.
Reply
#3
(12-20-2023, 04:18 AM)JRace Wrote:
(12-20-2023, 12:19 AM)madscijr Wrote: for now I just am curious if this works for anyone, 
so I would appreciate any kind of feedback one way or the other - does it work? Does it suck? Is it fun? Etc.
Works fine on 3.10.0 (32-bit) running on Windows 7 Pro 64-bit.
Was able to figure the basics without even reading the instructions.   Cool

I can see how it could be fun with the right opponent(s), but my cats are lousy at using keyboards.    Undecided

Was going to try a Linux compile, but it looks like I don't have that Linux VM set up ATM.
Thanks for the feedback! Yeah, cats are all thumbs (who, ironically, lack thumbs!) LoL ;-)
Reply
#4
The top right player didn't move until I tried to go up the first time and seemed it worked fine after that. Didn't notice an issue in the other player controls.
Reply
#5
(12-20-2023, 02:45 PM)James D Jarvis Wrote: The top right player didn't move until I tried to go up the first time and seemed it worked fine after that. Didn't notice an issue in the other player controls.
Thanks for your feedback!

If they're flip screen (ie non-scrolling) mode and there's a wall just off-screen blocking the way, it can seem like the controls don't work. I plan on adding sounds for when they bump into a wall. 

Another thing to look out for is checking whether num-lock is on/off, as the game uses the numeric keypad's cursor keys for one of the players.
Reply
#6
(12-20-2023, 03:02 PM)madscijr Wrote:
(12-20-2023, 02:45 PM)Another thing to look out for is checking whether num-lock is on/off, as the game uses the numeric keypad's cursor keys for one of the players. Wrote:
Or they give the program start 

Code: (Select All)
 _Numlock Off  

ein.
and to the end of the program
Code: (Select All)
 _Numlock On  
(12-20-2023, 03:02 PM)madscijr Wrote: [quote pid="21948" dateline="1703083525"]
Another thing to look out for is checking whether num-lock is on/off, as the game uses the numeric keypad's cursor keys for one of the players.
[/quote]
Reply
#7
(12-20-2023, 04:16 PM)Steffan-68 Wrote:
(12-20-2023, 03:02 PM)madscijr Wrote:
(12-20-2023, 02:45 PM)Another thing to look out for is checking whether num-lock is on/off, as the game uses the numeric keypad's cursor keys for one of the players. Wrote:
Or they give the program start 

Code: (Select All)
 _Numlock Off  

ein.
and to the end of the program
Code: (Select All)
 _Numlock On  
(12-20-2023, 03:02 PM)madscijr Wrote: [quote pid="21948" dateline="1703083525"]
Another thing to look out for is checking whether num-lock is on/off, as the game uses the numeric keypad's cursor keys for one of the players.
[/quote]
That's great - I never knew about that command. Thank you!
Reply
#8
(12-20-2023, 04:16 PM)Steffan-68 Wrote:
(12-20-2023, 03:02 PM)madscijr Wrote: Another thing to look out for is checking whether num-lock is on/off, as the game uses the numeric keypad's cursor keys for one of the players.
Or they give the program start 
Code: (Select All)
 _Numlock Off  
and to the end of the program
Code: (Select All)
 _Numlock On  

BTW, the wiki says it's not available in Mac and Linux, I wonder why and if there's any plans to add it?

Also, on my PC, the numeric keypad keys work whether num lock is on or off...
Reply
#9
(12-20-2023, 06:30 PM)madscijr Wrote: Also, on my PC, the numeric keypad keys work whether num lock is on or off...

Is that globally or is that just within QB64? I've never seen where numkeys work when numlock is disabled. They usually behave as arrow keys. Do you have some program/plugin/service that is running that might be intercepting the numlock key?
Tread on those who tread on you

Reply
#10
(12-20-2023, 07:14 PM)SpriggsySpriggs Wrote:
(12-20-2023, 06:30 PM)madscijr Wrote: Also, on my PC, the numeric keypad keys work whether num lock is on or off...
Is that globally or is that just within QB64? I've never seen where numkeys work when numlock is disabled. They usually behave as arrow keys. Do you have some program/plugin/service that is running that might be intercepting the numlock key?
Just within QB64 - I just tested it in Notepad - with NumLock on, the numeric keypad outputs numbers, with NumLock off, it behaves like cursor keys, etc.

It might be worth noting that I use _BUTTON to detect keypresses, which might have something to do with it.

Apparently _BUTTON detects the numeric keypad keys completely seperately from the number row and cursor keys, so it doesn't matter whether NumLock is on or off.

Below is a little test program that just verifies the behavior with NumLock - run it, turn numlock off, 
then try pressing 2, 4, 6, 8 on the number row, 2, 4, 6, 8 on the numeric keypad, and the regular cursor keys. 
Then turn numlock on, and try those keys again. No difference! 

Code: (Select All)
' TEST PROGRAM TO VERIFY _BUTTON DETECTS NUMERIC KEYPAD KEYS AS CURSOR KEYS
' AND NOT NUMBERS WHETHER NUMLOCK IS ON OR OFF

Const FALSE = 0
Const TRUE = Not FALSE

' ----------------------------------------------------------------------------------------------------------------------------------------------------------------
' BEGIN KEYBOARD CODE CONSTANTS FOR _BUTTON #KEYBOARD
' ----------------------------------------------------------------------------------------------------------------------------------------------------------------

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' FUNCTION KEYS ROW
Const c_bKey_Esc% = 2
Const c_bKey_F1% = 60
Const c_bKey_F2% = 61
Const c_bKey_F3% = 62
Const c_bKey_F4% = 63
Const c_bKey_F5% = 64
Const c_bKey_F6% = 65
Const c_bKey_F7% = 66
Const c_bKey_F8% = 67
Const c_bKey_F9% = 68
'UNKNOWN: Const c_bKey_F10% = '(_BUTTON code unknown)
Const c_bKey_F11% = 88
Const c_bKey_F12% = 89

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' NUMBERIC ROW
Const c_bKey_Tilde% = 42
Const c_bKey_1% = 3
Const c_bKey_2% = 4
Const c_bKey_3% = 5
Const c_bKey_4% = 6
Const c_bKey_5% = 7
Const c_bKey_6% = 8
Const c_bKey_7% = 9
Const c_bKey_8% = 10
Const c_bKey_9% = 11
Const c_bKey_0% = 12
Const c_bKey_Minus% = 13
Const c_bKey_Equal% = 14
Const c_bKey_BkSp% = 15

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' QWER ROW
Const c_bKey_Tab% = 16
Const c_bKey_Q% = 17
Const c_bKey_W% = 18
Const c_bKey_E% = 19
Const c_bKey_R% = 20
Const c_bKey_T% = 21
Const c_bKey_Y% = 22
Const c_bKey_U% = 23
Const c_bKey_I% = 24
Const c_bKey_O% = 25
Const c_bKey_P% = 26
Const c_bKey_BracketLeft% = 27
Const c_bKey_BracketRight% = 28
Const c_bKey_Backslash% = 44

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' ASDF ROW
Const c_bKey_CapsLock% = 59
Const c_bKey_A% = 31
Const c_bKey_S% = 32
Const c_bKey_D% = 33
Const c_bKey_F% = 34
Const c_bKey_G% = 35
Const c_bKey_H% = 36
Const c_bKey_J% = 37
Const c_bKey_K% = 38
Const c_bKey_L% = 39
Const c_bKey_Semicolon% = 40
Const c_bKey_Apostrophe% = 41
Const c_bKey_Enter% = 29

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' ZXCV ROW
Const c_bKey_ShiftLeft% = 43
Const c_bKey_Z% = 45
Const c_bKey_X% = 46
Const c_bKey_C% = 47
Const c_bKey_V% = 48
Const c_bKey_B% = 49
Const c_bKey_N% = 50
Const c_bKey_M% = 51
Const c_bKey_Comma% = 52
Const c_bKey_Period% = 53
Const c_bKey_Slash% = 54
Const c_bKey_ShiftRight% = 55

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' SPACEBAR ROW
Const c_bKey_LeftCtrl% = 30
Const c_bKey_WinLeft% = 348
'UNKNOWN: Const c_bKey_AltLeft% = '(_BUTTON code unknown)
Const c_bKey_Spacebar% = 58
'UNKNOWN: Const c_bKey_AltRight% = '(_BUTTON code unknown)
Const c_bKey_WinRight% = 349
Const c_bKey_Menu% = 350
Const c_bKey_RightCtrl% = 286

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' NAVIGATION KEYS
Const c_bKey_Ins% = 339
Const c_bKey_Home% = 328
Const c_bKey_PgUp% = 330
Const c_bKey_Del% = 340
Const c_bKey_End% = 336
Const c_bKey_PgDn% = 338

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' CURSOR KEYS
Const c_bKey_Up% = 329
Const c_bKey_Left% = 332
Const c_bKey_Down% = 337
Const c_bKey_Right% = 334

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' PRINT SCREEN, SCROLL LOCK, PAUSE/BREAK SECTION
'UNKNOWN: Const c_bKey_PrintScreen% = '(_BUTTON code unknown)
Const c_bKey_ScrollLock% = 71
'UNKNOWN: Const c_bKey_PauseBreak% = '(_BUTTON code unknown)

' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
' NUMERIC KEYPAD
Const c_bKey_NumLock% = 326
Const c_bKey_KeypadSlash% = 310
Const c_bKey_KeypadMultiply% = 56
Const c_bKey_KeypadMinus% = 75

Const c_bKey_Keypad7Home% = 72
Const c_bKey_Keypad8Up% = 73
Const c_bKey_Keypad9PgUp% = 74
Const c_bKey_KeypadPlus% = 79

Const c_bKey_Keypad4Left% = 76
Const c_bKey_Keypad5% = 77
Const c_bKey_Keypad6Right% = 78

Const c_bKey_Keypad1End% = 80
Const c_bKey_Keypad2Down% = 81
Const c_bKey_Keypad3PgDn% = 82
Const c_bKey_KeypadEnter% = 285

Const c_bKey_Keypad0Ins% = 83
Const c_bKey_KeypadPeriodDel% = 84
' ----------------------------------------------------------------------------------------------------------------------------------------------------------------
' END KEYBOARD CODE CONSTANTS FOR _BUTTON @KEYBOARD
' ----------------------------------------------------------------------------------------------------------------------------------------------------------------

' BASIC PROGRAM METADATA
Dim Shared m_ProgramPath$: m_ProgramPath$ = Left$(Command$(0), _InStrRev(Command$(0), "\"))
Dim Shared m_ProgramName$: m_ProgramName$ = Mid$(Command$(0), _InStrRev(Command$(0), "\") + 1)

' START THE MAIN ROUTINE
main

' FINISH
System ' return control to the operating system
End

' /////////////////////////////////////////////////////////////////////////////

Sub main
    Do
        While _DeviceInput(1): Wend ' clear and update the keyboard buffer

        Cls

        Color 0, 3: Print "CURSOR  KEYS  :";: Color 7, 0: Print " ";
        If _Button(c_bKey_Left) Then Color 0, 7 Else Color 7, 0
        Print "LEFT";
        Color 7, 0: Print "     ";
        If _Button(c_bKey_Right) Then Color 0, 7 Else Color 7, 0
        Print "RIGHT";
        Color 7, 0: Print "      ";
        If _Button(c_bKey_Up) Then Color 0, 7 Else Color 7, 0
        Print "UP";
        Color 7, 0: Print "        ";
        If _Button(c_bKey_Down) Then Color 0, 7 Else Color 7, 0
        Print "DOWN";
        Color 7, 0: Print: Print

        Color 0, 3: Print "NUMERIC KEYPAD:";: Color 7, 0: Print " ";
        If _Button(c_bKey_Keypad4Left) Then Color 0, 7 Else Color 7, 0
        Print "4/LEFT";
        Color 7, 0: Print "   ";
        If _Button(c_bKey_Keypad6Right) Then Color 0, 7 Else Color 7, 0
        Print "6/RIGHT";
        Color 7, 0: Print "    ";
        If _Button(c_bKey_Keypad8Up) Then Color 0, 7 Else Color 7, 0
        Print "8/UP";
        Color 7, 0: Print "      ";
        If _Button(c_bKey_Keypad2Down) Then Color 0, 7 Else Color 7, 0
        Print "2/DOWN";
        Color 7, 0: Print: Print

        Color 0, 3: Print "NUMBER  KEYS  :";: Color 7, 0: Print " ";
        If _Button(c_bKey_4) Then Color 0, 7 Else Color 7, 0
        Print "4";
        Color 7, 0: Print "        ";
        If _Button(c_bKey_6) Then Color 0, 7 Else Color 7, 0
        Print "6";
        Color 7, 0: Print "          ";
        If _Button(c_bKey_8) Then Color 0, 7 Else Color 7, 0
        Print "8";
        Color 7, 0: Print "         ";
        If _Button(c_bKey_2) Then Color 0, 7 Else Color 7, 0
        Print "2";
        Color 7, 0: Print: Print
       
        Color 0, 3: Print "LOCK    KEYS  :";: Color 7, 0: Print " ";
        If _NumLock Then
            Color 0, 7
            Print "_NumLock=TRUE";
        Else
            Color 7, 0
            Print "_NumLock=FALSE";
        End If
       
        Color 7, 0
        Print: Print
        Print "PRESS <ESC> TO EXIT"

        If _Button(c_bKey_Esc) Then Exit Do

        _Limit 100 ' keep loop at 100 frames per second
    Loop Until _KeyDown(27) ' leave loop when ESC key pressed

    ' CLEAR KEYBOARD BUFFER
    _KeyClear: '_DELAY 1

End Sub ' main
Reply




Users browsing this thread: 4 Guest(s)