One thing missing from Vegastrike is the ability for a user to create a set of custom controls.
The way I have done this in the past is save the control names as a string (such as: "Axis A+" for up on the A axis whatever it might be, "Key Z" for the keyboard key Z, or "Button 1" for button 1 on the joystick). When a match is made in game (e.g. Axis A on the joystick has moved), we can make a corresponding move on the game. To make a match we can use an if statement like so:
if <control>.substring(0,4) == "Axis" (to determine if its an axis first, we don't want to unnecessaryily make axis checks).
if <control>.substring(5,1) == "A" (check that Axis A has been set)
<move forward speed of axis value> (e.g. value 65535 = max speed)
It is assumed that the axis' are named Axis A (for first Axis and so on). Axis values are assumed to be from 0-65535. And subsrting is (start byte, number of bytes to substring).
Setting the controls:
have a button the user clicks, then wait for input from the various devices (for axis, if it has moved say 10% from its original position)
The reason I ask for this is because I have either no roll on the joystick (2 axis joystick and throttle), or my throttle becomes thr roll (using the 3 axis Joystick and throttle).
One last thing to add, is the whole dead zone thing. This is because my joystick doesn't sit 100% upright, so on long flights it can drift off course making me miss the target by several light seconds.
I reckon it could be done by grabbing the neutral position of the axis, and depending on the dead zone value, ignores movement up to a certain point (e.g. 10% either side of neutral)
I hope my descriptions are ledgible.
Cheers
Revise Control setup
-
- The Shepherd
- Posts: 5841
- Joined: Fri May 13, 2005 8:37 pm
- Location: Ottawa
- Contact:
We have a problem here as the engine is currently it is only possible to change the bindings out of game the config file is one of the first things read changing one thing in it means going back and restart everything so it is actually easier to do it out of game try this utility http://vegastrike.sourceforge.net/forum ... php?t=8895 have fun
Enjoy the Choice
Enjoy the Choice
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
-
- The Shepherd
- Posts: 5841
- Joined: Fri May 13, 2005 8:37 pm
- Location: Ottawa
- Contact:
Just use a XML aware editor Notepad++ works great under XP while just about any of the Linux text editors has syntax highlighting.that little java script utility works great with 0.4.3 i haven't figured out how to modify it for SVN version yet.
Enjoy the Choice
Enjoy the Choice
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2