Commit Graph
41 Commits
Author SHA1 Message Date
jwinterm 83020f6c08 polish character customizer render choices 2026-07-06 04:26:00 -04:00
jwinterm 3195386ba1 refactor: resolve avatar visuals through render kit 2026-07-06 03:41:11 -04:00
jwinterm be780c17e6 feat: use character identity in single player 2026-07-06 03:16:26 -04:00
jwinterm 07cfe80591 feat: improve character customization colors 2026-07-05 21:09:52 -04:00
jwinterm 454e6ab69a feat: add tavern render kit and character entitlements 2026-07-05 20:57:46 -04:00
jwinterm 63e3006aca launch features: win feed, public stats, share-a-win, live CTA
Four pre-launch additions to make the game feel alive and shareable:

- Live win feed: server broadcasts 'win_feed' on every escape; client shows a
  transient toast ('X escaped with the bag') so the room feels active.
- Public stats: GET /api/stats (10s-cached) returns games + escapes in the last
  24h and total paid out; a status-area strip polls it for social proof.
- Share-a-win: game-over screen gets 'Share to X' + 'Copy link' buttons pointing
  at the /verify page, which now renders OpenGraph/Twitter-card meta (brand OG
  image per instance) so shared links unfurl with a preview.
- Land-on-action: a dismissible 'N games live now — watch' CTA appears on connect
  when games are in progress, opening the existing spectator panel. Non-intrusive:
  hidden while playing/spectating and never hijacks the canvas.
2026-06-01 09:17:48 -04:00
jwinterm 038f47051f mobile: compact action buttons to one row, shrink/lighten D-pad
On phones the primary buttons now read START / WATCH / SHOP (short labels via
spans toggled by media query) with tighter padding so they fit a single row.
The on-screen D-pad is smaller (44px) and more transparent so it covers less
of the chat/game underneath.
2026-06-01 08:35:33 -04:00
jwinterm bfca9b340f feat(mobile): viewport, responsive layout, and touch controls
The layout was already partly responsive (max-width:100vw, min(480px,90vw)
modals, canvas max-width:100%, and the renderer centres a fixed viewport on the
player) but had no viewport meta, so none of it engaged on phones.

- Add the viewport (+charset) meta — unlocks the existing responsive rules.
- Mobile media query (<=820px): stack the 3-column grid into one column
  (header/status/game/chat/input/footer), shrink fonts, and cap the fixed-width
  play/history/leaderboard modals to 94vw so they fit instead of overflowing.
- On-screen D-pad + swipe-to-move (new touchControls.js), both emitting the
  same player_move {direction} event the keyboard uses — no game-logic change.
  Shown on small screens or any touch device (body.touch).
- Remove the leftover "GAME AREA" debug overlay.
2026-05-31 16:13:21 -04:00
jwinterm ccdb4521b2 feat(ui): crypto-aware title/favicon + clearer Champions vs Pleb framing
- Footer title and favicon now track the currency: "Monero Roguelike" + the
  Monero logo favicon on the XMR instance, "Wownero Roguelike" + the existing
  favicon on WOW (driven by UI.updateGameTitle).
- "Choose How to Play" modal: a header explains that paying (credits/entry)
  puts high scores in the Hall of Champions while free play uses the Pleb
  leaderboard, and each option now says which board it feeds — on both the
  no-payout (mainnet) and payout (stagenet) variants.
2026-05-31 15:40:26 -04:00
jwinterm a664a8bbce security: escape XSS sinks client-side and add CSP + security headers
The client trusted the server to pre-escape chat content and rendered
user-supplied fields via .html()/innerHTML — one server regression away from
stored XSS, and the admin panel injected user-controlled payout addresses
into its authenticated DOM.

- Add a single shared escapeHtml helper (escapes all five HTML-significant
  chars including both quotes); leaderboard now delegates to it.
- Escape chat username + message in onChatBroadcast/onChatHistory.
- Escape user-controlled fields in the admin panel (payout address, socket
  id, player name, status) and make its local escapeHtml quote-safe so values
  in title="..." can't break out.
- Add CSP plus X-Content-Type-Options, X-Frame-Options and Referrer-Policy
  headers via middleware. connect-src 'self' keeps Socket.IO working;
  removing 'unsafe-inline' (nonces) is tracked as a later cleanup.

Full suite: 13 suites / 119 tests.
2026-05-31 09:40:34 -04:00
jwinterm 223aa75871 security: move session token to handshake auth and rotate on resume
The anonymous session token is a bearer credential that was sent in the
Socket.IO handshake query string, where it leaks into proxy/access/referer
logs and is easily observed. Anyone holding it becomes that user (credits,
payout address, pending payments).

