TheSkywise - Captain's Controller
See my post titled “TheSkywise - Check Out My EE Starship Bridge Setup” for an overview of the entire project. https://bridgesim.net/discussion/529/theskywise-check-out-my-ee-starship-bridge-setup#latest
The Captain does not do too much. He barks out orders, hopes the crew follows them, and then takes responsibility when the mission fails dramatically. It’s a tough job being a captain.
While the Captain does not have a station, per se, he does need to know what’s going on around him. Not just on the bridge, but also in space. To assist the Captain, I built a controller for the main view screen(s). Here is a picture of my setup for the Captain. You can see there is a large TV labelled “Main Screen” and a spot for the “Radar” screen. We were unable to run the Radar screen due to EE limitations. The Captain's controller is circled in red (not the best picture), and the PC client is underneath the science station just in front and to the right of the Captain's chair.
And here is my controller I built for the Captain position. As you can see, it looks like a big TV remote, which it kind of is. The final product will have both USB cables coming out of the top side of the controller.
Basic Concept – Have a controller that the Captain can use to adjust the Main Screen and the Radar screen. The controller will have two USB cables, each which will act as a USB keyboard. One USB cable will provide the external view commands (Main Screen) and the other will provide the radar commands (Radar screen). Each cable can be connected to two separate clients, one for each monitor, or both can be connected to the same client for a single monitor.
Materials – To complete this project, you will need the following items:
- Buttons (4 Red and 7 Black) – You need some kind of basic Momentary Push Button Switches for this controller. I bought two packages of “Clyxgs Momentary Push Button Switches” for $8.99 each, one black and one red. Each package came with 20 buttons. So, I ended up with 20 red buttons and 20 black buttons.
- Two Micro USB Cables (10ft) - You need two Micro USB cables of 10 feet in length. The ten feet of cable allows more freedom of movement; a short cord requires the Captain to be closer to the Main Screen computer. I bought a pack of three online for $8.99.
- Two Arduino Atmega32U4 Control Boards – There are many different types of Arduino boards. While I can program them, it can be quite confusing at first and I am no expert. I bought the “Pro Micro Atmega32U4 5V 16MHz Bootloadered IDE Micro USB Pro Micro Development Board Microcontroller Compatible with Pro Micro Serial Connection with Pin Header” online. It came with four boards for about $25. Essentially, each board can act as a USB keyboard, mouse, and/or joystick.
- Arduino IDE – The software used to upload your program onto the Arduino boards. Its free. It is beyond the scope of this post to teach you how to program in Arduino, but there are some really good tutorials out there. I highly recommend Paul McWhorter’s tutorials on YouTube. That’s how I learned Arduino. (https://www.youtube.com/watch?v=fJWR7dBuc18)
- Wooden Box and tools – Some kind of wooden box and tools to cut holes for the buttons and cords. I used some small 2x3 wood for the sides and smooth wood panel for the top.
- Photo printer paper and Mod Podge – You will print the label on printer paper and use mod podge to glue it to the wooden box.
- Primer and paint – For the wooden box.
- Wires, solder, soldering iron, etc – I am not going into detail here.
Technical Design – Here is how the electronic box will work:
External Controls – The eight buttons that control the “External View” will be controlled by one of the Atmega32U4 boards. This board will act as both a USB keyboard and a USB mouse and will connect to the client computer using one of the 10 foot Micro USB Cords. When a button is pushed, it will send the proper keyboard command to the client.
View Forward = Up arrow key
View Left = Left arrow key
View Right = Right arrow key
View Backwards = Down arrow key
View Lock-On Target = 't'
Toggle 1st Person View = 'f'
Ship View Counter-Clockwise = Left mouse button
Ship View Clockwise = Right mouse button
Radar Controls – The three buttons that control the “Radar” screen will be controlled by the other Atmega32U4 board. This board will also act as both a USB keyboard and a USB mouse and will connect to the client computer using one of the 10 foot Micro USB Cords. When a button is pushed, it will send the proper keyboard command.
View Tactical Radar = Tab key
View Long Range Radar = 'q'
Tactical Long Range Radar Toggle = Middle mouse button
Building the controller - I will not go into great detail here, but basically build a box that has enough room inside it for all the wires and boards. I suggest at least 6 inches wide, 10 inches long and 2 inches tall. Then, sand the surfaces, prime it and paint it. Next, print out the label using the photo paper and affix it to the box using Mod Podge. Drill your holes as shown on label. I will include my label graphic if you want to use that. Install the buttons, solder the wires to the buttons and the boards, connect the usb cables to the boards and your done.
I’ll post the code for the Arduino boards below.
- I used some black zip ties inside the box to keep the USB cables from pulling out of the Arduino boards.
- I also put some clear rubber bumper pads on the bottom so the box won’t scratch a table surface.
I hope this has been helpful. If you build one using my code or techniques, post it here. I’d love to see it!
So, after I built the above controller, here is what happened. I plugged in the cable for the “Main Screen” into the computer controlling the Main Screen monitor, and the other cable I plugged into a computer controlling the Radar screen monitor.
Whenever you pushed a button on the controller, BOTH CLIENTS FOLLOWED THE COMMAND. How could this be? There were TWO control boards in the controller, each plugged into a separate client computer. None of the wires touched both boards. There were no wire crossing issues. After much head scratching, I finally figured it out.
Essentially, the SERVER determines the view of the “Main Screen” station, and not the individual clients. So, if you press the “Port” view button, the server receives the command and then tells all clients to switch to this view. You cannot have two individual Main Screen stations with different views at this time.
So, we went ahead and removed the “Radar” monitor and client, and plugged both cables of this controller into the Main Screen client computer, and everything worked fine.
I can’t imagine it would be that difficult to fix this issue, but who knows. In the end, my controller is ready to go if this issue gets fixed.
Here is the code I use for the Arduino boards. Just cut and paste into the Arduino IDE and upload it onto each of the boards (Atmega32U4). Enjoy.
Here is the graphic label (I built it using GIMP)
<quote>The Captain does not do too much. He barks out orders, hopes the crew follows them, and then takes responsibility when the mission fails dramatically. It’s a tough job being a captain.</quote>
If the Captain doesn't do too much during a game, you either are on too low of a difficulty, or the crew isn't working together and communicating with the Captain, or the crew are experts at the game. Usually it's that the crew isn't working together nor communicating.
Communication & working together is the point of BridgeSims.
I've found that usually more gear (screens or controls) for the Captain has, the more issues there are with crew communications. Adding new features to the game for the captain to handle, like calling down to the engineers to another part of the ship to prepare for warp (ie Kirk calling down for Scotty), would be a good use for new hardware. I've also seen that the more controls & screens Captains have the quieter they become, which means the crew has to fend for themselves and keep themselves entertained. Not good for a new crew.
Please don't think I'm dissing your work on hardware & software. Custom controls are cool. Wish I had more myself. Your hardware looks very nice.
As the Captain, I always assign either Helm or Weapons control of the Main Screen. Don't leave it up to them. Pick one yourself and tell them they are responsible for changing the screen.
With a New Crew, if the Captain just sits in his/her chair the whole time, there's something wrong. The Captain should be moving from station to station to show them what you want done and to get them to understand your thinking. With a crew that's worked together for several missions and knows their captain, then staying seated is fine.
When I run BridgeSims at conventions, sometimes I need to I give the random new players "busy work" to those that look bored. Engineer and Comms are usually the two stations I give the most busy work to make sure they are engaged - pun intended :) . Have Comms Spam surrender, send messages/order or prepare stations for docking. Get Engineers to crank up shields and beams during battle. Have them turn them down most of the way when cruising to save energy. Have them give you status reports of damage and heat levels after a battle. Science should always be scanning and monitoring all of the ships it can and ask them to give status reports about enemies that are getting close to bases.
Sometimes getting feedback from a good/expert engineer is the same as a beginner. You don't usually hear from either them. Not getting feedback from a beginner is a lot worse than from an expert. Make sure you know which is which. A good engineer & captain relationship is when the Engineer knows when to adjust systems even before the captain gives the order based on the orders being given to the other crew; or the engineer can quickly change the controls to get the ship adjusted to an unexpected order.
Very cool setup! So, you have bridge in the arboretum :-) . I hope you are not too disappointed that your controller doesn't work as expected.
Btw some indicator of this behavior would have been the "main screen controls" button. As there is no lookup options there, those changes have to apply on every single mainscreen.
To slightly work around that behavior, you could connect the Radar view controls to a client with activated Helms and Science console. Then, remap the buttons to the station change buttons. Obviously the disadvantage would be that you also see the buttons of those stations, but I don't think that would be a huge drawback. Other downside IIRC would be that you would also see the scanning minigame when your science officer is scanning.
Actually, when I said the Captain does not do much and takes the blame for failure, I was trying to be funny and tongue in cheek. Its actually my favorite position. I get to sit in the chair, yell at people and I don't have to worry about spilling my drink on a computer! What more could you ask for?
In reference to my controller, it worked great. It can switch between external views and radar views. I just wish I had more independent main screens.
One solution would be to let the Client decide the view. While I don't know the ins and outs of the program, I would guess it could be a simple fix. Just send the data to the client and let the Client decide which view to use. I would imagine it wouldn't be a tax on the performance, since it sends out the data to multiple main screens anyways. Maybe it is an issue, I don't know.
If that is an issue, perhaps the programmers could add a "Secondary Screen" position, or maybe a couple of secondary screen positions. That way, you could add more monitors dedicated to certain views. You could probably use almost all the same code since their functions would be identical.
Just my thoughts. I'm definitely not complaining. EE is an amazing program and I have nothing but respect for those who spent so much time on this free thing for the community.
Well, if you make it client only, that would conflict with the mainscreen controls that you can activate for any station. So, not matter how many Mainscreen you have, the mainscreen control buttons would override that. So you would have to implement a system to adress a certain client with the mainscreen controls, so it would be quite a bit more complicated than just reuse code.
And even if you accept that the mainscreen control buttons could overwrite the local input, you then would have two mainscreen control systems, one client and one server side, and hope they won't collide in some way.
BlueShadow, I think I understand what you are saying.
Is this how it works:
The Main Screen station can have its view changed by any station. For example, Weapons or Helm can change the screen on the Main Screen station?
If thats true, I didnt realize that. Actually, it would have made a few things easier because when we played, the Weapons Station or Helm kept asking the Captain to change views when they were trying to visually target ships, dock, etc. We are all new to the actual gameplay so we didnt realize we could do this. Am I correct in my understanding of how this works?
If thats the case, thats pretty cool. I guess I could use your suggestion to have the second monitor (the "Radar" dedicated monitor) set to watch the Weapons or Helm station radar. Of course, the Captain wouldnt be able to switch between long range and tactical without interfering with Weapons/Helm.
I am going to suggest that a "Secondary Screen" station be added in the request feature. Let me know if my understanding is correct. Thanks.
The Main Screen station can have its view changed by any station. For example, Weapons or Helm can change the screen on the Main Screen station?
Exactly. On the station selection screen, there is a button "main screen controls" below the station names. If activated, the station will get an additional button "main screen". If that one is pressed, you will get a menu where you can switch the main screen view
Of course, the Captain wouldnt be able to switch between long range and tactical without interfering with Weapons/Helm.
There won't be any interference (unless the captain interacts with the controls on that screen, of course).
As long as the captain won't try to fly the ship themself (it helps if no other input devices are connected) and only uses the screen for information, everything will be fine. Other then the mainscreen issue, you are not switching between views, but between stations, and which station is used is up to the client.