Adding games

From Color 64 BBS Wiki

Programming How-To - Adding Games to 8.10a

An easy-to-customize Games module has been added (√bbs.games) that resides in the AUX 3 area. Also provided as part of this build are games I ported over for 8.1 use from older 7.37 builds. All games were coded to use the AUX3 area (H=14). I avoided using the MOD Menu only because I wanted to better customize the feel of the BBS. I also experienced errors when using it in the SD2IEC environment that to date, I have not spent time to resolve (only because things work great with the AUX3 drive idea!); I suspect it was REL file related. Also note that *all* game files are located here, including their executable and their support SEQ and REL files; their code was modified to support this.

Games included on the 8.10a Install Disks are:

  • Asylum
  • DragonSlayer
  • Star Trek
  • Empire II (updated)
  • BWF Wrestling
  • Nuke em v6
  • Big Trouble in Little China

For 8.10a, games are called by the Spare Command “1” at the main menu, which must be set up for permissions in the +SETUP program for it to work. It is up to the SYSOP to decide who can be allowed to use this function. You can also change the assigned command in +SETUP if you desire.

The games assignments are inherently "turned off" in the √bbs.games code, so any games you add you will need to go into this overlay to remove REM statements (or add a line), and add them to your available menu option in √games menu. See the snapshot below:

You can either remove the corresponding "REM" to activate the command, or just create the line with the proper menu option. The logical format is as follows:

  • User enters selection which is stored in A$
  • Lines 36200 clears out flag denoting valid selection (gm=.)
  • Lines 36201-36297 area are for valid selections, where:
* If user selection is valid (example: option "1"), then print their selection.
* Reuse A$ to print back to user an acknowledgment like "Loading Empire!"
* Set filename in I$
* Set valid selection flag GM=1
  • Line 36298 determines if we had a valid selection by checking GM flag. If there was a valid selection then it goes out to AUX3 to find the file.

Note you must have something in √games menu to display to the user their selection options.

If you are planning on using a REU and you want those games resident on it, the respective game PRG files can be moved to the main PROGRAMS drive (√sys.ramove will have to be modified to copy the files to REU). You will have to check and/or modify the game’s code to ensure it is calling the PROGRAMS drive or the AUX3 folder properly depending on where you keep everything located. Empire is one to scrutinize as it calls several program and sequential files within its code. If you are not comfortable with working these, you can just leave them where they are and don’t copy them to the REU.

One game will require setting up to operate; Big Trouble in Little China: run “BTLC SETUP”. For SD2IEC users, you can ignore the “Insert SYSTEM disk in drive 8” prompt and just press “Y” to the “OK?”; It will write the REL file in your AUX3 folder if you haven’t changed to a different directory.

I advise prior to going into operation, make sure you run each of the games as a player so everything is set up properly. This is particularly true for EMPIRE II. When you first run it, it will create all the necessary files and then put you back at the command prompt. Then when you run it again, everything will be ready to go.

Nuke’em will ask you on first run if you want to reset; you would answer “Y”. It will scroll as it creates the records and then place you back at the command prompt. This is to verify it is functioning correctly. After that is complete, run it again and it will ask if you are a new ruler. This means the records were successfully created and you are good to proceed in playing.

For Wrestle, you will need to press “8” to create the supporting REL file when you first run it. Note that this command is not displayed.


Next Section: Merging in Modules

Programming How-To