Linear Space Program
79 subscribers
167 photos
16 videos
11 files
50 links
Побочные эффекты игростроения на хаскеле.

https://icrbow.itch.io/

Чатик: @HaskellGameDev
Дискорд: https://discord.gg/vxpWtBA
Download Telegram
Linear Space Program
And this is how we do ECS, STM, type-safe quantities, FRP, and imgui in Haskell... DearImGui.withWindowOpen "Orbit" do stuff <- atomically . Apecs.runWith rsOrbitSim.sWorld $ Apecs.collect Just for_ stuff \(o@Orbiter.Orbiter{}, Orbiter.MeanAnomaly ma…
And, after a few passes at sweeping it under a rug...

inputOrbitElem rsOrbitSim entity "Eccentricity" (o.orbit.eccentricity # Number) (1/256) (1/8) "%.5f" \ecc' ->
Orbiter.eccentricity .~ (ecc' % Number)

inputOrbitElem rsOrbitSim entity "Periapsis" ((o.orbit.periapsis # Meter) / 1000) 1 10 "%.1f km" \p' ->
Orbiter.periapsis .~ ((p' * 1000) % Meter)

-- ...
Your orbit evolution when you burn anti-tangent for a while
🔥1
The Moon rises!

After an unscheduled rewrite of the rendering components I can now put arbitrary models on arbitrary local orbits. This also opens up a way to do LODs, daily rotation, and backscatter lighting.
Ah, and crashing into distant surfaces.
🔥31👍1