Commit Graph
22 Commits
Author SHA1 Message Date
HamedandClaude Opus 5.5 bc6f472f08 feat: embeddable CompanyGame with loader, poster, no-WebGL fallback and SEO
CI/CD / test (push) Successful in 1m10s
CI/CD / publish (push) Successful in 1m20s
CI/CD / deploy (push) Successful in 6s
- CompanyGame bundles the store, a branded loader with start-up progress, an optional
  light poster (Enter the game) and a company-info fallback when WebGL is missing.
- startMode prop and ?mode= start straight in a mode; ?poster shows the poster first.
- Pixel ratio capped at 1.5 on touch devices and 1.75 on desktop (constants/graphics.js).
- Build writes the title, description, Organization JSON-LD and a hidden Persian
  summary into index.html from the company config.
- README explains iframe and component embedding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:26:30 +03:00
HamedandClaude Opus 5.5 bced4dc6f6 feat: step-based missions around park machines with 3D objective arrow
Phase 5 of turning the game into the company landing page.

- Replace purchase-only missions with a data-driven list of short step
  chains (goto, locate on map, inspect, order, buy, buy at N places)
  in src/game/missions, with pure progress logic on the game state.
- Six missions, most about machines installed in Park Mellat; add two
  sites there (lake and sports fields) and record the product model
  installed at every site.
- Inspecting a machine opens a machine card with the installed model,
  specs, price, an order request and sales contact.
- The objective chip shows the current step; the missions sheet lists
  missions with the current one's steps ticked; a brand-coloured arrow
  hovers over the target machine.
- Rewards and banners per finished mission, the next step is spoken.
- Tests for mission data, step logic, text and the machine card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 09:19:25 +03:00
HamedandClaude Opus 5.5 5a4dffc9a3 feat: minimal HUD with one floating menu and objective chip
Phase 4 of turning the game into the company landing page.

- Only the menu button, a compact objective chip and the touch
  controls stay on screen; speed shows only while driving.
- The objective chip shows the next goal in one line, its distance and
  an arrow that turns towards it (replaces the compass strip); tapping
  it opens the mission list.
- One floating menu holds map, missions, status, products, real-world,
  camera, stable mode, sound, graphics, minimap, fullscreen, help,
  restart and back to the start screen. It closes on a second tap, a
  tap outside, Escape, or after an action.
- Missions, status and help open as sheets; street label, rank bar,
  status panel, toolbar and compass are gone. The minimap is optional
  and off by default.
- Share the icon set and sheet dialog between start screen and HUD.
- Layout checked for phone portrait, landscape and safe areas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 08:50:29 +03:30
HamedandClaude Opus 5.5 d9ae8a45da feat: add landing-style start screen with four start modes
Phase 3 of turning the game into the company landing page.

- Replace the Iran-map briefing with a brand start screen over the
  orbiting 3D factory: logo, tagline and four ways in.
- Real world: safety notice, then GPS; if location is denied or
  missing, a friendly dialog offers offline play instead.
- Offline: start at Park Mellat beside the family car with the route
  to the factory, where the first purchase mission is.
- About Us: start in the factory yard. Products: start at the machine
  samples with the showroom open.
- Contact, address with map links, FAQ, careers, gallery and social
  links open in a sheet (bottom sheet on phones) from company config.
- Restart replays the chosen mode. Layout scrolls on short screens and
  respects safe areas.
- Add tests for the start screen, map links and theme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 08:39:22 +03:30
HamedandClaude Opus 5.5 8dbaf3d97e refactor: centralize brand, company info, assets and Persian strings
Phase 1 of turning the game into the company landing page.

- Add src/config/company.js with name, tagline, contact, about and the
  product line, plus a brand palette built around #00a693 (contrast
  checked); placeholders are marked TODO(company).
- Add src/config/assets.js listing every loaded file with its expected
  format; placeholders are marked TODO(asset).
- Move all Persian interface text, dialogue, missions and scenery text
  into src/i18n/fa.js; components and game code read from it.
- Expose the palette as CSS variables (--color-primary and shades) and
  Tailwind colours, and use it for 3D materials and map drawings.
- Fix the arrival line that still called the manager's car a white
  pickup.
- Add tests that block hard-coded Persian text and low-contrast colours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 08:13:00 +03:30
HamedandClaude Opus 5.5 526796126d fix: draw street map ground and repair mobile layout
CI/CD / test (push) Successful in 57s
CI/CD / publish (push) Successful in 1m8s
CI/CD / deploy (push) Successful in 6s
- Turn the satellite ground off behind SATELLITE_GROUND so OSM streets,
  parks and land use are drawn; the imagery index is no longer fetched.
- Restore phone rules lost in the CSS-to-JS theme migration (#rank
  height, toolbar button size) and replace invalid -var() values.
