BASIC8
Not enough ratings
Making Standalone Player as Executable Binary
By Tony Wang
Difficulty: everyone
Category: sharing, tool

The "Player Maker" is a tool which makes standalone player with executable binaries across desktop platforms. The exported player bundle contains a specific disk, and can be executed without owning BASIC8.
   
Award
Favorite
Favorited
Unfavorite
Experimental


The maker solution is still experimental, features might be changed in future.
Getting the Player Maker
The "Player Maker" is implemented as a regular disk. Subscribe to the disk on Workshop, then it will be mounted in your BASIC8 environment.
Making
Run the maker, it loads and lists all your local disks.



Usage:
  • Up/Down (arrow): select disk
  • Enter: make standalone player with selected disk
  • Clicking arrows: same to pressing up/down
  • Clicking "OK": same to pressing "Enter"

Disk titled with any UTF-8 character will be displayed as "???", select it and click "?" to show the full name. However, consider using ASCII only as possible.

Exported bundle will be put under the container directory of the source disk.



The content of the source disk will be packed into the bundle.
Customization
Exported bundle supports icon, splash, pad and some behaviour customization.


Images could be transparent.


It supports the following configurations, pick whatever you need:

{ "player_persist_dir": "BASIC8Player", "maximize_window": "true", "fix_canvas_ratio": "true", "full_screen": "true", "pause_on_focus_lost": "false", "onscreen_gamepad_enabled": "false" }
Distributing
The "Player Maker" disk is a freeware. You can do whatever you want to with exported bundles, including copying, sharing with others, re-selling to marketplaces, etc.

Exported bundle is an all-in-one package, which runs across Windows, MacOS X and Linux. The outer most directory is named "*.app", which is the required App naming of a MacOS X bundle, the actuall executable binaries are placed at:


Furthermore there are optional shortcut launchers:


The embedded disk is located at:

Running
It requires .NET Framework (4.5) to run the launcher on Windows, requires execution permission with the launcher on Linux. Requires Visual C++ 2015 redistribution runtime to run executable on Windows. And shares the same requirements of hardware specifications with BASIC8.

The launchers chooses proper executables according to its running environment.



The "install.sh", "uninstall.sh" scripts for Linux are optional, consider customizing them with your own data, or removing them if you don't need.


Storage
Unlike the BASIC8 editor, a player bundle uses different path to persist player states and in-game data, such as input config, display states, data from the PERSIST function, etc. The root path of persistence is:

  • "C:/Users/YourName/Documents/BASIC8P/" on Windows
  • "/Users/YourName/Documents/BASIC8P/" on MacOS
  • "/home/YourName/Documents/BASIC8P/" on Linux

Each disk uses its own title as the sub directory name for persistence.

Notice that all IO functions still use the container directory as lookup root, which is inside the player bundle, to where it doesn't always have the permission to write.
2 Comments
Skiller Dec 14, 2018 @ 6:13pm 
cool an .exe-converter! :o
MoonCrystal Mar 12, 2018 @ 2:28am 
Awesome ! Misses Html5 export now :D