Standalone release guide

From MZXWiki
Jump to navigation Jump to search

MegaZeux has limited support for standalone game releases. This guide is intended to help you create a copy of your game that a user can play without needing to download MZX.

Platforms

The following platforms support standalone releases. Click the link for a platform for more information on how to modify a release for that platform.

The following upcoming platforms should also support standalone releases:

Which platforms do I need releases for?

Releasing simply a copy of Windows x86 should be enough for now. Standalone releases for Linux/BSD/etc platforms are not recommended, as most Linux users will be able to figure out how to use MegaZeux normally and play the standard release of your game.

Linux/Raspbian/BSD/MacPorts/Android/etc.

These platforms do not really support standalone releases in the way they are defined here. In fact, if you attempted a standalone release in the way described for Windows, it's probable you'll end up with a package that directly conflicts with the official MegaZeux release packages!

Instead, you should consider packaging your game for the package manager for a given operating system and make your game's package dependent on the official MegaZeux package. The settings documented below can be provided as command line arguments, so your game "executable" could just be a script like this:

#!/bin/sh
/usr/bin/env mzxrun /PATH/TO/MY_GAME.MZX standalone_mode=1 [etc]

Licensing

MegaZeux is licensed under the GNU General Public License (GPL) 2.0. A file containing license information is distributed with all MZX releases. This file is called "LICENSE" (or "docs/COPYING.DOC" for older versions) and it must be included with your standalone release. The contents of this file should not be modified.

In addition to including the license in your release, you should provide a link to https://digitalmzx.com/ with your game or on any other website your game is released to. Releases of GPL software such as MegaZeux must have accessible source code, and this is the simplest way to fulfill this requirement. However, if you modified the MegaZeux source code for your game, you must provide ALL modifications you made to the source code with your release. If you fail to do this, you are in violation of the GPL!

As your MegaZeux game is considered essentially data files for MegaZeux, you may apply your own license to those data files (i.e. they do not need to be licensed under the GPL). In the case that your game isn't GPL licensed, you should rename the "LICENSE" file to something like "LICENSE.MEGAZEUX" and provide your own "LICENSE" file containing the license for your game files.

Configuration

Your game can be further integrated into MegaZeux by the following config.txt options:

startup_file      Specifies a local path from the startup path to a .MZX file.  This file is loaded automatically upon starting MegaZeux.
startup_path      Specifies a relative or absolute path for MZX to startup in. May be necessary for some platforms.
standalone_mode   See below.
no_titlescreen    See below.

Standalone mode disables the load world menu (L/F3), causes the counters ESCAPE_MENU, HELP_MENU, F2_MENU, LOAD_MENU, ENTER_MENU, EXIT_GAME to work on the title screen, and adds the new function counter PLAY_GAME which, when set, causes MZXRun to enter the gameplay state. When the no_titlescreen option is enabled AND standalone_mode is enabled, MZXRun will immediately enter the gameplay state on startup (completely bypassing the titlescreen). Using EXIT_GAME or the escape menu will cause MZXRun to exit entirely instead of changing to the titlescreen state.

See the config.txt that ships with MegaZeux 2.90+ for more information on these features.