Adding games: Difference between revisions

From Color 64 BBS Wiki
m Protected "Adding games" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
No edit summary
 
Line 1: Line 1:
[[programming how to|Programming How-To]] - <strong>Adding Games to 8.10a</strong>
[[programming how to|Programming How-To]] - <strong>Adding Games to 8.10a</strong>


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.  
An easy-to-customize Games module (<strong>√bbs.games</strong>) has been added that resides in the AUX3 area. Also included with this build are several games that were ported from older 7.37 systems and updated for use with Color 64 v8.1. All games were coded to use the AUX3 area (<code>H=14</code>).


Games included on the 8.10a Install Disks are:
The Mod Menu was intentionally avoided so the overall look and feel of the BBS could be customized more easily. During testing, occasional errors were encountered when using the Mod Menu in an SD2IEC environment. These issues were not investigated further because the AUX3 approach worked reliably. The issue is suspected to be related to REL file handling.
* 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.
All files required by the games are located in the AUX3 area, including the executable program files as well as their supporting SEQ and REL files. In several cases, the original game code was modified to support this arrangement.


The games assignments are inherently "turned off" in the <strong>√bbs.games</strong> 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 <strong>√games menu</strong>. See the snapshot below:  
 
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 version 8.10a, games are accessed using <strong>Spare Command 1</strong> from the main BBS menu. This command must be enabled in the <strong>+SETUP</strong> program in order for it to function.
 
The SYSOP can determine which access levels are permitted to use this command. The command assignment itself can also be changed through <strong>+SETUP</strong> if desired.
 
 
The game assignments are intentionally disabled in the <strong>√bbs.games</strong> overlay by default. This allows the SYSOP to control which games are active. To enable a game, edit the overlay and remove the corresponding <code>REM</code> statement (or add a new line) and add the option to the menu displayed in <strong>√games menu</strong>.
 
See the example below:


[[File:bbsgamessnapshot.png|center|400px]]
[[File:bbsgamessnapshot.png|center|400px]]


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 <strong>GM=1 </strong>
* 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 <strong>√games menu</strong> to display to the user their selection options.   
You may either remove the corresponding <code>REM</code> statement to activate a command, or create a new program line with the appropriate menu option.
 
The selection logic operates as follows:
 
* The user enters a menu selection which is stored in <strong>A$</strong>.
* Line <strong>36200</strong> clears the flag that indicates whether a valid selection was made (<code>GM=.</code>).
* Lines <strong>36201–36297</strong> contain the command checks for valid selections.
 
For each valid selection:
 
* The program checks if the user's entry matches the option.
* The selection is echoed back to the user.
* <strong>A$</strong> is reused to print a confirmation message (for example: “Loading Empire!”).
* The game filename is stored in <strong>I$</strong>.
* The valid-selection flag is set (<code>GM=1</code>).
 
Line <strong>36298</strong> checks the value of <strong>GM</strong>. 
If a valid selection was made, the program branches to AUX3 to locate and load the requested file.
 
Note that the file <strong>√games menu</strong> must contain the menu text shown to users so they know which options are available.
 
 
If you are using a REU and want the games to reside in REU memory, the game PRG files can be moved to the main PROGRAMS drive. In this case, the utility <strong>√sys.ramove</strong> must be modified so that it copies these files into the REU.
 
If you choose to do this, you will need to verify that each game's code references the correct drive location (PROGRAMS or AUX3). Some games reference additional files internally. <strong>Empire II</strong> should be examined carefully because it loads multiple program and sequential files during execution.
 
If you are not comfortable modifying these programs, it is recommended that you simply leave them in the AUX3 area and do not attempt to relocate them to the REU.
 
 
One game requires an initial setup procedure before it can be used:
 
<strong>Big Trouble in Little China</strong>
 
Run the program <code>BTLC SETUP</code>.
 
For SD2IEC users, when prompted with:
 
Insert SYSTEM disk in drive 8
 
