Cockpit
A downloadable game for Windows and Linux
Warning: This is a snapshot in development that's more of a proof of concept than a demo. An Xbox Controller is highly recommended.
An idea that's been floating around my head for a long time, this is what happens when you get somebody who plays too much DCS and wants to make a space sim.
This prototype has a functional space ship being driven by a resource system and internal components. There is a fuel tank, there is a generator, there is a battery, and so on. Each of these components works as they should, and they all depend on each other to work correctly.
This demo is built with an Xbox Controller in mind. I added some last minute keyboard/mouse controls, but they don't work very well. Controls are in a very early state. For the time being I'm focusing on nailing the gamepad, and then much later on I'll move onto getting more a more configurable and robust control scheme.
Below are the default controls, with the keyboard backups in parenthesis. There is only one missile type loaded in the demo, so the cycle missile button doesn't do anything.
Controls
- Virtual stick: Left thumbstick (WASD)
- Yaw: Left/Right bumpers (Q, E)
- Headlook: Right thumbstick (Press H to toggle mouselook)
- Throttle: Triggers (R, F)
- Cockpit Interaction: D-Pad (1, 2, 3, 4)
- Guns: A (LMB, LCtrl)
- Missile: B (RMB, LAlt)
- Cycle Missiles: X (MMB, LShift)
- Cycle Assist Modes: Y (Z)
- Change Camera: Press right thumbstick (C)
Cockpit interaction
The cockpit is your office and interactive. It's how you operate your ship and all the little fiddly bits. While your combat functions will be easy to access and displayed on your HUD (eventually), to change miscellaneous options in your ship and for damage control you'll need to manipulate switches in the cockpit.
The cockpit is divided into panels. Each panel has a switch of set of switches bound to a direction on the D-Pad. Simply look at the panel and press the appropriate direction on the D-Pad. In the future there will be a small popup or tooltip to indicate which button corresponds with which tooltip, but that hasn't been written yet.
Resources
Everything in the ship works by passing around resources. The full chart can be seen on the right. When the chain is broken or damaged, many of the other components will suffer for it.
Currently, the easiest way to see the system in action is through the lights and the battery.
On the rightmost panel, the two position slider (D-Pad down) toggles the battery on/off. Without the battery on, both the internal lights and the external lighting will shut off after a second. The avionics will also not function without power, meaning you'll have to fly without the computers.
Weight
Difficult to show without customizable loadouts, or even functional gauges to read most of these values like fuel in the tank, weight is a big part of the simulation. Everything on your ship weighs it down. Weapons, pylons, guns, ammunition, and fuel. As those are expended fired off,the weight of your ship goes down, making it more lighter and more responsive to thruster input.
This system applies to missiles as well. As the missiles expend their fuel, they will lose weight making them even more maneuverable.
Thrusters and Flight Assist
When operating normally, the ship will fire maneuvering thrusters all around the ship to keep its velocity vector aligned with the nose. This simulates plane-like handling, and is the easiest to fly. The ship will also automatically cancel out your rotation.
Pressing Y on the gamepad, you can cycle through the assist modes. Newtonian mode removes the translational correction, leaving you with only your forward and reverse thrusters. In fully off mode, rotational correction is disabled as well. You can rotate the ship faster than before, but you'll have to cancel out all rotations manually.
In normal, your throttle sets a throttle position. (In the future it'll request a desired speed.) In both Newtonian and Off mode, you have direct control over the throttle.
Missiles
Missiles operate on the same physics, thruster, weight, and fuel principles as your ship. They have to fuel tanks, one for forward propellant and another for maneuvering thrusters. When fired off, missiles will try to follow proportional guidance to the target drone that flies across the map.
When the missiles run out of forward propellant, you'll see the smoke and flame trail stop, and the missile will no longer be gaining forward momentum. The maneuvering fuel lasts much longer. Using the leftover maneuvering fuel, the missile will coast towards the target, making corrections with the maneuvering fuel.
If all fuel is expended, the missiles will simply continue on whatever their course was when the fuel ran out, unable to turn or maneuver.
Currently there is no way to retarget the missiles.
Control Troubleshooting
Make sure your controller is plugged in beforehand. If controls are unresponsive, try restarting. The controller won't be recognized if you plug it in or turn it on while running.
If the ship is spinning on its own, either your calibration is off, or you have other input devices that Unity is reading from. If calibration is off, calibrate your gamepad. If it's calibrated correctly, either unplug any game controller peripherals (wheels, sticks, throttles, etc.) or do your best to zero out all the axes on them and don't touch them.
Install instructions
Extract CockpitDemo folder and run Cockpit008Demo.exe.
Do not rebind default controls. The controls are currently very work in progress, with an Xbox controller being the only method officially supported at the moment. Trying to rebind axes will often cause issues.