From Trammell Hudson's Projects
(Redirected from SR2K)
This is an update to the Space Rocks Arduino vector game, now with a 3D planet and spherical geometry. It is very much a work in progress, but playable and somewhat fun. It debuted at the 2017 Interactive Show at NYC Resistor. If you don't want to download Processing, it is playable in browser!
It is playable with the keyboard, or with a custom joystick built with a Teensy that emulates the keyboard. The controls are:
- Left/Right fire the RCS to rotate the ship. On the first level there is spin stabilization, so the ship will stop rotating when you release the key, but on level two and above you must fire the opposite thruster to halt the rotation. The RCS do not use any ΔV.
- Up fires the main engine, which will thrust in the direction of the ship and costs quite a bit of ΔV. To slow down, rotate the ship to face opposite the direction of travel and fire the main engine.
- Down fires weaker retro rockets, which can be used to help match the speed of the satellites (in blue).
- Space bar fires the main gun, which costs 1 ΔV. Bullets live for about three seconds before de-orbiting.
- z activates the shield at a cost of 100 ΔV. This will destroy any space rocks or rockets in the vicinity, but does not harm the blue satellites.
A good strategy is to keep the velocity low and station keep around a satellite. If the ship is close enough to the blue satellite, the ship will turn green to indicate that it is recharging both health and ΔV. The satellites can be destroyed by space rocks, so it is important to protect them. If you run out of ΔV and there are no satellites in orbit it will not be possible to complete the mission. On level two and above friendly fire from the bullets will destroy the satellites, so be very careful!
The Processing source is available github/osresearch/spacerocks2000 for you to play with. Most of the mathematical complexity is in SpherePoint.pde, which computes the great circle path for a point on a unit sphere.