Initial commit
This commit is contained in:
@@ -0,0 +1,160 @@
|
||||
# The Last Hearth
|
||||
|
||||
An original, standalone Luanti survival prototype: gather flint and sticks, make
|
||||
tools, build a supported shelter, fuel a hearth, cook forage, and boil water.
|
||||
This is an **environment simulation prototype, not a full physics simulator**.
|
||||
It does not depend on Minetest Game (MTG), nor claim feature parity with another
|
||||
survival game. Original game code and original procedural assets are MIT-licensed;
|
||||
the separately distributed Luanti engine retains its own licenses.
|
||||
|
||||
Season VI planning: [launch feature checklist](../../doc/season-vi-launch-features.md)
|
||||
and [implementation roadmap](../../doc/season-vi-roadmap.md). The prototype is the
|
||||
baseline, not a release candidate.
|
||||
|
||||
## Local Windows launcher
|
||||
|
||||
Requires Node.js 22+ (built-in modules only) and the official Luanti 5.18.0 Windows
|
||||
64-bit distribution already installed under
|
||||
`%LOCALAPPDATA%/last-hearth-runtime/luanti-5.18.0-win64/`.
|
||||
Its executable is `bin/luanti.exe` within that runtime. The previously verified
|
||||
distribution archive SHA-256 is
|
||||
`bebce52b58555d8208bf16767d0717788479fef23c35ec8d7bf287774d641835`.
|
||||
This is an archive digest, **not** an executable digest. The launcher does not
|
||||
download software or pretend to reverify the archive from its extracted files.
|
||||
Keep the runtime directory writable only by trusted local users.
|
||||
|
||||
From this game directory:
|
||||
|
||||
```text
|
||||
node scripts/run.mjs check
|
||||
node scripts/run.mjs smoke
|
||||
node scripts/run.mjs test
|
||||
node scripts/run.mjs play
|
||||
```
|
||||
|
||||
- **check:** start a disposable headless engine world and compile all game and
|
||||
test Lua files using the engine's Lua implementation. Loading the game also
|
||||
catches startup errors. Standalone mocked tests are compiled, not executed.
|
||||
- **smoke:** additionally verify the real `hearth` global, standalone content and
|
||||
MTG absence, registered recipes and actual engine craft results, biome aliases,
|
||||
and asynchronous map emergence with real registered terrain, required starting
|
||||
resources, and functional enclosure checks. Model and content unit suites run
|
||||
in isolated Lua environments: the mocked `core` and `os.time` never replace
|
||||
globals in the running game.
|
||||
- **test:** run both engine checks, including 19 content regressions and 11
|
||||
solar/climate/needs tests. No separate Lua interpreter is required. If
|
||||
`HEARTH_LUA` is provided, also execute the standalone harnesses with that local
|
||||
interpreter. It must be an absolute executable path.
|
||||
- **play:** launch the graphical engine directly into a persistent singleplayer
|
||||
world. This is the only command that opens gameplay; checks never launch it.
|
||||
The normal engine camera, mouse and keyboard controls apply. Consult the
|
||||
engine's Controls menu for bindings.
|
||||
|
||||
The main game files must exist before these commands can run; incomplete parallel
|
||||
development produces an explicit missing-file error, not a passing result.
|
||||
|
||||
## Location, privacy and survival
|
||||
|
||||
## First play
|
||||
|
||||
- Press **I** for the crafting grid and field notes; `/guide` reopens the guide.
|
||||
- Gather flint, sticks, berries and thatching rushes. Make an axe to harvest logs.
|
||||
- Build supported walls/roof and fuel a stone hearth with sticks or logs.
|
||||
- Fill a carved cup at water, then use it on a fueled hearth before drinking.
|
||||
- Hold **Aux1** (normally E) while moving forward to sprint.
|
||||
- Use `/practice` in local play to place the opt-in sparring target. Strike to
|
||||
start, step away to evade, or hold right-click with a spear to brace.
|
||||
- `/claim` protects one homestead; `/claim remove` releases it.
|
||||
|
||||
There is deliberately no automatically granted equipment, fast travel, PvP,
|
||||
quest system, or downloaded mod collection.
|
||||
|
||||
### Known prototype limits
|
||||
|
||||
Movement uses engine prediction and modest sprint overrides; this is **not** a
|
||||
custom animated combat controller. The practice opponent is a stationary,
|
||||
non-lethal sparring device, not wildlife AI. Tool silhouettes, material tiles and
|
||||
the simple player mesh are original generated assets, not final character art.
|
||||
Cooking consumes fuel immediately; needs and heat are game approximations.
|
||||
Structural support is checked on wall/roof placement only; blocks do not collapse
|
||||
when supports are removed, and generic terrain/planks are not structural physics.
|
||||
No food spoilage, crops, insulation clothing, positional audio or animal hunting
|
||||
is implemented. Atmospheric daylight approximates solar elevation through the
|
||||
engine's fixed orbit; calendar labels are meteorological seasons. Real-world civil
|
||||
timezones/DST display is not implemented: UTC and local solar time are explicit.
|
||||
|
||||
The launcher generates PNG textures and an OBJ mesh from original deterministic
|
||||
code into its managed runtime copy. If installing elsewhere, first stage with
|
||||
this launcher or call the exported asset generator for that destination.
|
||||
|
||||
### Location selection
|
||||
|
||||
Optionally supply **both** `HEARTH_LATITUDE` and `HEARTH_LONGITUDE` as decimal
|
||||
degrees before launch. The launcher validates latitude −90…90 and longitude
|
||||
−180…180, then writes the game's `hearth_latitude` and `hearth_longitude`
|
||||
settings. Coordinates are user-selected, not automatically detected. Neither
|
||||
the launcher nor this setup uses IP geolocation or a remote location service.
|
||||
Coordinates are stored in the local generated configuration; avoid publishing it.
|
||||
|
||||
Without coordinates, use the singleplayer game's location prompt or `/location`
|
||||
command. A server deployment must explicitly select its location rather than
|
||||
silently assuming a player's location. This launcher is **not** a public server
|
||||
deployment tool. Location controls the environment model's local solar time,
|
||||
daylight, seasons and temperature; these are approximations, not live weather.
|
||||
Disposable checks explicitly select a synthetic 45°N, 0°E test location when the
|
||||
environment variables are absent; that fixture is never used for play.
|
||||
|
||||
Damage and survival are enabled; creative mode and PvP are disabled. Needs do not
|
||||
decay while the player is offline. Hearth fuel can still expire by real elapsed
|
||||
time; that is distinct from offline player-needs decay. This prototype does not
|
||||
provide accounts, credentials, federation, or public matchmaking.
|
||||
|
||||
## Runtime storage and safety
|
||||
|
||||
The launcher recursively copies the game into the runtime engine's
|
||||
`games/last_hearth/` search directory, omitting `scripts`, `tests`, and `.git`.
|
||||
It uses regular-file copying rather than `fs.cp` to support the repository's
|
||||
Windows SMB location. Symlinks and junctions are rejected. Only copies marked as
|
||||
launcher-managed can be replaced; an existing unmanaged installation is left
|
||||
untouched. A runtime lock prevents simultaneous launchers from replacing a game
|
||||
while it is running. After a crash, remove the lock only after confirming the
|
||||
old launcher and engine have stopped.
|
||||
|
||||
Persistent play data lives under
|
||||
`%LOCALAPPDATA%/last-hearth-runtime/worlds/last_hearth/`.
|
||||
Back up this directory before changing game versions. Launch configuration is
|
||||
regenerated on every play run; environment settings are not silently inherited
|
||||
from an old configuration. The launcher never deletes the persistent world.
|
||||
|
||||
Checks stage their test mod under a disposable world's
|
||||
`worldmods/hearth_smoke/init.lua`, then delete that world's files on completion
|
||||
or failure. Test success requires **both** a zero engine exit status and a unique
|
||||
per-run success marker. Lua assertions, startup errors, missing markers, process
|
||||
failures, or deadlines cause a nonzero launcher exit. Engine checks are bounded
|
||||
to 90 seconds each, their internal watchdog to 60 seconds, and standalone tests
|
||||
to 30 seconds each. Play has an eight-hour safety limit; exit normally before it
|
||||
to avoid a forced termination. Ctrl+C terminates the child process; normal in-game
|
||||
Quit is preferable for saving a play session. UTF-8 output is streamed with a
|
||||
bounded diagnostic tail; the persistent play log remains in the runtime root.
|
||||
|
||||
Generated settings include:
|
||||
|
||||
```ini
|
||||
enable_damage = true
|
||||
enable_pvp = false
|
||||
creative_mode = false
|
||||
bind_address = 127.0.0.1
|
||||
server_announce = false
|
||||
enable_ipv6 = false
|
||||
time_speed = 0
|
||||
movement_speed_walk = 4
|
||||
movement_speed_fast = 6
|
||||
movement_speed_jump = 6.5
|
||||
secure.enable_security = true
|
||||
```
|
||||
|
||||
Smoke/check use a randomly selected high UDP port, loopback binding, and zero
|
||||
allowed users. No public bind, remote inputs, shell commands, credentials, or
|
||||
trusted-mod security bypasses are configured. A port collision fails visibly;
|
||||
it is never treated as success. Local filesystem permissions remain those of the
|
||||
current Windows account; the launcher does not claim to provision Windows ACLs.
|
||||
Reference in New Issue
Block a user