User Tools

Site Tools


proton:win_setup2

This is an old revision of the document!


Compiling RTSimpleApp

This application tests audio, the particle system, text input and buttons.

It illustrates how to use entities and components and is a good sample to “clone” when starting your own project.

You can compile and run it by following the directions from RTBareBones and it should look like this:

Uh oh, it's sideways because in App::Init() it has:

SetLockedLandscape(true); //we don't allow portrait mode for this game

This means it will force landscape mode. It will do a 180 flip if an iPhone is held upside down, but won't flip to portrait modes.

Before you sustain serious neck injury, set “g_landScapeNoNeckHurtMode = true” in main.cpp's InitVideoSize() function.

It should now look more like this:

Demonstration of using the particle system, click (will be touch, when on a device) the screen to add an explosion.

A fake highscore screen to test text input. Click the text, then use your keyboard.

It also has options to turn on and off ogg/mp3 background music.

It also demonstrates one more interesting thing - auto stretching. This app was designed for 320×480 “primary size” (before rotated to landscape) but will automatically adjust input and rendering to any screen size thanks to a single line of text in its App.cpp:

SetupFakePrimaryScreenSize(320,480);

To demonstrate, change the video mode in main.cpp “Nexus One”. You should see…

You should see it properly stretches things up.

proton/win_setup2.1288064555.txt.gz · Last modified: 2010/10/26 03:42 by seth