Page 1 of 2
Game Launcher
Posted: Sat Mar 23, 2024 10:08 am
by t0nyt
This is my first QL basic program in nearly 35+ years (and first basic program on any system for about 8 years) so please be gentle!
It's pretty basic (pun intended)
Having put some games on my QIMSI (WIN2_GAMES_<game folder>_) I wanted a simple to maintain menu system
It needs TK2 (I think) and SUB pre-loaded. The games are listed in data statements from line 8000 onwards ("Title of Game", "Folder Name","Information/Warning or nothing")
When a game is selected (e.g. Hopper) it maps the folder (e.g. WIN2_GAMES_HOPPER_) to FLP1 (using SUB) so that mdv1/2 are still working where a game needs the original mdv available and calls the flp1_boot file
Don't know if anyone else has a use for this but thought I'd make it available (BAS file is in a floppy image as I had issues with the cursor characters getting corrupted when copy/pasting)
Re: Game Launcher
Posted: Sat Mar 23, 2024 2:41 pm
by t0nyt
Fixed a typo that causes a crash if you press enter instead of space to select
Re: Game Launcher
Posted: Sun Mar 24, 2024 8:34 am
by badaman
t0nyt wrote: ↑Sat Mar 23, 2024 10:08 am
This is my first QL basic program in nearly 35+ years (and first basic program on any system for about 8 years) so please be gentle!
Congratulations!
I leave this address in case it can be of help to you. The program needs polishing, but does not require extension.
viewtopic.php?t=4709
Attention. Text in Spanish that needs translation.
Re: Game Launcher
Posted: Sun Mar 24, 2024 9:26 am
by Derek_Stewart
HI,
Nice games loader.
Have a look at the QL Games Cartridge, there is an on screen menu system that might give ideas.
Re: Game Launcher
Posted: Sun Mar 24, 2024 10:49 am
by t0nyt
Thanks for the comments
Have made some cosmetic changes
I found I had to put in some extra code to handle "TYPE 22" so am working on some mods to handle this automatically instead of specific code for a particular game
Re: Game Launcher
Posted: Sun Mar 24, 2024 11:22 am
by t0nyt
Latest version with the new cosmetics and a change to the data statements
Now it's DATA "Description","FOLDERNAME","Warning/Info/Nothing","Device e.g. FLP or MDV",<number of devices>
So a normal game might be DATA "Hopper","HOPPER","A Frog Game","FLP",1
But Type 22 might be DATA "Type 22","TYPE22","","MDV",2
This maps folder WIN2_GAMES_TYPE22 to MDV1 and WIN2_GAMES_TYPE22b to MDV2 (3 would be TYPE22c etc.)
It always runs FLP1_boot or MDV1_boot
Not planning any more changes as it does what I require now
Re: Game Launcher
Posted: Mon Mar 25, 2024 8:09 am
by t0nyt
Ok, one final "final" release
I decided to make it more flexible so it's not limited to WIN2_GAMES_folder_boot and also to allow lrun without mapping a device with SUB
The options are along the lines of:
DATA "Type 22","GAMES_TYPE22","A War Game","WIN2","FLP",2 (folder is now the full path and added a field for base device)
Which would map flp1_to win2_games_type22 and flp2_to win2_games_type22b and lrun flp1_boot
DATA "My Program","win1_utility_myprog","A Program","","",1
Which would just lrun win1_utility_myprog
Re: Game Launcher
Posted: Mon Mar 25, 2024 7:12 pm
by t0nyt
t0nyt wrote: ↑Mon Mar 25, 2024 8:09 am
Ok, one final "final" release
I decided to make it more flexible so it's not limited to WIN2_GAMES_folder_boot and also to allow lrun without mapping a device with SUB
The options are along the lines of:
DATA "Type 22","GAMES_TYPE22","A War Game","WIN2","FLP",2 (folder is now the full path and added a field for base device)
Which would map flp1_to win2_games_type22 and flp2_to win2_games_type22b and lrun flp1_boot
DATA "My Program","win1_utility_myprog","A Program","","",1
Which would just lrun win1_utility_myprog
There's a bug I missed that mainly effects mapping multiple devices
There should be a "Next x" as per the code below, sorry
Code: Select all
910 END IF
915 NEXT X
920 SUB_USE DevName$(Selection)
Re: Game Launcher
Posted: Tue Apr 09, 2024 7:18 pm
by t0nyt
Have now merged my game launcher into a general menu (same sort of look as game launcher) that supports folders at the first level (so now games appear under a "games" folder entry)
Have also added a memory size parameter so that when a program that won't run in 896k, like Vroom, is selected it adjusts the memory size (which causes a reboot) but once F1/F2 is pressed it then automatically does all the sub stuff and launches the program without any further intervention
Quite pleased with it!
It's pretty much tailored to my drive layout though, so will only bother attaching the code if I find time to make it easily re-configurable (but happy to post the code if anyone's interested)
Re: Game Launcher
Posted: Wed Apr 10, 2024 12:00 am
by martyn_hill
Hi Tony!
Thanks for sharing your work on this useful utility.
Please do post your latest Launcher code as it stands - between us, we can either tune it to our particular file layouts or make it configurable
I've had ideas and half written routines to present a slightly more graphical launcher, with small cameo screen grabs of each game and would be happy to use your work as a way to streamline my own effort!