Main settings

Here are defined all the available config properties that will be recognized by orx as main settings.
All these settings can be found in the SettingsTemplate.ini file along with their short descriptions.

Please refer to the syntax page for more info on how to write config files.

Config module

Summary

[Config]
History    = <bool>
IgnorePath = <bool>

Details

Only one section (Config) is defined for this module. Here's a list of its available properties:

  • History: Enables/disables the config history. When the config history is enabled, a call to orxConfig_ReloadHistory() will reload from disk all loaded config files in the correct order. Its value defaults to false.
  • IgnorePath: If set to true, all paths stored in config files (except for block values) will be ignored. Defaults to false.

Clock module

Summary

[Clock]
MainClockFrequency = <float>

Details

Only one section (Clock) is defined for this module. Here's a list of its available properties:

  • MainClockFrequency: This property allows to give a frequency for the main (aka Core) clock update. If no value is provided, the main clock will be updated as often as possible. Best results are achieved by not setting any value for this property and by enabling vertical synchronization.

Display module

Summary

[Display]
Decoration   = <bool>
Font         = path/to/FontFile
FullScreen   = <bool>
ScreenWidth  = <int>
ScreenHeight = <int>
ScreenDepth  = <nt>
Smoothing    = <bool>
Title        = <string>
VSync        = <bool>
DepthBuffer  = <bool>

Details

Only one section (Display) is defined for this module. Here's a list of its available properties:

  • Decoration: In windowed mode, this will define if decorations (ie. window borders, buttons, …) will be used for the main display window. This property is enabled by default.
  • Font: Specifies a default font when creating orxTEXT structures. If no value is specified, the arial font will be used by default on most systems.
  • FullScreen: Defines if the main display will be full screen or windowed. This property is set to false by default.
  • ScreenWidth: Resolution width for the main display in pixels. Must be provided.
  • ScreenHeight: Resolution height for the main display in pixels. Must be provided.
  • ScreenDepth: Resolution depth for the main display in bits. Defaults to 32bit.
  • Smoothing: Sets the default rendering smoothing mode (ie. with or without antialiasing). Defaults to false (ie. no antialiasing).
  • Title: Title for the main display. Will be empty if none is provided.
  • VSync: Enables/disables the vertical synchronization. Will use system defaults if none is provided. Best results are usually achieved by enabling this property.
  • DepthBuffer: Defaults to false, set it to true only if you plan on doing 3D rendering on your own and you need a depth buffer to be created.

Input module

Summary

[Input]
JoystickThreshold = <float>
JoystickMultiplier= <float>
SetList           = InputSet1 # InputSet2
 
[InputSet1]
KEY_SPACE   = Jump#Validate
MOUSE_LEFT  = Select
KEY_LCTRL   = Select
JOY_1_1     = Attack
JOY_X_2     = Move
MOUSE_X     = Move
 
CombineList = Select # Attack

Details

One main section (Input) and as many subsections as defined sets are used for this module. Here's a list of the available parameters for the main Input section:

  • JoystickThreshold: Sets the threshold value 1) under which joysticks' axis values are ignored. This property's default value is 0 (ie. any input, as small as it is, will be considered).
  • JoystickMultiplier: Defines a value in ]0.0, +inf[ by which all joystick axis input values will be multiplied. Defaults to 1.0.
  • SetList: Provides a list of all available input sets. All these sets need to be defined in their own config section so as to be considered valid. The first valid set of this list will be selected by default as the current input set.

For every input set, here's a list of the available parameters:

  • <button>/<key>/<joystick axis>: For every possible physical input 2), one or more actions are linked. Every time this physical input gets activated, the corresponding input actions will be triggered.
  • CombineList: Provides a list of all the input actions that needs all of their physical inputs to be active before being triggered. If an action isn't listed here, every time any of its linked physical input is activated, it will be triggered.

NB: Every input action can be linked to up to 4 different physical inputs.

Here are lists of the available physical inputs:

iPhone module

Summary

[iPhone]
AccelerometerFrequency = <float>

Details

This section is only used for iPhone/iPod Touch/iPad.

Only one section (iPhone) is defined for this module. Here's a list of its available properties:

  • AccelerometerFrequency: Sets the polling frequency, in Hz, of the accelerometer. If explicitely set to 0, the accelerometer will be disabled. Defaults to iPhone's default value;

Locale (localization) module

Summary

[Locale]
LanguageList = Language1 # Language2
 
[Language1]
MyTextEntry      = <string>
MyOtherTextEntry = <string>

Details

One main section (Locale) and as many subsections as defined languages are used for this module. Here's a list of the available parameters for the main Locale section:

  • LanguageList: Provides the available languages for the localization module. A language will only be considered valid if a corresponding section with the same name exists. The first valid language of this list will be selected by default for the current language.

For every languages, there can be as many keys as needed. Each key/value pair is made of the key used in code with the orxLocale module 3) and its corresponding content translated in the current language.

