I started playing Ship Simulator Extremes, and I got to thinking about what it would take to make a custom controller for it. At one point a device called the ShipDriver was produced, but it has been discontinued, doesn't do exactly what i want, and it's more fun to build than to buy.
What I'm thinking:
A controller that should fit on your lap with things like two azimuth thrusters, rudder wheel, side engine thruster throttles, etc. It would also ideally communicate to the PC via bluetooth, since I play on the TV while sitting on the sofa. Buttons and flashy lights are a given.
I only have experience building the projects in the Arduino starter kit, so I know I have a lot to learn, but the big thing that seems like a mystery to me is how you would interface with the game. For example, how to tell it that the value coming from this potentiometer should should set the right engine throttle.
With a little bit of Googling it seems like the UnoJoy is a good way to present the controller to the PC, I'm just not sure how to "talk" to the game. (And how to build those azimuth throttles, but that's another question.)
Marmotjr:
Have the arduino be a USB keyboard (I believe the Leonardo is the choice for this), and then remap the game controls to the USB keyboard, or have the arduino emulate the keystrokes required.
Then the code interprets each input, processes it into keystrokes, and outputs the appropriate signal to the PC. I'm not familiar with the Leonardo and this application, but I have done quite a bit with USB keyboard emulators, take a look at nostromos loadout manager. I wonder if that could be adapted for this application.
As this is a custom job, you'll probably want custom controls made, and having a 3d printer helps. If you don't, you could make some from what you have lying around or go buy some, or check out a place like 3dhubs to have somebody print stuff out for you.
Thanks a ton for your help! I see what you mean. I think from here what I need to figure out is how to configure the game itself with analog inputs (I haven't seen that in the configuration settings so far).
If I can do that, the gist I get is that you push 50% forward on the throttle, the arduino reads the pot, interprets the value as 50% throttle, and then hands that information to the game. It's that last part that I'm fuzzy on, but I bet that's something game-configuration specific that I need to look up.
I plan on making whatever I can by hand. The controls seem fairly straightforward, as you mentioned, save for the azimuth thrusters which will need to be carefully combined (like a lever+pot for the throttle mounted on a wheel for the azimuth control).
I have played this game, but it's been a while, but it's more like if you want 40% throttle, there would be a key stroke (4 perhaps?) that would set the throttle to 40%. The arduino would read the sensors, and then output the 4 key to the PC. You would be turning a bunch of wheels and levers and switches into a keyboard.
See, that's what I'm trying to avoid. The throttle controls / engine rotation are analog in game. You can manipulate them freely by click-dragging them with the mouse, placing them wherever you like. The ShipDriver that used to be available recreated the real-life feel of the controls. Here's a youtube video of it in action.
Eh. That seems highly undesirable (not handling screen resolution changes, imprecise, needing to be configured completely differently for different ships, nearly impossible to configure), and I highly doubt that's how the ShipDriver did things (It advertises as being able to be used for a variety of ship sims, and within this game seems to be plug-and-play for various ships).
That's what lead me to looking up things like the UnoJoy. They have various projects and state that it can be used to map both buttons and joysticks. While that alone alone takes me so far, my hope was that the analog support could be used for the mapping I would need for this project.
The trick will be to combine both the keyboard and unojoy (or whatever other joystick emulator library) you use together. They may or may not work well together. It might turn out ok - or you might find yourself needing to wade through both library's code bases, and coming up with something custom.
I would concentrate on getting one side, then the other operating independently; for instance, start with the UnoJoy library, and try to get it to take the input of a potentiometer, and have it output to the PC, looking like a HID joystick - and use some kind of testing program on the PC to see how it is working (don't try to use the game in the beginning). Then build up from there.
Save a copy of your joystick code, then reload the arduino with your keyboard code, taking other inputs/buttons and mapping them to keypresses; again - don't use the game, instead open up notepad or something and have the output appear there.
Then - work on combining your codebases and the libraries together; this might be the most difficult part of the project, or it might be the simplest. One thing you might run into, is memory issues; for the number of inputs you need, though, you'll probably have to go with a Mega anyhow.
I think I'll start (as you said) by loading up UnoJoy onto my arduino, connecting a pot, and getting that working with some test code. From there, I'll probably then move to seeing if I can get the game configured with that input. I figure if I can turn the pot itself and have that operate the rudder, or set the throttle, etc., that's enough to know I can at least make a decent set of controls.
From there I'll look at integrating UnoJoy with a keyboard library for keystrokes. I do believe I'll be going with an Arduino mega, and the author of UnoJoy has a similar project - MegaJoy - just for that. Between two engine throttles + rotation, fore and aft thrusters, and rudder, I'm seeing at least 7 joystick axes.
Anybody remember my less than buoyant impressions of Ship Simulator Extremes a couple of weeks ago? Well, the developers have since sent us a fairly comprehensive response, which only occasionally stops pointing out that I am awful at boats to defend their game and what they were striving to do with it. Good on them, I say. You can find the whole thing beneath the jump.
In other news, the Ship Simulator Extremes demo was also released today! Anyone who fancies taking control of a big ol' Greenpeace vessel and harassing some whaling fleets is currently experiencing their lucky day.
More developers should have a pop at specific journalists. It's much more fun when this is a two-way thing. Here we go:
Joking aside though, about the controls: most motor ship controls are quite standard (thrust, rudders). Same goes for trains. That is why you have a lot more ship captains and train drivers than airplane pilots. However, that does not make it simple or uninvolving. It takes actual skill to manoeuvre these babies without scraping the paint off them. There is a lot more finesse and simulation in the game than maybe you discovered on initial playthrough. Some suggestions for example would be using the actual conning screens, the radar, charts, autopilot, towing and berthing. Perhaps these were things that you missed initially.
Also, if you are looking for complex manoeuvring then I definitely recommend trying the hovercraft, or the Azimuth thrusters tug, or having a crack at towing a huge tanker into a shallow harbour etc. Even though the controls of most vessels seem pretty straightforward, it requires real skill to manoeuvre a vessel correctly, taking multiple thrusters into account. Some missions also require you to take control of multiple ships, but we suggest you start with just the one.
Ultimately, Ship Simulator Extremes is a vessel simulator focusing on the concept of captaining a ship in different circumstances and missions and using skill to conquer these circumstances and given missions.
very nice, but i prefer larger ships like cruises or cargo ships where i can control with the stern and bow thrusters. Something similar to Ship Simulator extremes and navigating out and into busy ports will be fun.
Please check the system requirements at the bottom of the Ship Simulator Extremes webpage.
Notice that Ship Simulator is not compatible with Intel HD Graphics chipsets that are commonly used in laptops.
Please try to run the program unregister.exe from the installation folder of Ship Simulator 2008 (default location C:\Program Files\Vstep\Ship Simulator2008\). This program cleans the "Virtual store".
Usually these problems are related to a graphics card that does not meet the minimum requirements. If you are sure your system exceeds the minimum requirements you can follow these steps to get the game to work:
To Download missions:
1. Register your license key in your account information on forum.shipsim.com
2. Download missions in the game via menu item "Download content".
3. Play the downloaded mission by selecting it in the mission list (Play ->Single mission) .
This issue is caused by graphics cards that to do not meet the minimum specs or have outdated drivers. Please try toupdate your graphics drivers, if this does not help you will require to purchase a newer graphics card that meets the minimum requirements.
Unfortunately Ship Simulator Extremes is not available on Mac.
We did hear some success stories of people that were able to run it with Windows on their Mac through "Bootcamp" or by using a Windows emulator. But it requires some effort to make it work.
Pressing these buttons on the website adds the selected product to your shopping cart. You can see the contents of your shopping cart by clicking on the cart symbol at the top-center of the webpage. Please check before ordering if the correct number of products is in the shopping cart. You can change the quantity by filling in the correct quantity and then the button "Update cart". Press the "Checkout" button to continue with the the ordering process.