- Client now sends the token in the handshake `auth` payload instead of the
  query string. Server reads `auth` first and falls back to the query string
  for backward compatibility during rollout.
- The token is rotated on every successful resume, so a leaked/observed
  token is invalidated the next time the legitimate owner reconnects. The
  client already persists the token returned in `session_resumed`.

Adds a security test asserting resume returns a new token and the old token
no longer resumes. Full suite: 12 suites / 116 tests.
2026-05-31 09:29:20 -04:00
jwinterm a61851b0f7 add smirk payments and leaderboard and diff tuning 2026-02-20 13:54:36 -05:00
jwinterm 1a714fd69d fix credits display 2026-02-20 09:36:55 -05:00
jwinterm a56063867e fix: chat scrollback and admin control 2026-02-03 12:02:52 -05:00
jwinterm 7573c300cd fix: smirk modal 2026-01-29 08:46:52 -05:00
jwinterm 2286d8deff Feat: add smirk login
Fix: add security hardening and transaction database commits
2026-01-28 17:21:53 -05:00
jwinterm 8fb5c58f9a Fix: History payments 2026-01-13 19:13:11 -05:00
jwinterm aec1c71a8c add early entry and help screens for new users 2025-12-26 10:21:25 -05:00
jwinterm 675caf220f fix payment modal 2025-12-24 19:31:46 -05:00
jwinterm 244a584204 feat: add payout retry tracking and HOSTED_BY footer
Payout retry system:
- Add migration 007 with retry_count, last_error, last_retry_at columns
- Payouts now retry up to PAYOUT_MAX_RETRIES times before permanent failure
- Each failure logs the attempt number and error message
- Console shows ⚠️ for retryable failures, 💀 for permanent failures
- Added SQL examples in .env.example for querying/resetting failed payouts

HOSTED_BY feature:
- Add HOSTED_BY and HOSTED_BY_NAME env vars
- /api/game-modes endpoint returns hostedBy info
- Footer displays 'Hosted by: <link>' when configured

Also improved .env.example:
- Better documentation for credit packages with reasonable defaults
- Clearer explanation of retry behavior
2025-12-24 12:30:14 -05:00
jwinterm 7d701fe01b add backup scripts and improve docs and .env.example 2025-12-22 16:29:32 -05:00
jwinterm 24f46fa35e fix chat and payments and add spectator mode 2025-12-22 10:36:46 -05:00
jwinterm aa419689c8 fix multimode payments and get credits working again 2025-12-21 14:08:20 -05:00
jwinterm deca4a4685 add db commands and test payout (worked!) 2025-11-23 13:33:04 -05:00
jwinterm 4e7a773496 add address modal and try to fix payout 2025-09-29 17:40:59 -04:00
jwinterm f8241dd309 Continue working on payment logic 2025-09-27 11:21:11 -04:00
jwinterm e3915dcde2 Begin payment logic and tests 2025-09-27 08:45:22 -04:00
jwinterm bd97d9d848 First (untested) payment and db setup 2025-06-01 14:17:29 -04:00
jwinterm f02e16272e refactor frontend and fix debug mode 2025-05-29 13:40:44 -04:00
jwinterm de3eed792b waiting anim working 2025-05-28 20:05:51 -04:00
jwinterm fbfb68ef14 add waiting screen anim and toggle 2025-05-27 14:15:23 -04:00
jwinterm eb2bdaa825 update block broadcasting and chat system 2025-05-26 08:47:53 -04:00
jwinterm 32a7201548 ok game is working-ish 2025-05-25 19:03:29 -04:00
jwinterm 1db2fc818c game and display mostly working, using autostart for now to work on lighting (dim explored tiles out of FoV) 2025-05-25 15:10:45 -04:00
jwinterm 0818b60541 refactor backend and fix movement skipping 2025-05-25 10:43:47 -04:00
jwinterm 928af8b071 mostly working basics wow 2025-05-23 20:43:46 -04:00
jwinterm 8c0117ea88 Fix logic and start cleanup refactor 2025-05-23 20:28:49 -04:00
jwinterm 5c6342db6e fix transparency 2025-05-17 06:42:50 -04:00
jwinterm e001f13d12 working game logic pretty much 2025-04-27 21:51:30 -04:00
jwinterm 03cc22ac4c First kinda working version! 2025-04-27 20:08:38 -04:00
jwinterm 823b09e944 Initial AI commit 2025-04-27 09:03:16 -04:00