Emulator Development

Configurations

How the output of the bike and HMD is mapped to the gamepad is called a configuration. These are stored in ini files. These ini files can be loaded and saved through VZGE. It will be common for most games to have their own configuration file.

Developing a Configuration

The emulator allows the user to create a configuration or a "mapping" for the bike to play a certain game. For example, let's say the player wants to use the speed coming off the bike to make the character in game move forward. VZGE could be set to map the "speed" parameter coming off of the bike to the "Y Axis" of the controller. In other words, if you pedal forward, the game will think you're pressing up on the left analog stick.

The bike has a lot of outputs that can be used. 8 Buttons, 2 Triggers, and your pedalling speed. Additionally, VZGE can map output from your HMD (head mounted display) such as the rotation and relative position of your head. A good example would be, if you want your player to move left or right when you lean, you can use the "lean" output and map it to the "X Axis" so whatever way you lean will push the left analog stick left or right.

Now for the details:

Column 1: Name of output from bike and HMD

Column 2: What that output is mapped to

Column 3: If what is in column 2 is a button or a key, specify which one

Column 4: Multiplier on output from Column 1.

Column 5: Added to output from Column 1.

Example

Let's say that as we said before, you want to control the left analog stick with the speed of the bike. First, find "speed" in column 1. (It's about one half of the way down.) Now, in column 2, select AxisY. That's it! Try it out in the game. Oh no, the first thing you notice is that the person is going the wrong way because a positive value for speed maps to moving the left analog stick down and not up. You can fix this by setting a -1.0 in the "Mult" column, meaning the speed is multiplied by negative 1. Now, if you give this a try, you'll see that a positive speed maps to pushing the left analog stick up. You can experiment with the mult value if you want to pedal faster or slower to have the same effect on the stick.

Some interesting outputs:

Raw Speed - the speed coming directly from the pedaling of the bike. It's a bit "noisy" due to how it is calculated, but reacts very quickly to pedalling speed changes

Speed - the speed of the bike after some smoothing, so it's not noisy, but takes a bit longe to react to changes

Head Yaw - looking left and right

Head Pitch - looking up and down

Lean Speed - how quickly you are leaning left and right.

Forward Stick - the maximum of pedalling acceleration and speed. This can be useful when you want quick reaction to changes in pedalling and then be able to keep that value. For example, taking off from a stop in a racing game, but then continuing to keep the accelerator down.

Steering - This is a special control that takes leaning and head rotation into account and is supposed to be mapped to the X Axis of an analog stick. Basically, the idea is that when you aren't leaning, rotating your head doesn't matter. But, as you lean more, the rotation of your head as well as the leaning takes into account the output value. This was tested with Project Cars for a good way to control the steering of the car.

Variables

Towards the bottom of the window, there is a drop down list with some values and a description. These are a mix of variables used in the emulator. Some are used by the "steering" output, some by the "forward stick" output, and others are just general settings.

The "Min Speed Sound Shutoff" variable is interesting. When not 0, if the speed of the bike falls below this value, the system's sound is shut off. This can be used while watching movies, or anything else to motivate you to keep biking or lose audio!

Once you have set up a configuration that you are happy with, you can save it out under File/Save or File/SaveAs. Now, this configuration can be loaded up in both Emulator and Developer modes.