- Redraw the lander as an Apollo LM: wide octagonal descent stage with panel detail and engine bell, narrower angular ascent stage with docking tunnel, RCS quads, triangular cockpit windows and rendezvous antenna, A-frame legs splaying to saucer foot pads with surface probes. - Add mission select (Cadet / Pilot / Commander / Astronaut); gravity and starting fuel come from the chosen mission via World.gravity and World.startFuel. - Expand landing grading to five tiers with authentic-style messages: A PERFECT LANDING / GOOD LANDING / ROUGH LANDING / YOU MISSED THE LANDING AREA / CRAFT DESTROYED. Scoring and fuel bonuses tiered. - Zero horizontal velocity against the world-edge wall instead of leaving momentum dangling. - Package for release: README with user guide, install.sh matching the OMA-* series, icon.svg of the LM, .gitignore excluding CLAUDE.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
43 lines
934 B
Lua
43 lines
934 B
Lua
local World = {
|
|
WORLD_W = 4000,
|
|
WORLD_H = 2000,
|
|
screenW = 0,
|
|
screenH = 0,
|
|
baseScale = 1,
|
|
state = "title",
|
|
score = 0,
|
|
highScore = 0,
|
|
fuel = 750,
|
|
time = 0,
|
|
stateTimer = 0,
|
|
landingResult = "",
|
|
landingPoints = 0,
|
|
gravity = 12,
|
|
startFuel = 750,
|
|
difficultyName = "PILOT",
|
|
}
|
|
|
|
function World.resize(w, h)
|
|
if not w or not h then w, h = love.graphics.getDimensions() end
|
|
World.screenW = w
|
|
World.screenH = h
|
|
World.baseScale = w / World.WORLD_W
|
|
end
|
|
|
|
function World.ensureScale()
|
|
local w, h = love.graphics.getDimensions()
|
|
if w ~= World.screenW or h ~= World.screenH then
|
|
World.resize(w, h)
|
|
local Fonts = require("rendering.fonts")
|
|
Fonts.init()
|
|
end
|
|
end
|
|
|
|
function World.addScore(points)
|
|
World.score = World.score + points
|
|
if World.score > World.highScore then
|
|
World.highScore = World.score
|
|
end
|
|
end
|
|
|
|
return World
|