Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hypercard to Decker conversion?

A topic by erikhoudini created Nov 27, 2023 Views: 102 Replies: 1
Viewing posts 1 to 2

This application has sent me down the rabbithole of Hypercard stuff, which got me thinking, could something like this be done? Probably a long shot but worth throwing it out there I suppose.

Developer(+1)

I have written about this topic previously. In short, the answer depends on the complexity of the HyperCard stack and how much fidelity you want in the results.

If you just want to read out images and text, a combination of stackimport and Lilt might do the trick, with some assembly required.

I must stress that despite superficial similarities, there are many significant differences between Decker and HyperCard which would make a 1:1 conversion difficult or impossible. To name a few:

  • HyperCard depends upon Macintosh system fonts. Decker's built-in fonts Menu, Mono, and Body are similar to specific sizes of Chicago, Monaco, and Geneva, respectively, but are not identical, and are not available in all the same sizes. It would be necessary to furnish a large library of Mac fonts in the Decker format (or write an automatic conversion utility). Even then, Decker's text layout algorithms are not designed to support the same set of features as those furnished by the Macintosh Toolbox, nor does it support the entire range of MacRoman characters, so results would not be identical.
  • HyperCard's UI elements and dialogs are not the same as Decker's. It is not necessarily possible to convert, say, a given HyperCard button to a Decker equivalent which has an identical appearance and behavior.
  • HyperCard uses a proprietary scripting language, HyperTalk, with a complex grammar and poorly-understood semantics. Decker uses Lil. Transpiling arbitrary HyperTalk into Lil is theoretically possible, but doing so efficiently could prove extremely challenging. Supporting a controlled subset of HyperTalk would be much less daunting and might be sufficient for some stacks.
  • HyperCard's programming "APIs" are inseparable from its scripting language, and do not correspond closely to their counterparts in Decker. Complex HyperTalk scripts often  relied upon brittle mechanisms like directly firing menu items in HyperCard to manipulate the Stack. There's no sensible way to automatically port this type of code.
  • HyperCard permits unrestricted access to the OS- including manipulating files and communicating with other stacks. (This is part of why "HyperCard viruses" were possible.) Decker is designed to be secure by default, and does not allow scripts to manipulate the local filesystem or access other system resources without explicit user intervention.
  • HyperCard permits embedding native code extensions (68k machine code and calls to the Macintosh Toolbox) in Stacks; Decker does not permit any equivalent.

Despite all these obstacles, if a conversion tool sounds to you like an exciting endeavor, by all means take a stab at it. I consider making Decker itself capable of importing stacks completely out of scope.