From bff67cfd95985f9c72c3ec57bad4ed730e1d67fd Mon Sep 17 00:00:00 2001 From: otivm Date: Sat, 25 Apr 2026 15:00:15 +0000 Subject: [PATCH] =?UTF-8?q?Add=20constants=20=E2=80=94=20waypoints,=20rout?= =?UTF-8?q?es,=20journal=20with=20H3=20IDs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants.js | 157 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 src/constants.js diff --git a/src/constants.js b/src/constants.js new file mode 100644 index 0000000..5be3f76 --- /dev/null +++ b/src/constants.js @@ -0,0 +1,157 @@ +// OTIVM constants — do not modify H3 IDs, they are permanent +// H3 resolution 5 is the canonical waypoint resolution +// All five cities are within TESSERA interaction sphere (15–72N, 15W–75E) + +export const WAYPOINTS = { + ostia: { + id: 'ostia', + name: 'Ostia', + latin: 'Ostia', + h3_r5: '851e805bfffffff', + h3_r7: '871e805b3ffffff', + h3_r9: '891e805b31bffff', + chapter: 1, + }, + capua: { + id: 'capua', + name: 'Capua', + latin: 'Capua', + h3_r5: '851e8333fffffff', + h3_r7: '871e8331cffffff', + h3_r9: '891e8331c6bffff', + chapter: 2, + }, + brundisium: { + id: 'brundisium', + name: 'Brundisium', + latin: 'Brundisium', + h3_r5: '851e8ba3fffffff', + h3_r7: '871e8ba35ffffff', + h3_r9: '891e8ba358bffff', + chapter: 3, + }, + carthago: { + id: 'carthago', + name: 'Carthago', + latin: 'Carthago', + h3_r5: '85386e23fffffff', + h3_r7: '87386e20dffffff', + h3_r9: '89386e20d63ffff', + chapter: 4, + }, + alexandria: { + id: 'alexandria', + name: 'Alexandria', + latin: 'Alexandria', + h3_r5: '853f5ba7fffffff', + h3_r7: '873f5ba66ffffff', + h3_r9: '893f5ba66b3ffff', + chapter: 5, + }, +} + +export const ROUTES = [ + { + id: 'olive', + from: 'ostia', + to: 'capua', + goods: 'Olive oil, Garum', + profit: 12, + cost: 8, + duration_ms: 6000, + chapter: 1, + unlock_den: 0, + unlock_aut: 0, + desc: 'The coastal road. Safe, slow, reliable.', + }, + { + id: 'wine', + from: 'capua', + to: 'brundisium', + goods: 'Campanian wine, Wool', + profit: 22, + cost: 14, + duration_ms: 9000, + chapter: 2, + unlock_den: 120, + unlock_aut: 5, + desc: 'Via Appia. Faster in autumn.', + }, + { + id: 'grain', + from: 'brundisium', + to: 'carthago', + goods: 'Adriatic grain, Amber', + profit: 40, + cost: 24, + duration_ms: 13000, + chapter: 3, + unlock_den: 350, + unlock_aut: 15, + desc: 'Open sea crossing. Amber from the northern forests.', + }, + { + id: 'linen', + from: 'carthago', + to: 'alexandria', + goods: 'Berber linen, Frankincense', + profit: 70, + cost: 38, + duration_ms: 18000, + chapter: 4, + unlock_den: 800, + unlock_aut: 30, + desc: 'The great southern route. Fortune awaits the bold.', + }, +] + +export const JOURNAL = { + olive: [ + { + dispatch: 1, + day: 'Day 14 · Capua', + text: 'The factor at Capua counts my oil amphorae with the practised suspicion of a man who has been cheated before. Still, the payment is honest. The road back passes a stand of ancient holm oaks that remember a time before Rome.', + }, + { + dispatch: 2, + day: 'Day 28 · Capua', + text: 'Third run on the olive route. I hired a mule this time. The amber bead the Northern trader pressed into my hand at Ostia — I cannot say why, but it feels old in a way that coins do not.', + }, + ], + wine: [ + { + dispatch: 1, + day: 'Day 1 · Brundisium', + text: 'Via Appia. The legionary milestones count the distance to Rome, but I am going the other way now. Campanian wine travels better than Campanian gossip. I have reached chapter two of this life.', + }, + ], + grain: [ + { + dispatch: 1, + day: 'Day 3 · At sea', + text: 'Nothing but water and the creak of the hull. The amber in the hold came down from forests so far north the trees have no name in Latin. Strange to think it passed through a dozen hands before mine.', + }, + ], + linen: [ + { + dispatch: 1, + day: 'Day 7 · Alexandria', + text: 'The lighthouse. After everything — the coastal roads, the Appian dust, the crossing — the lighthouse. I have made it. The linen is sold. I find I am less interested in the profit than in what comes next.', + }, + ], +} + +export const INITIAL_STATE = { + den: 50, + aut: 0, + dispatches: 0, + chapter: 1, + route_dispatches: {}, + journal_seen: [], + token: null, + created_at: null, +} + +export const OTIUM_DURATION_MS = 8000 +export const OTIUM_BASE_AUT = 1 +export const MAX_CONCURRENT_PLAYERS = 128