you may simply press <strong>Y</strong> when asked <em>“OK?”</em>.   
The program will create the required REL file in the AUX3 directory unless you have changed directories beforehand.
 
 
Before placing the BBS into operation, it is recommended that the SYSOP run each game at least once as a player to ensure that all required files are created properly.


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.  
This is particularly important for <strong>Empire II</strong>. 
The first time the program runs it will create all required files and then return to the command prompt. Running the program a second time will start the game normally.


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.  
<strong>Nuke’em</strong> requires initialization on first run.
When prompted to reset the game, answer <strong>Y</strong>. The program will scroll while creating the required records and then return to the command prompt.


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.  
After initialization, run the program again. If it asks whether you are a new ruler, the initialization was successful and the game is ready to play.


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.


For <strong>BWF Wrestling</strong>, press <strong>8</strong> the first time the program runs to create the required REL file. 
Note that this command is not displayed on the screen.


Next Section: [[merging modules|Merging in Modules]]
Next Section: [[merging modules|Merging in Modules]]


[[programming how to|Programming How-To]]
[[programming how to|Programming How-To]]

Latest revision as of 14:40, 7 March 2026

Programming How-To - Adding Games to 8.10a

An easy-to-customize Games module (√bbs.games) has been added that resides in the AUX3 area. Also included with this build are several games that were ported from older 7.37 systems and updated for use with Color 64 v8.1. All games were coded to use the AUX3 area (H=14).

The Mod Menu was intentionally avoided so the overall look and feel of the BBS could be customized more easily. During testing, occasional errors were encountered when using the Mod Menu in an SD2IEC environment. These issues were not investigated further because the AUX3 approach worked reliably. The issue is suspected to be related to REL file handling.

All files required by the games are located in the AUX3 area, including the executable program files as well as their supporting SEQ and REL files. In several cases, the original game code was modified to support this arrangement.


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 version 8.10a, games are accessed using Spare Command 1 from the main BBS menu. This command must be enabled in the +SETUP program in order for it to function.

The SYSOP can determine which access levels are permitted to use this command. The command assignment itself can also be changed through +SETUP if desired.


The game assignments are intentionally disabled in the √bbs.games overlay by default. This allows the SYSOP to control which games are active. To enable a game, edit the overlay and remove the corresponding REM statement (or add a new line) and add the option to the menu displayed in √games menu.

See the example below:


You may either remove the corresponding REM statement to activate a command, or create a new program line with the appropriate menu option.

The selection logic operates as follows:

  • The user enters a menu selection which is stored in A$.
  • Line 36200 clears the flag that indicates whether a valid selection was made (GM=.).
  • Lines 36201–36297 contain the command checks for valid selections.

For each valid selection:

  • The program checks if the user's entry matches the option.
  • The selection is echoed back to the user.
  • A$ is reused to print a confirmation message (for example: “Loading Empire!”).
  • The game filename is stored in I$.
  • The valid-selection flag is set (GM=1).

Line 36298 checks the value of GM. If a valid selection was made, the program branches to AUX3 to locate and load the requested file.

Note that the file √games menu must contain the menu text shown to users so they know which options are available.


If you are using a REU and want the games to reside in REU memory, the game PRG files can be moved to the main PROGRAMS drive. In this case, the utility √sys.ramove must be modified so that it copies these files into the REU.

If you choose to do this, you will need to verify that each game's code references the correct drive location (PROGRAMS or AUX3). Some games reference additional files internally. Empire II should be examined carefully because it loads multiple program and sequential files during execution.

If you are not comfortable modifying these programs, it is recommended that you simply leave them in the AUX3 area and do not attempt to relocate them to the REU.


One game requires an initial setup procedure before it can be used:

Big Trouble in Little China

Run the program BTLC SETUP.

For SD2IEC users, when prompted with:

Insert SYSTEM disk in drive 8

you may simply press Y when asked “OK?”. The program will create the required REL file in the AUX3 directory unless you have changed directories beforehand.


Before placing the BBS into operation, it is recommended that the SYSOP run each game at least once as a player to ensure that all required files are created properly.

This is particularly important for Empire II. The first time the program runs it will create all required files and then return to the command prompt. Running the program a second time will start the game normally.


Nuke’em requires initialization on first run. When prompted to reset the game, answer Y. The program will scroll while creating the required records and then return to the command prompt.

After initialization, run the program again. If it asks whether you are a new ruler, the initialization was successful and the game is ready to play.


For BWF Wrestling, press 8 the first time the program runs to create the required REL file. Note that this command is not displayed on the screen.

Next Section: Merging in Modules

Programming How-To