Expedition into Space
The upsolving of this problem will be available for the meantime. Try it at https://expedition.midnightcodecup.org/.
In 2239, Earth has finally joined the Galaxy Republic. Now, its biggest bank, Involut, wants to obtain the Galaxy Bank Licence and has made a request to the regulator. The response was simple: there are 15 hidden keys in space, and the bank has to find them all.
Obviously, the bank owners decided to ask you to find them! Luckily, they gave you a spaceship... Try to find as many keys as possible!
Web Client
There is a web client available at https://expedition.midnightcodecup.org/
- Log in and click
Connect - Use arrow keys to control the acceleration of the ship
Full stopbutton applies maximum breaking until the ship stops. Use it if you want to stop and observe an interesting placeReset shipbutton teleports the ship back to the starting position. Use it if you get lost in space- Keyboard shortcuts:
- Arrow keys — nudge acceleration
Shift+ arrow keys — larger acceleration stepSpace— zero thrustS— stop
Physics
- Your ship has:
- position
- velocity
- acceleration
- You can set the ship acceleration vector.
- Maximum acceleration magnitude is
10.- If you send a larger acceleration vector, it is automatically scaled down to length
10, preserving direction.
- If you send a larger acceleration vector, it is automatically scaled down to length
- Maximum acceleration magnitude is
- There are two additional commands:
stopandreset. - Command
stop:- applies maximum reverse acceleration
- keeps braking until the ship speed becomes zero
- Command
reset:- teleports the ship back to the starting point
- resets velocity and acceleration to zero
Authentication
Requests must include your API token:
Authorization: Bearer <team-api-token>
You can obtain the token in the web client UI.
If the API token is missing, the server returns 401 Unauthorized.
If the API token is invalid, the server returns 403 Forbidden.
API
API root: https://expedition.midnightcodecup.org/api/spaceship
All endpoint paths below are relative to this API root.
1. Get current ship state
GET /
Returns JSON:
{
"teamId": 123,
"teamName": "Your Team",
"position": { "x": 0.0, "y": 0.0 },
"velocity": { "x": 0.0, "y": 0.0 },
"acceleration": { "x": 0.0, "y": 0.0 },
"updatedAtMillis": 1760000000000
}
2. Set acceleration
POST /acceleration?ax={double}&ay={double}
Example:
POST /acceleration?ax=3.5&ay=-1.0
Returns the updated ship state as JSON.
3. Full stop
POST /stop
The server applies maximum reverse acceleration until the ship speed reaches zero.
Returns the updated ship state as JSON.
4. Reset ship
POST /reset
Resets the ship to the starting point with zero velocity and zero acceleration.
Returns the updated ship state as JSON.
5. Get current view
GET /view
Optional parameter:
tool={string}
Returns:
- a
1000x1000PNG image centered on your current ship position
This endpoint is rate-limited to 5 requests per second per team.
Extra requests return 429 Too Many Requests.
The response also includes the current ship state in headers:
X-Spaceship-StateX-Spaceship-Team-IdX-Spaceship-Position-XX-Spaceship-Position-YX-Spaceship-Velocity-XX-Spaceship-Velocity-YX-Spaceship-Acceleration-XX-Spaceship-Acceleration-YX-Spaceship-Updated-At-Millis
This lets you know the exact ship state corresponding to the returned image.
Tools
The view endpoint accepts an optional tool string.
A tool is just a string that is passed to the renderer:
GET /view?tool=<tool-name>
If you find some tool during your journey, you can use it here.
Scoring
Submit found key strings to the checksystem. Each accepted key is worth 160 points. A key can be scored at most once per team.
The maximum score for this problem is 2400 points.
Have a good adventure, explorers!
