- Joined
- May 30, 2008
- Messages
- 5,580
- Reaction score
- 2
- Points
- 0
See http://www.orbiter-forum.com/showthread.php?p=115665#post115665 for part of the preliminary discussion. The problem for simpit builders and anyone wanting to set up advanced inputs to Orbiter is that there's no standardized way of handling systems in Orbiter. Look at FSX, for example--you set the "gear down" key to be whatever you want, and all vessels respect that keybinding, rather than needing to be sent a specific key.
I was thinking about a (potentially easy) addition to the VESSEL interface for common state-based things like landing gear. You could have a pair of callbacks in the vessel, one of which triggers the action and one of which gets the state.
So for example, you could have a "trigger system" method which you could pass ORBSYS_GEAR and ORBSYS_ACTION_EXTEND to, and the vessel would react accordingly. ORBSYS_ACTION_RETRACT and ORBSYS_ACTION_TOGGLE would act appropriately. You could then have a "get state" method which you could pass ORBSYS_GEAR and it would return ORBSYS_STATE_EXTENDED, ORBSYS_STATE_RETRACTED, or ORBSYS_STATE_MOVING as appropriate.
You could then have the Orbiter core manage keybinds for these actions, similar to how FSX does it. Rather than the vessel reacting to a key directly, it would react to a system action message. This would prevent different vessels having different keybinds for the same action (ie, speedbrakes, ctrl-b in stock DG but b in DGIV), and for backwards compatibility if the vessel ignored the system message it would just get passed the key.
Simpit builders could then query the "get state" method and use the "trigger action" method. You could have "systems" for all the common things--APU, gear, flaps, airbrakes, radiator, secondary-engine doors, etc.
Vessels would only need to tie this to the existing key-based actions, and the orbiter core would only need to convert keypresses to system messages according to the keybinds assigned to the user.
System and action ideas could be taken from sims like FSX or X-Plane, which have a very long list of standard keybindable systems in them.
Thoughts?
I was thinking about a (potentially easy) addition to the VESSEL interface for common state-based things like landing gear. You could have a pair of callbacks in the vessel, one of which triggers the action and one of which gets the state.
So for example, you could have a "trigger system" method which you could pass ORBSYS_GEAR and ORBSYS_ACTION_EXTEND to, and the vessel would react accordingly. ORBSYS_ACTION_RETRACT and ORBSYS_ACTION_TOGGLE would act appropriately. You could then have a "get state" method which you could pass ORBSYS_GEAR and it would return ORBSYS_STATE_EXTENDED, ORBSYS_STATE_RETRACTED, or ORBSYS_STATE_MOVING as appropriate.
You could then have the Orbiter core manage keybinds for these actions, similar to how FSX does it. Rather than the vessel reacting to a key directly, it would react to a system action message. This would prevent different vessels having different keybinds for the same action (ie, speedbrakes, ctrl-b in stock DG but b in DGIV), and for backwards compatibility if the vessel ignored the system message it would just get passed the key.
Simpit builders could then query the "get state" method and use the "trigger action" method. You could have "systems" for all the common things--APU, gear, flaps, airbrakes, radiator, secondary-engine doors, etc.
Vessels would only need to tie this to the existing key-based actions, and the orbiter core would only need to convert keypresses to system messages according to the keybinds assigned to the user.
System and action ideas could be taken from sims like FSX or X-Plane, which have a very long list of standard keybindable systems in them.
Thoughts?