Direct Translator for Games - An introduction

Overview

This document explains how to unpack platform-specific Games translators.

Installing Game Direct Translators

All Alias|Wavefront platform games translators are shipped as part of the standard Alias product on the Alias distribution disk. Platform specific portions of those translators are only available through pre-authorized decryption or via game platform providers.

This subsystem is installed by default as part of your Alias installation procedure in directory tree ODS/Games.dd

Directory Structure of Games Area

The directory tree for the Game plugins/translators is found under $ALIAS_LOCATION/ODS/Games. It consists of directories for the direct translators, shared library files, executable binary and script files, PST data files and the source to the translators themselves.

ODS/Games/Dtplugins direct translator DSO files
ODS/Games/bin executables and scripts files needed for Games support
ODS/Games/lib shared DSO library files for the Dt API and support files
ODS/Games/include include files for Dt API programming
ODS/Games/plugins standard Alias plugin directory for Games plugins
ODS/Games/man man pages for the Dt API functions
ODS/Games/pst PST files required for some of the older Games utilities (i.e. RTG)
ODS/Games/source source directory for the Dt API and the translators.

Unpacking Game Platform specific Libraries

Platform specific libraries can be unpacked using InstallGame:

Usage: InstallGame <-hdeaftsk>
where: -h prints this usage info
-e assume files are not encrypted
-d decrypt the library file only
-a dir alias directory location
-f dir install from this directory
-t install to this directory
-s System install this System

Defaults with no options on command line is to use the $ALIAS_LOCATION/ODS/Games directory as the source directory, and to install back into the ODS/Games directory. Use absolute paths for the from and to directories.

This can override the default location of when to install from/to by using command line options.

InstallGame is located in /usr/aw/alias/ODS/Games/bin. To unpack available libraries, log in as root, and in a unix shell, type:

/usr/aw/alias/ODS/Games/bin/InstallGame Now the list of game libraries that can be installed based on the current encryption string for Alias is displayed.

 ======================================================== 
Alias | Wavefront Game Export Tool 2.0 library installer 
======================================================== 
Enter your ALIAS_LOCATION (press enter to use /usr/aw/alias) 
The following games libraries are enabled by this encryption: 
Code Description 
--------------------------------- 
N Game Library for Nintendo 
... 
Which game libraries would you like to install? 
Enter the codes for the libraries separated by spaces 
or enter "none" or "exit" to exit the installer: 

The first prompt shows what the InstallGame script believes is the location of where Alias is installed and will be obtaining and installing the new Game libraries selected. If this is not where Alias is actually installed, enter the proper location. You can also override the location by using command line options.

Enter the code corresponding to the game library you want to install. Be sure that your responses are in upper case letters. Type exit to exit the installation program.

If there are no game libraries listed, check that the encryption string installed for Alias is correct.

Installing the MakeGame plug-in

In version 7.5 and later of PowerAnimator, game translation is done via a plug-in called MakeGame. The games functionality is shipped as an OpenAlias plug-in to allow the distribution of the source code for the translators for enhancement and extension by end users.

How to access the plug-in

To access this plug-in, you can update the Plugin Path field in the Alias Preferences window.

Select Preferences User options Alias preferences from the Preferences menu in the main Alias menu.

After the confirmation box is displayed, the Alias Preferences window is displayed. The bottom-most section is called Plugin Options. Single click on this title to see the plug-in options.

The Search Path option can be updated to include the following path.

$ALIAS_LOCATION/ODS/Games/plugins/lib: Single click in the Search path box, and type to add this path at the beginning of the text box.

Restart Alias to use this new plug-in search path. When you restart, Alias now also looks in the Games distribution area for game specific plug-ins.

How to load the game translators

After restarting Alias, select Utilities Plug-in Manager from the menu bar to open the Plug-in Manager window.

This window displays a list of all known plug-ins. A plug-in called mgame.addin should be present in the list. If not, recheck your plug-in path as described above.

Clicking in the box beside mgame.addin loads the game translators. This creates a new menu item in the Utilities menu called MakeGame.

Details on the MakeGame system

Installation

The base level of the Games area is installed with the standard installation of Alias. From this standard installation, you can run the plug-ins and translators directly.

Customizing the MakeGame environment

Customization of the working environment is possible by setting environment variables and setting the path to include the Games area.

Setting Environment Variables

These are the environment variables that can be set to customize the use of mgame/DtExport and translators:

GAMES_LOCATION can point to where the lib, Dtplugin, include directories are found.
DT_PLUGIN_LOCATION is a colon-separated list that can point to where the Dt translators are found.
DT_EXPORT_DIR point to where the exported files from the translators are to go.

