Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Restart a Bogged Down Program
#15
Well, I think I discovered the issue. I tried running my program on a newer computer on QB64 version 3.6.0 instead of version 2.0.2 on the older machine and, voila, no more sluggishness after the warp sub.  Smile  Here's the sub that was causing issues before . . .

SUB warpTravel () '                                                      *** WARP TRAVEL EXECUTABLE LOOP ***

    DIM AS INTEGER speed, warp
    DIM i AS STRING
    DIM warpSound AS LONG
    DIM back2SubSound AS LONG

    speed = 15: warp = 4:
    warpSound = _SNDOPEN("going.wav")
    IF warpSound = 0 THEN SOUND 120, 1 ELSE _SNDLOOP warpSound

    DO UNTIL i = "b" '          escape from warpTravel and back to sublight by hitting back ("b") button - for now
        i = INKEY$
        CLS
        _LIMIT speed
        moveFarStars: drawFarStars '
        moveMidStars: drawMidStars '
        moveNearStars: drawNearStars '
        drawViewScreen
        _DISPLAY '                                                                          *** TEMP USER INPUT ***
        IF i = "p" THEN WHILE INKEY$ = "": WEND '                                          pause
        IF i = "f" AND warp < 8 THEN speed = speed + 3: SOUND 650, .8: warp = warp + 1 '    faster
        IF i = "s" AND warp > 0 THEN speed = speed - 1: SOUND 960, .5: warp = warp - 1 '    slower
        IF i = CHR$(27) THEN SYSTEM
    LOOP '                                                                                  warp value to be used for displaying speed...

    _SNDCLOSE warpSound
    back2SubSound = _SNDOPEN("back2SubLight.wav")
    IF back2SubSound = 0 THEN SOUND 100, 1 ELSE _SNDPLAY back2SubSound '
    _AUTODISPLAY '                                                                          needed for speedy lightening effect
    lightning
    _SNDCLOSE back2SubSound

END SUB '                                                                                  *** END WARP TRAVEL EXE LOOP ***
Reply


Messages In This Thread
RE: How to Restart a Bogged Down Program - by NakedApe - 04-22-2023, 10:28 PM
RE: How to Restart a Bogged Down Program - by jcm - 04-23-2023, 03:00 AM



Users browsing this thread: 6 Guest(s)