I made a classic mac game in HyperCard, and made some modifications / improvements to Mini vMac in the process

About Mini vMac and all other 68k emulators, including SoftMac, Executor, and MESS.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
bribri
Student Driver
Posts: 16
Joined: Tue Apr 04, 2023 4:20 am

I made a classic mac game in HyperCard, and made some modifications / improvements to Mini vMac in the process

Post by bribri »

I had made reference to working on a project using Mini vMac elsewhere in the forums. That project is now done! It's a funny little platformer game I made in HyperCard called Blah Blob. You can download it here:

Image
https://bribrikendall.itch.io/blah-blob]


I wanted to share it with the community here since it's been an important resource in me completing it. I spent nearly all of my time working on the project in a custom-built version of Mini vMac running System 7.1. It was a lot of fun! :smile:

Since I wanted to be able to distribute the game in a way that was easy for people to play, meaning it's basically just a single executable that they could run, I made some modifications to Mini vMac to facilitate that. The changes include:
  • For macOS builds, it looks for a Macintosh ROM file in the app bundle's Resources directory
  • On startup it copies important disk images to an appropriate place in the user's home directory for when it's running in a read-only environment, namely in a signed macOS app bundle or in a Linux AppImage
  • It automatically loads those disk images from that place in the user's home directory
  • I added a script for bundling everything into a Linux AppImage for Linux distribution
  • I customized the emulator's window title and desktop icon
This allows it to just automatically boot up a copy of System 7 with my game loaded up on it (and aliased into the Startup Items folder) when users launch the emulator.

I made a few quality of life improvements too:
  • The emulator stretches to fill the screen when in full screen mode for macOS and SDL builds
  • For multi-monitor systems, it goes full screen on whichever display contains its window rather than only the main display
  • Alt+Enter / Command+F now toggle full screen mode, since that keystroke is more conventional than Ctrl+F
All of the source code for the game and the modified Mini vMac are up in a github repo here: https://github.com/briankendall/blah-blob

Those changes are currently hard coded for Blah Blob and a particular configuration for Mini vMac (namely Macintosh II, monochrome 512x342 display, magnify enabled, "All out" speed), but I'm thinking of making a new repo that factors the Blah Blob specific stuff out into a single configuration file (or something) so that others can use it for classic Mac OS distribution too, at least until such a point that others can make use of something like MACE. (Which I hope will happen someday!) Is that something folks here would be interested in?

(Also, I'll briefly acknowledge that I know including a Macintosh ROM files as part of a distribution like this is questionable and there are people that don't recommend doing so. But I decided to do it anyway since I'll lose 98% of potential players of my game if they have to go searching the internet for a specific ROM file, download it, and copy it to the right place before the game will even launch. People are hosting ROM files all over the internet (including on GitHub), so I don't think anyone cares. Hopefully I don't get into any trouble for it!)
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: I made a classic mac game in HyperCard, and made some modifications / improvements to Mini vMac in the process

Post by emendelson »

This is brilliant. Very well done, and a major advance for mini vMac. I certainly hope this project will develop into a general-purpose self-contained mini vMac that would make it easy to distribute apps and games. Thank you for all your effort into this.

About distributing old ROMs: I've been doing this for years in my self-contained BasiliskII and SheepShaver apps (based on AppleScript), and I (for various reasons) know that Apple knows that I've been doing this. I've never heard a word from anyone at Apple about it.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: I made a classic mac game in HyperCard, and made some modifications / improvements to Mini vMac in the process

Post by adespoton »

It's nice to see the macOS Mini vMac feature in Linux App bundles :)

I haven't looked at your modifications yet, but I presume they work like the Mini vMac.app feature where you can drop an mnvn_dat folder inside the Contents folder and load it up with the rom and disk#.dsk files, which load in order of the number indicated by #.

I've always used that format and created an alias of mnvm_dat in my user folder with an appropriate name, so I can just double click the app to run the OS version I want, and easily mess with the images and content.

Next thing that's needed is an easy way to create an HFS loopback mount partition in Linux for the disk images, for easy content manipulation.
bribri
Student Driver
Posts: 16
Joined: Tue Apr 04, 2023 4:20 am

Re: I made a classic mac game in HyperCard, and made some modifications / improvements to Mini vMac in the process

Post by bribri »

adespoton wrote: Tue May 23, 2023 2:57 am I haven't looked at your modifications yet, but I presume they work like the Mini vMac.app feature where you can drop an mnvn_dat folder inside the Contents folder and load it up with the rom and disk#.dsk files, which load in order of the number indicated by #.
Somehow I missed that putting files inside Contents/mnvn_dat/ was an option! But yes, it's basically the same thing.

Probably the most important feature though is being able to copy base disk images out of the app bundle or AppImage filesystem into the user directory so that they can be modified. Blah Blob actually copies two disk images: one containing the game itself and system so that it'll boot, and another specifically for the game's preferences and save data. It also writes out a file indicating the version of the app. Should I ever make a new version that requires updating the game, it'll check the current version vs. the installed version, and if the current version is newer then copy the new game disk image over top of the old one, but leave the data image in place. This same technique could in theory be used to update any piece of classic mac software "wrapped" in Mini vMac in this way. (Though I did program Blah Blob to look for its settings in the data disk, and failing that fall back on preferences in System Folder. I'm not sure if there's any way to preserve settings or data if the app isn't designed to do that.)
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: I made a classic mac game in HyperCard, and made some modifications / improvements to Mini vMac in the process

