Distributing your game

From Adventure Game Studio
Revision as of 20:54, 29 January 2014 by Stupot (talk | contribs)
Jump to navigation Jump to search

When you choose the "Save game" option in the Editor, as well as creating data files which it needs for itsself, the program will create an executable file with the name of your game, in the "Compiled" sub-directory of your game's folder. This single file contains all of the program code and data for your game, and is the file you should distribute. Copy this EXE file to another directory or drive, or even another computer, and there you have your game, contained in a single file! Note, though, that you should also include the WINSETUP.EXE file to allow the user to run the Setup program.

NOTE: It is not possible to load the exe file back into the Room Editor. This means two things when only the EXE file is available: (1) other people can't edit your game's data, and (2) you can't either. Always keep a backup of the other files produced (*.CRM, AC2GAME.DTA, etc) as they are what the Editor needs to be able to load your game for editing.

TIP: You can make a "Loading..." style splash screen to be displayed while your game starts up. To do so, simply save the image as PRELOAD.PCX (must be the same resolution and colour depth as the game) in the game folder, and save the game. It should then display while the game is loading.

NOTE: Due to the licenses of code used by AGS, your documentation should acknowledge the following:

TrueType font display uses ALFont by Javier Gonzalez and the Freetype project. Distributed under the terms of the FreeType project license.

OGG player is alogg by Javier Gonzalez, using the Ogg Vorbis decoder, which is available from http://www.xiph.org/ Copyright (c) 2002, Xiph.org Foundation

MP3 player is almp3, by Javier Gonzalez and the FreeAmp team. It uses the mpg123 MP3 decoder, and is distributed under the terms of the GNU Lesser General Public License version 2.1.

You should also include all the license_* files from the DOCS directory with your game.

IMPORTANT: If you intend to make money for your game, be it shareware or commercial, it is imperative that you read the Legal Information page on the AGS website, currently at http://www.adventuregamestudio.co.uk/site/ags/legal/

NOTE: MP3, OGG and WAV music files are not included in the exe. They will instead be built into a file called MUSIC.VOX when you click the "Rebuild VOX files" option in the editor. Since OGGs, MP3s and WAVs override all other music file types, this allows you to have a Digital Music Pack which you can distribute seperately to your game. If it is present in the game directory it will be used, otherwise any other music available (eg. MIDI) will be played instead.


Custom icon

If you wish, you can use your own custom icon when you build a Windows EXE file. To do this, simply place your icon in your game's folder, and name it USER.ICO. Then, load the editor, make sure it is set to generate a Windows executable, and save the game. Your icon must be standard 32x32 pixels in 16-colour. If it is any other size or colour depth, the editor will give an error.

NOTE: The icon must be a proper Windows .ICO file, not just a renamed BMP file. Icon editors such as AX-Icons will convert it for you. IrfanView also does a good job on this.

You can also have a custom icon for the Setup program generated. To do so, create your icon as above but name it setup.ico in the game folder.

As of AGS 2.72 beta: Added ability to use any size/resolution of icon, if you save your game with Windows 2000/XP.

Splitting resource files

Some people found that once their game became large, the single EXE file was slow at changing rooms. AGS now includes an option to split up the resource files into smaller chunks to avoid this happening. On the General Settings pane you'll notice a checkbox "Split resource files up into X Mb". If you tick this, then type in a number such as 1 or 2, then save the game, the game data will be split up into chunks that size, named GAME.001, GAME.002 and so on. Some resources are still combined into the EXE file but all the rooms will be placed into the other files. If you use this option, you need to distribute your game's EXE file plus all the GAME.00? files.

Advanced information for game distribution

When you save the game in the editor, it goes through these steps: 1. Compile game into AC2GAME.AGS in game folder, and rooms into GAME.00? files if requested.

2. Combine ACWIN.EXE and AC2GAME.AGS into your custom EXE in the Compiled folder.

Therefore, it is possible to distribute either:

(a) your custom game .EXE file, or

(b) ACWIN.EXE and AC2GAME.AGS

.AGS files are associated with the engine in Explorer, so the user can simply double-click the .AGS file to run the game. Normally, just distributing your custom EXE will be easier, but if you want to supply both the DOS and Windows engines, or if your game is made up of two sub-games, you will save space by using this approach.

If the user doesn't have any AGS games on their system, the .AGS file type will not be associated with anything. To fix this, your game installation program can run:

ACWIN.EXE -updatereg

which will update the registry with the file association and then quit. Nothing is displayed on the screen by AGS when you do this.