- Add a landscape-phone layout and make the briefing scrollable.
- Add two-finger pinch zoom to the big map.
- Add regression tests for the theme and the skipped imagery request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 07:51:40 +03:30
Hamed fbfa8d011d docs: document React architecture and enforce migration checks in CI
CI/CD / test (push) Successful in 1m15s
CI/CD / publish (push) Successful in 1m21s
CI/CD / deploy (push) Successful in 6s
2026-10-28 12:53:12 +03:30
HamedandClaude Opus 5.5 751af768ce Factory departments, staff and a faster family car
CI/CD / test (push) Successful in 23s
CI/CD / publish (push) Successful in 24s
CI/CD / deploy (push) Successful in 5s
The factory now has an engineering office with five named developers and
the first-mission vending machine, an accounting office, and the manager's
room. Mr. Mohammadi drives in with his KMC T8 pickup and walks to his desk.
The production hall has five work areas staffed by 40 instanced workers, and
a truck loads packed machines at the dock and drives out of the gate.

The family car is a BMW-style sports sedan (no badges) parked beside the
start point, with a top speed of 200 km/h. Driving is now sliced into
sub-steps so the car can't tunnel through walls. Microsoft footprints that
reach into the compound are dropped, and the gate sign reads correctly
from inside the yard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 11:27:46 +03:30
HamedandClaude Opus 5.5 9b289f76b0 Satellite ground and real building footprints
CI/CD / test (push) Successful in 18s
CI/CD / publish (push) Successful in 22s
CI/CD / deploy (push) Successful in 6s
- The ground is Esri World Imagery: ~1 m/pixel tiles around the city
  zone, the factory and 300 m either side of the drive between them,
  coarser tiles for the whole region. Tiles are hosted with the game
  (public/imagery, scripts/fetch-imagery.mjs), stream in near the camera,
  are cached by the service worker as visited, and replace the drawn
  roads and land areas
- ~141,500 Microsoft building footprints (ODbL) join OSM's ~4,000 in a
  compact delta-encoded file (public/data/buildings.bin, built by
  scripts/build-buildings.mjs). Heights are estimated from footprint
  area and land use, with industrial halls outside the ring road.
  Buildings are built in 500 m blocks as the camera approaches
- Caddy compresses the buildings file and caches map data for a week;
  the build targets ES2022 for top-level await
- Tests for decoding, factory clearance, machine reachability and tile
  placement

Imagery attribution: Esri, Maxar, Earthstar Geographics, and the GIS
User Community. Commercial use requires a suitable Esri licence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 09:30:02 +03:30
HamedandClaude Opus 5.5 5cea802b97 First-person real-world mode and centred notifications on phones
CI/CD / test (push) Successful in 19s
CI/CD / publish (push) Successful in 15s
CI/CD / deploy (push) Successful in 5s
- Real-world mode is first person: the view stands at the GPS position at
  eye height and only real walking moves it; the phone's orientation
  aims it, with the camera picture (AR) or over the 3D city when the
  camera is off. Without an orientation sensor it follows the compass or
  walking direction and can be dragged. The family, car and run buttons
  are hidden in this mode
- Orientation sensors are now separate from the camera stream in ar.js
- On phones, dialogue, the buy prompt, banners, points and GPS status
  sit in the middle of the screen; the prompt can be tapped; the toolbar
  is one scrollable row and no longer covers the budget and clock

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 15:00:28 +03:30
HamedandClaude Opus 5.5 6ce560089f Add camera AR view, GPS stable mode and wider machine range
CI/CD / test (push) Successful in 28s
CI/CD / publish (push) Successful in 17s
CI/CD / deploy (push) Successful in 4s
- Real-world mode opens the phone's rear camera as the game background;
  the 3D camera stands at the GPS position and follows the phone's
  orientation, so machines, beacons, range circles, the route and the
  robot appear in their real direction. City, traffic and family are
  hidden in this view; a toggle switches back to the 3D map, and drag
  turns the view where there is no orientation sensor
- Stable mode (default on): drops GPS jumps impossible on foot, holds the
  position until it drifts past half the GPS error, calms the compass
- Arrival range is 2.5x the GPS error (20–50 m), shown as a ground circle
- Tests for the stabilizer, AR orientation and field of view

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:14:04 +03:30
HamedandClaude Opus 5.5 8cc0e8ce80 Rename the factory to Robot Market, fix GPS search and add GPS test points
- The factory company is now "شرکت روبات مارکت" on signs, dialogue,
  briefing, map label, manifest and README
- Real-world mode no longer shows "location not found" for every
  problem: it takes a quick coarse Wi-Fi/network fix first, keeps
  searching after a GPS timeout, and reports permission denied (1),
  location off (2), still searching (3) or a non-HTTPS page separately
