Faithful recreation of Atari Lunar Lander (1979) with vector wireframe aesthetic. Auto-detects Omarchy system theme and font on launch. Features: - Dynamic zoom camera (zooms in as you approach the surface) - Procedural jagged terrain with flat landing pads (2X, 3X, 5X multipliers) - Apollo-style wireframe lander with thrust flame - Gravity, thrust, rotation physics - Landing evaluation: good (speed/angle/pad check), hard, crash - Fuel management (750 starting, +50 for good landings) - Crash debris particles, thrust exhaust particles - Star field background - HUD: altitude, horizontal/vertical speed, fuel bar, score, time - Persistent high scores with 3-letter initial entry - Procedural sound effects (thrust, landing chimes, crash, fuel warning) - Full-screen scaling, system font detection Controls: Arrows/WASD rotate+thrust, Space abort, Enter start Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
40 lines
866 B
Lua
40 lines
866 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,
|
|
}
|
|
|
|
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(1)
|
|
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
|