Chapter 13. Marketing Aids

Table of Contents

Introduction
Taking Screenshots
Double-Size Presentation Versions
Recording Videos
Frame-Rate Counters

Introduction

X-Forge's desktop Windows version has some features which may be helpful in marketing. They all require some effort from developers but may well be worth the effort.

Taking Screenshots

On all desktop Windows builds of X-Forge applications, you can use the F12 key to save screenshots. The screenshots are saved in the same directory as the application, with the name ss0000.bmp. Any subsequent screenshots are saved by the names ss0001.bmp, ss0002.bmp, etc.

Double-Size Presentation Versions

When demonstrating a game on the desktop Windows version, it may often be useful to have a double-size version of the application. This is especially true when demonstrating a game on a laptop with a projector; a 176x208 window isn't all that impressive on a 800x600 desktop. A 352x416 window is much easier to appreciate.

Steps to make a double-sized version:

1. Call xfcUseGLDefaultUpsample() in xfcAppInit().

INT32 xfcAppInit()
{    
#if defined(DOUBLE_RES_PRESENTATION_VERSION)
    xfcUseGLDefaultUpsample();
#endif    
...

2. Double the preferred screen resolution.

void xfcAppPref(XFcAppPrefs &aPrefs)
{
    aPrefs.mResourceMemoryLimit = (INT32)(1.0 * 1024 * 1024);
    aPrefs.mTotalMemoryLimit = (INT32)(1.5 * 1024 * 1024);
    aPrefs.mPreferredWidth = 176;
    aPrefs.mPreferredHeight = 208;
#if defined(DOUBLE_RES_PRESENTATION_VERSION)
    aPrefs.mPreferredWidth *= 2;
    aPrefs.mPreferredHeight *= 2;
    aPrefs.mResourceMemoryLimit *= 2;
    aPrefs.mTotalMemoryLimit *= 2; // memory requirements also grow
#endif
...

3. Make sure you create the GL using the upscale device instead of the stub.

#ifdef DOUBLE_RES_PRESENTATION_VERSION
// create GL
mGL = XFcGL::create(101);
#else
// create GL
mGL = XFcGL::create();
#endif
xfcGLUseDefaults();
...

As a result of these three steps you should now have a double-sized version. Make sure you use release build for demonstration purposes, as the upsampling takes some processing power.

Recording Videos

You can use the XFuVideoRecorder utility to record frames of animation from your desktop Windows version of your X-Forge application.

First add a pointer to a XFuVideoRecorder object in your application class. Next, create the object in your onAppInit method. Finally, add a tick() call to your application's onTick() method.

The XFuVideoRecorder class stores screenshots of your application at the frame rate you desired. If the application's framerate is lower than the desired, duplicate frames are stored. Typically a framerate of 15 or 24 is good for video. Make sure you're using release build of your application for video footage, as the resulting disk activity will make your application run slower.

The resulting screenshots can be imported to some video editing software to be converted to actual video files.

If you also wish to record audio, you can use any audio recording software, and set it to record "what you hear" while you run your application. Please note that you may need to apply some audio speed adjustment to the audio to get it to match with the video frames.

Frame-Rate Counters

If you wish to display a frame rate (FPS) counter, you can use the XFuFPSCount utility class for calculating said value.

Simply add a pointer to a XFuFPSCount object in your rendering class, create the object on your initRenderer() method, and call the XFuFPSCount object's tick() once per frame. You can query the current FPS value by calling the getFPS() method.