To have access to the GameTool plug-ins, you can edit the plug-in location path to include $GAMES_LOCATION/plugins/lib.

Select Edit User Preferences from the Preferences menu in Alias and in the Plugin Options section add the $GAMES_LOCATION/plugins to the end of the current settings.

You may also want to include the $GAMES_LOCATION/bin path to the execute path so you can find the OpenModel applications and general game scripts.

The Alias script that is used to run Alias sets up the proper environment (LD_LIBRARY_PATH) to run with the game tools (mgame, Dt translators). It also checks for a setting for GAMES_LOCATION and if it is not set, the script sets it to be $ALIAS_LOCATION/ODS/Games.

DtExport does the same for the OpenModel application that can run the Dt Translators.

Note

Notes on the DtExport OpenModel translator

DtExport is an OpenModel application used to read in a wire file and then call one of the Direct Translators (Dt) to produce the platform-specific output files. Using this translator, you can access the functionality of MakeGame in a batch environment

The Dt translators are common between DtExport, mgame (an OpenAlias plug-in) and GameExport 2.1. The newer translators do not run under the older version of GameExport due to newer functions calls not found in the old libDSOio.so.

Usage:

-f [inputfile] <options> -e [translator] <Export options>

Where:

-f [inputfile] specifies a valid Alias wire file for input. <options> are:

-d dir specifies output directory
-y specifies a Y-up world.
-z specifies a Z-up world.
-v verbose.
-h help screen.
-W No TransF, world space
-w Minimal TransF, Global TransF/local space
-p No Parent info
-S n set first view Frame to use to `n'
-E n set last view Frame to use to `n'
-F n set viewFrame to `n'
-V use GUI interface for Exporter

-e [export] export DSO to call (use actual file name)

<export options> are dependent on the translator

Description

Retrieves a wire file and calls the requested export function

Rebuilding or Creating a new Direct Translator

You can recompile or create new translators using the Dt API to add or change the functionality of the current versions.

If you make changes to the shipped translators, Alias|Wavefront Assist will not be able to support the translators.

The shipped translators come with source code. There is a Makefile for each translator that can be used to rebuild it. You will need to check that the Makefile has the proper settings for the environment variables ALIAS_LOCATION and GAMES_LOCATION in order for the translators to "make" correctly. These settings are found near the beginning of the Makefile, and can be easily set (similar to the standard Alias plug-in Makefile).

In order to recompile a translator, you'll find it useful to set up the following directory structure.

  • In the user's HOME directory, create a "games" subdirectory with a working directory for building the new translator as well as a trial area to test the translator. For example, here is one method of rebuilding the GetSGI translator.
  • Create the following directories.
  • In the ~/games/getsgi directory, copy the files from the base ODS/Games/source/GetSGI directory.
  • Set the ALIAS_LOCATION and GAMES_LOCATION environment variables to where Alias and the base games tree are located.
  • Type "make" to then rebuild the translator and create a new GetSGI DSO in the working directory. In order to test the new version, set the environment variable DT_PLUGIN_LOCATION to where the new GetSGI file is found. If DT_PLUGIN_LOCATION is set to a fixed directory (for example, ~/games/trial/Dtplugins) the versions of the translators found in this directory will be found first and loaded instead of the shipped versions.
  • By using this structure, you don't have to have root permission to create and use new versions of the translators. Just copy the new version of the translator to this location.

    You should not rebuild the image of a previously loaded translator while still running Alias. This is not good and will probably core dump Alias as the DSO image is pulled from underneath Alias.

    You can use the stand-alone DtExport to test out new versions of the translator quickly. It follows the same search path to find the Dt translators.

    Game platform translators

    Alias has three translators, for Nintendo, Sega, and Playstation platforms that are documented but have varying levels of restrictions for customer access.

    These levels of restriction are due to agreements with the respective manufacturers. The restrictions are as follows:

    Nintendo

    The translator plug-in and its documentation addendum are available to Nintendo-certified N64 developers only. The Alias|Wavefront part code for the Nintendo translator is PA-NU64N. Upon request for this part and certification of the requestee as an N64 developer is obtained, the documentation and the translator are supplied.

    Sega

    The Sega translator addendum (for the "Cartdev" downloader plug-in and SGL Ascii translator) are available for use with PowerAnimator through Sega's Development support directly. All documentation is included in the deliverables from Sega.

    PlayStation

    The PlayStation translator plug-in and documentation are available directly from the Sony development organization. Please contact Sony directly to obtain these.

    These are, at present, the only externally restricted translators.





    aliasdocs@aw.sgi.com

    Copyright © 1997, Alias|Wavefront, a Silicon Graphics Company. All rights reserved.