proton:win_setup2
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
proton:win_setup2 [2010/10/26 03:42] – created seth | proton:win_setup2 [2018/07/28 08:29] – seth | ||
---|---|---|---|
Line 2: | Line 2: | ||
This application tests audio, the particle system, text input and buttons. | This application tests audio, the particle system, text input and buttons. | ||
+ | |||
+ | |||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | <div id=" | ||
+ | < | ||
+ | <param name=" | ||
+ | <!--[if !IE]> | ||
+ | <object type=" | ||
+ | < | ||
+ | <param name=" | ||
+ | <param name=" | ||
+ | <param name=" | ||
+ | <div> | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | <!--[if !IE]> | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
It illustrates how to use entities and components and is a good sample to " | It illustrates how to use entities and components and is a good sample to " | ||
- | You can compile and run it by following the directions from RTBareBones and it should | + | You can compile and run it by following the directions from RTBareBones |
+ | |||
+ | ==== Choosing an audio system ==== | ||
+ | |||
+ | The default audio system for Windows is Audiere (thanks to rzuf). | ||
+ | |||
+ | Don't want audio at all? If you look near the top of App.cpp you'll see where you could comment out AudioManagerAudiere g_audioManager and uncomment AudioManager g_audioManager. | ||
+ | |||
+ | If for some reason you'd like to switch to the FMOD sound system, [[proton: | ||
+ | |||
+ | ==== Building resources ==== | ||
+ | |||
+ | Uh oh, if you ran it you probably got an assert about being " | ||
+ | < | ||
+ | ERROR: Can't open interface/ | ||
+ | Can't load font 1 | ||
+ | </ | ||
+ | |||
+ | What's going on? We forgot to build resources, if you look in the bin directory there is no audio or interface directories. | ||
+ | |||
+ | Use file explorer to navigate to <proton dir>/ | ||
+ | |||
+ | **Note:** Linux people can do this by moving into RTSimpleApp/ | ||
+ | |||
+ | A command prompt will open processing all the files in the RTSimpleApp/ | ||
+ | |||
+ | == Why do it this way? == | ||
+ | |||
+ | You don't have to. But it's flexible. | ||
+ | |||
+ | Or you may need non-square textures to be uncompressed, | ||
+ | |||
+ | Remember, when you change a .png, you change it in media/*, and then must run update_media.bat to update the bin versions before you will see it in game. | ||
+ | |||
+ | Android/ | ||
+ | |||
+ | Processing is fast because the RTPack processor can detect changes and only convert changed/new files. <-- (Is this actually on? I don't know) | ||
+ | |||
+ | RTPack.exe is included in shared/ | ||
+ | |||
+ | < | ||
+ | RTPack V1.3 by Seth A. Robinson. | ||
+ | |||
+ | Help and examples | ||
+ | |||
+ | RTPack <any file> (Compresses it as an rtpack without changing the name) | ||
+ | RTPack -make_font < | ||
+ | |||
+ | More options/ | ||
+ | |||
+ | RTPack -4444 <image file> (Makes raw rgba 16 bit 4444 or 565 if no alpha .rttex) | ||
+ | RTPack -8888 <image file> (Creates raw rgba 32 bit .rttex, or 24 bit if no alpha | ||
+ | RTPack -8888 -ultra_compress 90 <image file> (Writes .rttex with good compression when there isn't alpha) | ||
+ | RTPack -pvrtc4 <image file> (Makes pvrtc .rttex - for PowerVR chipsets) | ||
+ | RTPack -pvrtc2 <image file> (Makes low quality pvrtc .rttex - for PowerVR chipsets) | ||
+ | More extra flags you can use with texture generation: | ||
+ | -mipmaps (Causes mipmaps to be generated) | ||
+ | -stretch (Stretches instead of pads to reach power of 2) | ||
+ | -force_square (forces textures to be square in addition to being power of 2) | ||
+ | -4444_if_not_square_or_too_big (1024 width or height and non square will use -4444) | ||
+ | -8888_if_not_square_or_too_big (1024 width or height and non square will use -8888) | ||
+ | -flipv (vertical flip, applies to textures only) | ||
+ | -force_alpha (force including the alpha channel, even if its not needed | ||
+ | -ultra_compress <0 to 100> (100 is best quality. | ||
+ | -nopowerof2 (stops rtpack from adjusting images to be power of 2) | ||
+ | -o < | ||
+ | </ | ||
+ | ==== Landscape vs portrait ==== | ||
{{: | {{: | ||
+ | (Um, actually this pic is out of date, the latest version shows a pic of Seth's kids' face, to illustrate loading a raw .jpg) | ||
- | Uh oh, it's sideways because in App::Init() it has: | + | Assuming you built your resources right, and you're using the profile " |
<code cpp> | <code cpp> | ||
SetLockedLandscape(true); | SetLockedLandscape(true); | ||
Line 16: | Line 110: | ||
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. | 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, | + | Before you sustain serious neck injury, |
It should now look more like this: | It should now look more like this: | ||
Line 24: | Line 118: | ||
Demonstration of using the particle system, click (will be touch, when on a device) the screen to add an explosion. | Demonstration of using the particle system, click (will be touch, when on a device) the screen to add an explosion. | ||
+ | ==== Text input ==== | ||
{{: | {{: | ||
A fake highscore screen to test text input. Click the text, then use your keyboard. | A fake highscore screen to test text input. Click the text, then use your keyboard. | ||
+ | ==== Music ==== | ||
It also has options to turn on and off ogg/mp3 background music. | It also has options to turn on and off ogg/mp3 background music. | ||
+ | ==== Jpg support ==== | ||
+ | It has the jpg files included and RT_JPG_SUPPORT defined, which allows Proton to load native .jpg files. RT_PNG_SUPPORT is used for png file support. | ||
+ | |||
+ | ==== Automatic scaling to fit the screen ==== | ||
It also demonstrates one more interesting thing - auto stretching. | It also demonstrates one more interesting thing - auto stretching. | ||
<code cpp> | <code cpp> | ||
Line 35: | Line 135: | ||
</ | </ | ||
- | To demonstrate, change the video mode in main.cpp "Nexus One" | + | To see the stretch in action, change the video mode in main.cpp "Nexus One" |
{{: | {{: | ||
- | You should see it properly stretches things | + | You should see it properly stretches things |
proton/win_setup2.txt · Last modified: 2018/07/28 08:32 by seth