- Three GPS test machines at real coordinates beside the factory, only
  present in real-world mode; the closest machine within reach is used
  and the arrival radius is twice the GPS error (12–40 m)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 11:23:22 +03:30
HamedandClaude Opus 5.5 9832f303e8 Make CI and Docker builds survive an unreachable npm registry
CI/CD / test (push) Failing after 7m58s
CI/CD / deploy (push) Skipped
The Gitea runner hung for over 30 minutes on `npm ci` because it cannot
reach registry.npmjs.org. The registry is now configurable through the
NPM_REGISTRY repository variable, passed on to the server's Docker
build, and npm gives up after bounded retries. Jobs also have time
limits (test 15 min, deploy 30 min) so the runner is never held forever.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:15:49 +03:30
HamedandClaude Opus 5.5 22aa11bf32 Add Gitea Actions CI/CD
CI/CD / test (push) Canceled after 0s
CI/CD / deploy (push) Canceled after 0s
Every push and pull request installs, tests and builds the game. Pushes
to main then ship the sources to the server over SSH and restart the
site with docker compose; the deploy step is skipped until the
DEPLOY_HOST / DEPLOY_SSH_KEY secrets exist. An optional HEALTH_URL is
polled after deploying.

The Gitea server is now the `origin` remote; GitHub remains as `github`.
Gitea ignores .github/workflows while .gitea/workflows exists, so the
GitHub Pages workflow keeps running only on GitHub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:07:54 +03:30
HamedandClaude Opus 5.5 47b2b72ea9 Add Docker deployment with automatic HTTPS
Deploy game to GitHub Pages / deploy (push) Failing after 21m51s
A two-stage image runs the tests and builds the game with Node, then
serves dist/ with Caddy, which obtains and renews Let's Encrypt
certificates for robotmarkets.ir (configurable via SITE_ADDRESS).
HTTPS is required for installing the PWA and for GPS mode.

- Caddyfile: gzip/zstd, long-lived caching for hashed assets, no-cache
  for the page, service worker and manifest, SPA fallback, permissions
  policy for location and motion sensors
- docker-compose.yml: ports 80/443, persistent certificate volumes
- README: server setup, updates, running behind an existing proxy, and
  workarounds when Docker Hub is unreachable from servers in Iran

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:59:01 +03:30
HamedandClaude Opus 5.5 0939dac9cd Start at the factory, add PWA install and GPS real-world mode
The game now begins inside the Negin Sazan Pishgam Radmehr Atousa
vending-machine factory on the Mashhad–Chenaran road, and the world
extends ~20 km along the real driving route to Park Mellat and
Ferdowsi University.

- Factory compound: production hall with assembly line, office, yard,
  gate and company signs; first mission at its half-price demo machine
- Map data merged from four OSM extracts (factory zone, route corridor,
  region main roads, city zone), clipped to a 15 x 18 km region
- City meshes chunked and culled by distance; traffic recycled around
  the player; minimap and city map drawn from cached tiles + overview
- The Robot Market robot no longer walks with the family: it comes out
  of a machine when they arrive, greets them with expression portraits
  and goes back inside when they leave
- PWA: manifest, icons from the robot avatar, offline service worker
  generated at build time, install button / iOS steps, update prompt;
  Vazirmatn font bundled instead of Google Fonts
- Real-world mode: safety notice, GPS + compass tracking with accuracy
  smoothing, 20-40 m arrival radius, speed lock and in-person bonus

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 08:56:06 +03:30
HamedandClaude Opus 5.5 95a2ae851d Turn the game into a third-person Mashhad city game
Replace the linear forest walk with an open area of real western Mashhad
built from OpenStreetMap data, starting at Park Mellat. A father and child,
guided by the Robot Market robot, find vending machines at a park, school,
universities, a metro station and a mall, on foot or by car.

- Iran province briefing map; only Mashhad is unlocked
- Third-person camera, building collision, arcade car and ambient traffic
- Minimap and full city map with addresses, opening hours and A* routing
- Purchase scoring, missions with cash rewards, ranks and an end screen
- Map data build script (OSM + Natural Earth) and new logic tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 11:27:48 +03:30
Hamed 8a49dc07fa Replace child character with Robot Market mascot 2026-10-22 14:36:12 +03:30
Hamed 6d4c4b7dbe Fix GitHub Pages deployment and document game URL 2026-10-21 11:06:58 +03:30
Hamed b5f3137fff update 2026-10-21 10:58:14 +03:30
Hamed 5857b11bd8 Add interactive picnic journey and synchronize gameplay stages 2026-10-20 12:26:14 +03:30
Hamed f7c6aee286 first commit 2026-10-20 11:41:30 +03:30