Post by adespoton »

bribri wrote: Tue May 23, 2023 4:48 am
adespoton wrote: Tue May 23, 2023 2:57 am I haven't looked at your modifications yet, but I presume they work like the Mini vMac.app feature where you can drop an mnvn_dat folder inside the Contents folder and load it up with the rom and disk#.dsk files, which load in order of the number indicated by #.
Somehow I missed that putting files inside Contents/mnvn_dat/ was an option! But yes, it's basically the same thing.

Probably the most important feature though is being able to copy base disk images out of the app bundle or AppImage filesystem into the user directory so that they can be modified. Blah Blob actually copies two disk images: one containing the game itself and system so that it'll boot, and another specifically for the game's preferences and save data. It also writes out a file indicating the version of the app. Should I ever make a new version that requires updating the game, it'll check the current version vs. the installed version, and if the current version is newer then copy the new game disk image over top of the old one, but leave the data image in place. This same technique could in theory be used to update any piece of classic mac software "wrapped" in Mini vMac in this way. (Though I did program Blah Blob to look for its settings in the data disk, and failing that fall back on preferences in System Folder. I'm not sure if there's any way to preserve settings or data if the app isn't designed to do that.)
I wonder if MACE is far enough along yet for you to skip the OS and ROM altogether? Are you using XCMDs and XFCNs?
bribri
Student Driver
Posts: 16
Joined: Tue Apr 04, 2023 4:20 am

Re: I made a classic mac game in HyperCard, and made some modifications / improvements to Mini vMac in the process

Post by bribri »

adespoton wrote: Tue May 23, 2023 2:45 pm I wonder if MACE is far enough along yet for you to skip the OS and ROM altogether? Are you using XCMDs and XFCNs?
I'd love to give MACE a try! And yes, it's using some XCMDs. Probably the most difficult to reimplement for MACE would be the sound and music features, which I believe require Sound Manager 3. Last I checked they said they had some Sound Manager support, though, and perhaps enough for the game to run. The music is using the Sound–Trecker drivers, which runs in System 6 and without Sound Manager but I'm not sure what else it requires. And then there's HyperCard itself, and I can't say which toolbox functions that requires. Though I do believe it runs in System 6 so it might work with MACE.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: I made a classic mac game in HyperCard, and made some modifications / improvements to Mini vMac in the process

Post by adespoton »

bribri wrote: Tue May 23, 2023 4:29 pm
adespoton wrote: Tue May 23, 2023 2:45 pm I wonder if MACE is far enough along yet for you to skip the OS and ROM altogether? Are you using XCMDs and XFCNs?
I'd love to give MACE a try! And yes, it's using some XCMDs. Probably the most difficult to reimplement for MACE would be the sound and music features, which I believe require Sound Manager 3. Last I checked they said they had some Sound Manager support, though, and perhaps enough for the game to run. The music is using the Sound–Trecker drivers, which runs in System 6 and without Sound Manager but I'm not sure what else it requires. And then there's HyperCard itself, and I can't say which toolbox functions that requires. Though I do believe it runs in System 6 so it might work with MACE.
Might be worth pinging Pukka to raise this as the next challenge for them :) Getting Hypercard with XCMDs functioning would be an impressive milestone, SM3 or not.
bribri
Student Driver
Posts: 16
Joined: Tue Apr 04, 2023 4:20 am

Re: I made a classic mac game in HyperCard, and made some modifications / improvements to Mini vMac in the process

Post by bribri »

adespoton wrote: Tue May 23, 2023 10:18 pm Might be worth pinging Pukka to raise this as the next challenge for them :) Getting Hypercard with XCMDs functioning would be an impressive milestone, SM3 or not.
I already posted in the MACE thread, but haven't heard back. Is there another way you'd recommend getting in touch?
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: I made a classic mac game in HyperCard, and made some modifications / improvements to Mini vMac in the process

Post by adespoton »

bribri wrote: Tue May 23, 2023 11:05 pm
adespoton wrote: Tue May 23, 2023 10:18 pm Might be worth pinging Pukka to raise this as the next challenge for them :) Getting Hypercard with XCMDs functioning would be an impressive milestone, SM3 or not.
I already posted in the MACE thread, but haven't heard back. Is there another way you'd recommend getting in touch?
Looks like Toni goes by truetonizz on Google, so there's likely a gmail account; Twitter account seems to be a joke and not his real account.
Post Reply