Here's a simple example.

[Locale]
LanguageList = English # French
 
[English]
Greetings = Welcome everybody!
 
[French]
Greetings = Bienvenue à tous!

When calling

orxLocale_GetString("Greetings");

the localized content in the current language will be returned.

Mouse module

Summary

[Mouse]
ShowCursor = <bool>

Details

Only one section (Mouse) is defined for this module. Here's a list of its available properties:

  • ShowCursor: Tells if the mouse cursor should be displayed or not. This property is set to true by default.

Param (command line parameters) module

Summary

[Param]
config = path/to/config1 ... path/to/configN
plugin = path/to/Plugin1 ... path/to/pluginN

Details

Only one section (Param) is defined for this module. Every command line parameter registered in code to the orxParam module 4) can be defined here. The long name of the parameter has to be used.

If a param is defined directly on the command line, it will prevail on any value entered in this config section.

Internally, orx defines a config command line parameter allowing to provide extra config files in addition to the main one 5).
It also defines a plugin command line parameter allowing to load external plugins when initialized.

NB: Lists are not used for these properties, you need to provide the parameter value in the same way you would do it on the command line.

Physics module

Summary

[Physics]
AllowSleep        = <bool>
DimensionRatio    = <float>
Gravity           = <vector>
IterationsPerStep = <int>

Details

Only one section (Physics) is defined for this module. Here's a list of its available properties:

  • AllowSleep: Defines if objects are allowed to go into sleep mode in the physics simulation when not stimulated by anything. This improves performances in the physics simulation and should be set to true unless you have a good reason. Its default value is true.
  • DimensionRatio: Defines the ratio between orx's world (sizes are expressed in pixels) and the physics simulation world (sizes are expressed in meters). Its default value is 0.01 which means 1 pixel is represented by 0.01 meters. 6)
  • Gravity: Defines the gravity vector used in the physics simulation. Please remember that orx 2D vertical axis Y is oriented toward the bottom of your screen 7). If not provide, the gravity will be null, ie. body won't “fall” by default.
  • IterationsPerStep: Defines the number of iterations made by the physics simulation for every step (frame). The higher this number is, the more precise and time consuming the simulation will be. Its default value is 10, don't change it unless you feel you could use a better precision or, on the contrary, a faster physics simulation.

Render module

Summary

[Render]
MinFrequency = <float>
ShowFPS      = <bool>
ShowProfiler = <bool>

Details

Only one section (Render) is defined for this module. Here's a list of its available properties:

  • MinFrequency: This defines the minimal frequency for the rendering clock 8). This means that if your game framerate drops below this frequency, your clocks will be provided a DT maxed by this frequency, resulting in a smooth slowdown of your game rather than in a jerky/laggy rendering. Uses your target framerate as value here (often 30 or 60 Hz). Its default value is 60Hz, meaning that a game that won't be able to render at least 60 fps will appear to run slower than it should. If you don't want a maxed DT, just set explicitly a negative value.
  • ShowFPS: This property tells orx to display or not the current FPS in the top left corner of the main display. Its default value is false.
  • ShowProfiler: This property tells orx to display or not the CPU profiling marker values in real time. Its default value is false.

Screenshot module

Summary

[Screenshot]
BaseName  = <string>
Digits    = <int>
Directory = path/to/directory
Extension = <string>

Details

Only one section (Screenshot) is defined for this module. Here's a list of its available properties:

  • BaseName: Base name used for your screenshot. Its default value is “screenshot-”.
  • Digis: Number of digits used at the end of screenshot files. Its default value is 4.
  • Directory: Directory where to store screenshots. By default, screenshots will be stored in the current active directory.
  • Extension: Extension used for screenshot files. This also defines the type of encoding for the file. Available values 9) on Win/Linux/OS X are tga (default), png, bmp & dds. On iOS only png (default) & jpg are supported.

NB: If using all default settings, screenshots will be stored in the current active directory 10) and named screenshot-0001.tga, screenshot-0002.tga and so on.

SoundSystem module

Summary

[SoundSystem]
DimensionRatio = <float>

Details

Only one section (SoundSystem) is defined for this module. Here's a list of its available properties:

  • DimensionRatio: Defines the ratio between orx's world (sizes are expressed in pixels) and the sound simulation world (sizes are expressed in meters). Its default value is 0.01 which means 1 pixel is represented by 0.01 meters. 11)
1) between 0.0 and 1.0
2) keyboard key, mouse button, joystick button or joystick axis
3) or referenced by an orxTEXT in config file
4) whether it's a parameter internally registered by orx or one you registered in your own code
5) the one named after the executable
6) , 11) in other words, 100 pixels = 1 meters
7) you need a positive Y component for your gravity vector for your objects to fall down
8) which is also the main/core clock
9) when used with orx's default display plugin based on GLFW
10) usually the executable's one
en/orx/config/settings_main/main.txt · Last modified: 2011/10/19 12:14 by iarwain
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki