old QB Defender game - anyone want to try to bring this up to speed?
#10
(03-31-2023, 07:16 PM)madscijr Wrote:
(03-31-2023, 05:34 PM)TempodiBasic Wrote: Hi 
Madscjr
running it in QB64pe after turnig  DEF FNRND into FUNCTION FNRND  I got a broken game that leaves so  many garbage on the screen.
Putting a _LIMIT 10 into main loop the result does not change.

I am seeing graphics but the player's ship doesn't get erased from the old position when you move (I had to hack on some new keyboard reading routines). Also it isn't drawing the mountains / terrain. 
The program is a mess, it could probably serve as a template or framework for someone who wouldn't mind rewriting the outdated QuickBasic 4.5 parts.

The same is my experience after changing DEF FNRND to FUNCTION FNRND  (there is no global variable changed here, so localization does not break anything)  and after adding _LIMIT 10 to get a more slowed output.
Moreover the ship moves alone without my input and fires by itsself.
I hear no sound in the game also if there are 2 functions to manage the soundblaster.


However I think that the main issue is the massive direct access to the registry of graphic card and of soundblaster card...
why? Because if you kook into functions Adlib and AdlibFx (num)  you see a massive calling of SUBroutine WirteReg(reg,value) that in its turn uses massively  OUT and INP ...
well, this QBasic keywords are emulated and there is no real direct access to a specific port of Motherboard (direct hardware access)
see QB64 Wiki for detailed informations: OUT wiki page  INP wiki page.[/url]

Joystick function also uses INP and OUT
Keyboard function uses PEEK to get status of keys Ctrl and Alt, and Peek/Poke are emulated into QB64 read here [url=https://qb64phoenix.com/qb64wiki/index.php/PEEK]Peek wiki page
.

In colllision the laser are not checked against colonists.


I agree with mnrvovrfc  that the global variables are declared in wrong way using COMMON, because COMMON has its goal into declaring global variables  shared among two or more programs linked with CHAIN keywords  COMMON wiki page
this is a CHAIN/ COMMON SHARED related thread CHAIN thread
Reply


Messages In This Thread
RE: old QB Defender game - anyone want to try to bring this up to speed? - by TempodiBasic - 04-01-2023, 01:44 PM



Users browsing this thread: 29 Guest(s)