old QB Defender game - anyone want to try to bring this up to speed?
#30
(04-26-2023, 12:32 AM)TempodiBasic Wrote: Hey 
I have just tried to run the game (option 1) and I got an error at line 2115!  It seems that there is a problem with variable maxcolonists.
Reading at starting file there are some DIMming of array with dimension maxcolonists while maxcolonists is one of the Common Shared variable, but it has been initialized into the code after these declaration of arrays.
Moving these initializations of variables at the bottom of the are Common Shared, the game starts to work with all its inner problems about graphics and sounds.
...

Strange, I could have swore it ran before posting that code, but yeah, the declarations need to come before variable assignment. As a general rule I always like to declare my variables all together near the top. First constants, second types, third shared variables.

Another thing to fix I realized is the test for the presence of a joystick needs to come inside the menu loop, at the top. That way you can plug a controller in without having to restart the program.

If we want the real arcade graphics, we will need to go download the sprite sheet from the link in the program commentsthis page, and rework it to use sprites. Also will need to fix the routines that draw the landscape.

More later when I'm back at the computer!
Reply


Messages In This Thread
RE: old QB Defender game - anyone want to try to bring this up to speed? - by madscijr - 04-26-2023, 03:45 AM



Users browsing this thread: 8 Guest(s)