|
|
I Make Projects . com A good project is made better when its parts have been misused, and the result is hideous. |
|
About |
Store |
Contact and Services
|
|
VR Bike Simulator
What This Is Using an exercise bike equipped with a few modifications, you can effectively simulate riding your exercise bike in and around the fictional town of Bullworth in the Playstation2 game "BULLY" by Rockstar. You pedal and steer on the exercise bike, and these actions are mirrored in the game, allowing you to virtually ride your bike in and around the town and surrounding areas in the game, complete with cars and pedestrians sharing the roads and sidewalks with you. The faster you pedal on the exercise bike, the faster you go in the game. This whole method should in theory also work with GTA:San Andreas which also has a similar bike mechanic (but a much larger and more visually varied game world than BULLY has). This is essentially a custom controller interface to an exercise bike, but in addition to the controls it's also the positioning of the bike in front of a big screen like a projector (my projector is from Lumenlab) and the choice of a game with a good matching "bike" presentation that really makes this whole greater than the sum of its parts.
The Concept I remember seeing a very expensive setup on the news once where an exercise bike had a large screen in front of it. Pedaling the bike resulting in a simple first-person view of a country road rolling by, as though you were riding. Neat, but it had a number of limitations. For example, you were riding on a "rail" (no choice as to where to go - just ride down an endless country road forever). You could not steer to go anywhere you liked, and the scenery looked awfully bland. I didn't think much more of it until later. Ever since discovering just how well the bike-riding (and driving!) is done in the Rockstar game GTA:San Andreas (and later in BULLY), it occurred to me that using one of those games as the "engine" for a VR bike simulator should be well within a tinkerer's reach. After all, all you need to use the bike in the game is the left joystick (to steer left-right) and holding or repeatedly hitting the "X" button (hold or tap slowly to ride at an easy pace, tap quickly to pedal hard.) A very basic exercise bike could be interfaced to a PS2 controller, and the game running on a big screen - preferably a projector - in front of the bike would result in a great simulator. You can get your exercise while exploring the large and very dynamic environments of the game. So that is what I did. How It Works In the game, to ride a bike you need at minimum two basic controls:
Assuming your exercise bike is already placed in front of a large screen with a PS2 and a copy of the game, you now need some way to work those controls from the exercise bike. Modifying the Controller All you really need is the left joystick (steering) and the "X" button (pedal). When I took apart the controller I did much more than that - I extended BOTH joysticks and extended out the "X" and "Triangle" buttons (I wasn't entirely sure what I was or wasn't going to use at the time).
There were two wires per button, and a total of 11 wires per joystick for all connections. (See the THINGS LEARNED section near the end of this page before going through this yourself - you might save some time and effort!) The Handlebar Interface
Third - Build a support of some kind for the analog joystick. Turning your handlebars will in turn move the joystick left or right. I completely took apart and extended the joystick out from the controller. If I were to do it again, I would probably choose to interface the handlebars directly to the joystick right on the controller itself without going through the hassle of extending it out.
You can see the simple method I used in the animation; turning the new handlebars results in turning the potentiometer that used to be in the joystick. A thin metal rod simply pokes through a hole inside the PVC tube and serves as the interface between the two. The Pedal Interface First - Attach a couple paddles to the pedals. These will be what activates the switch (which will be the new "X" button") on each pass.
Second - Next, select an appropriate switch. I used a microswitch - it works by having a long spring-loaded lever as the "button". This will be our new "X" button, and it will be placed on the bike such that pedaling will activate it repeatedly. The faster you pedal, the more (and faster) the "X" button gets tapped. Mount the microswitch in an appropriate spot, such that the paddles we installed hit the switch with each pass. Mount this all as flush as possible - you don't want your foot or pant leg hitting it on the way by. Hot glue should do the trick. How It Is Used
Things Learned
Possible Improvements Compliant handlebar-joystick connection. Using a spring or something similar as part of the connection between the handlebars and the joystick "stick" would provide smoother operation and be more tolerant of imperfect alignment between the components. Elastics or springs to provide passive resistance to your handlebar turning would provide a better overall feel. A fan positioned in front of the exercise bike that turns on when you pedal hard (so you feel wind when you pick up speed) would be really cool! Head tracking implemented by using the right-side joystick on the controller (for looking around) would be interesting. Perhaps a systems like this homebrewed XBOX headtracker would work.
Things Learned the Hard Way 1. Plan for needing to manually push "upwards" (which makes you walk when on foot) on the joystick! To steer the bike you only need left-right, but you will need to walk around to GET to a bike in the game in the first place, and you'll need to walk back to the bike if you crash and fall off. So plan to be able to walk by somehow pushing the up direction on that joystick! Otherwise you'll find yourself plugging in an unhacked controller just so you can walk to your bike. 2. Expect to run into #1 regularly if playing BULLY, where you can't stay awake past 2AM in the game (you fall asleep and wake up on foot otherwise). |
![]() |
Main | Projects
|
About |
Store |
Contact and Services
Original Content - Copyright 2008 (Except where specified)
Want to publish this?