v0.2.2 is live | Slingshot Speeders is now cloud hosted on a VPS

Slingshot Speeders is a free orbital racer in the browser. Gravity is inverse-square. You win by capturing an orbit, not by crossing a finish line. Play: https://slingshotspeeders.com/

v0.2.2 is up. Two player-facing fixes, and a hosting change that is the reason the site can stay on.

The site now runs on a small VPS

Until today, live was a Rust process on my desk. Cloudflare Tunnel pointed slingshotspeeders.com at 127.0.0.1:3001 on this PC. Fine for building. Bad for a public game: sleep the machine, or the power flickers, and the site is gone.

Live is now a 2-core / 6 GB box. Same URL. Same Google sign-in. Same Stripe webhook. Google and Stripe never needed new origins, because the hostname did not change.

What actually runs there is still one process:

  • a release server binary (~19 MB)
  • the wasm client and site files we already ship
  • one SQLite file

The VPS does not compile. I build wasm and the server on this Linux PC, rsync the finished files, restart systemd. Downtime is the restart, not a cargo run in Newark.

The origin still binds localhost only. Nothing listens on 80 or 443 on the box. A second Cloudflare tunnel (slingshot-cloud) is the public front. The home tunnel still owns test.slingshotspeeders.com, so I can break test without taking live down. One tunnel cannot split “live on the VPS, test on the desk” — the origin is always localhost on whichever machine is running cloudflared. So we moved the apex hostname from one tunnel to the other. That was a dashboard click. The blank page for ~10 seconds was the route moving.

SQLite has one writer. We stopped the desk process, copied the live database, then pointed the hostname. Daily sealed backups (VACUUM INTO, then ChaCha) land on the VPS disk and get pulled to an 8 TB drive in the house. If the house burns, I SSH to the VPS. If InterServer dies, I unseal the drive.

I was worried 2 cores would choke a 128 Hz sim plus a room. At idle the game process is a few percent CPU and tens of MB of RAM. A real room is the test, but the box is not sweating.

Watch: the trajectory line is a forecast again

The trajectory line is how you read an orbit. Live play already re-solves a no-thrust coast from your current pose: if you let go now, that is the path.

Watch had drifted. The line was drawing the path you already flew, or following a smoothed display pose. That looks like a replay scribble. It is not a prediction.

v0.2.2 pins Watch to the recorded pose at the playhead, then runs the same no-thrust coast the live HUD uses. The hull can still lerp so scrubbing looks smooth. The predicted line cannot. If you pause on a burn, you see the orbit that pose actually had, not a blend of two frames.

Same 128 Hz velocity Verlet as the server. The server still re-flies your button tape. Clients never send pose or race time.

Hoops that tell you the next sit

Hang Time (and any hold circle / gate / orbit-win hoop) was easy to misread: several rings lit, and a second sit on the same hoop waited until the last visit to burst.

Now the next checkpoint, hold circle, or win hoop pulses a glow like the force arrows. After you hit it, it goes flat green. Later yellow ones stay dim — no glow — so the next one is the only one shouting. Hang Time’s hold circle bursts on every sit, including the first. A hoop you sit twice does not wait for the last visit.

Also

Social lists YouTube, TikTok, and X next to Reddit and Lemmy: https://slingshotspeeders.com/social

Chip in the corner says v0.2.2. WHAT'S NEW in the game matches https://slingshotspeeders.com/changelog

Come fly. If the trajectory line makes sense in Watch now, that is the fix working.

3 points · 3 comments · view on lemmy.world

3 Comments

Derg@programming.dev · 2 pts · 2d (2 replies)

I'll keep an eye on the checkpoints to see the changes!

Aside from that though, I've been messing around on Water Rapids and just got an interesting error while I was flying: "Kicked (flood)"

Also, I have more information about the spaceship disappearing bug, I've noticed because I fly Box that it happens after I watch a replay of someone flying in a different ship. If I watch a replay of someone flying in Box, it reappears on the next play. EDIT: Eh, not exactly. Maybe it has to be a replay from someone else flying the same ship? shrug

Derg@programming.dev · 2 pts · 2d (1 reply)

Maybe it's because I have a habit of restarting in the first couple seconds if I mess up?

jaykrown@lemmy.world · 2 pts · 1d

It's a deep bug that I'm going to have to really hyper focus on in the near future. It has something to do with a race condition in the rendering layer system I think. Happens specifically like you said, during times of quick refresh, and FPS drops. The Kicked (flood) issue happens because of ping spikes occurring during key moments like win or connect, thankfully doesn't seem to stop a win from being properly logged though if it happens at the point of win.