From 0f56d3c7bb799fd33fc921d8fa08780d13cfec59 Mon Sep 17 00:00:00 2001 From: martbost Date: Mon, 12 Oct 2026 09:41:35 -0500 Subject: [PATCH] PolyWarriors launch trailer: Promo tools game card (player, 16:9 + vertical downloads, poster, caption, share) and the public games card plays it; poster replaces the coming-soon art Co-Authored-By: Claude Fable 5.1 --- public/assets/games-page.js | 3 ++- public/assets/promo.js | 10 ++++++++++ public/games.html | 2 +- public/my.html | 3 ++- server.js | 4 ++-- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/public/assets/games-page.js b/public/assets/games-page.js index 1c8b4db..929280e 100644 --- a/public/assets/games-page.js +++ b/public/assets/games-page.js @@ -10,7 +10,8 @@ var ribbon = g.season ? 'Limited time · ends ' + esc(g.season.ends) + '' : soon ? '' + esc(g.opens) + '' : ''; var play = g.live && g.open ? 'Play' : '' + esc(g.opens || 'Opens soon') + ''; var site = g.host ? '' + esc(g.host) + '' : ''; - return '
' + (g.art ? '' : '') + ribbon + '
' + + var art = g.video ? '' : (g.art ? '' : ''); + return '
' + art + ribbon + '
' + '
' + esc(g.tag || '') + '

' + esc(g.name) + '

' + esc(g.blurb || '') + '

' + (g.pays ? '
Pays: ' + esc(g.pays) + '
' : '') + '
' + play + site + '
'; diff --git a/public/assets/promo.js b/public/assets/promo.js index 7d8a927..1766e8e 100644 --- a/public/assets/promo.js +++ b/public/assets/promo.js @@ -289,6 +289,9 @@ window.IAPPromo = (function () { { name: 'Friendly post', text: 'If you like small games that actually pay something, this is the page I send people. Eight games, all free, all paying POL on Polygon for first clears, levels and daily puzzles. Pick one: {L}' }, { name: 'Telegram or WhatsApp line', text: 'All the games that pay POL, one page, free to play: {L}' }] }, { slug: 'polywarriors', name: 'PolyWarriors', link: 'https://www.polywarriors.com/?ref=', img: 'https://www.polywarriors.com/og-polywarriors.jpg', sub: 'cyberpunk battler with NFT warrior cards', + // launch trailer (2026-10-12, Marty approved): 16:9 + 9:16 cuts and a poster on Spaces; the caption carries the member's link + video: { base: 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/promo/', file: 'polywarriors-trailer.mp4', portrait: 'polywarriors-trailer-portrait.mp4', poster: 'polywarriors-trailer.jpg', best: 'landscape for Facebook, X and YouTube; vertical for Shorts, Reels and TikTok', + cap: 'PolyWarriors just opened: a free cyberpunk fighting game. Recruit warriors born with their own traits and rarity, beat 24 arena rivals, duel other members. First wins pay Polygon to your wallet and your first warrior mints free as an NFT. {L} #PolyWarriors #Polygon #NFT #gaming' }, posts: [ { name: 'Short post', text: 'PolyWarriors is a free cyberpunk battler. Recruit warriors that are each born with their own traits and rarity, fight through 24 arena rivals, and challenge other members in duels that play out while you are away. Your first win over each rival pays Polygon to the wallet on your InstantAdPay account, and your first warrior mints to your wallet as an NFT, free. {L}' }, { name: 'Friendly post', text: 'I have been playing PolyWarriors, a turn-based fighting game with a cyberpunk look. Every warrior is one of a kind, you can mint yours, fuse three of a kind into something rarer, and battle other members. Free to play, and it pays Polygon for first wins: {L}' }, @@ -336,6 +339,13 @@ window.IAPPromo = (function () { [linkBtn('https://x.com/intent/tweet?text=' + enc(posts[0].text), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(link), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(hook), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(posts[0].text), 'WhatsApp')].forEach(b => sh.appendChild(b)); const gi = $('gmImg'); gi.hidden = true; gi.onload = () => { if (gi.dataset.want === g.img) gi.hidden = false; }; gi.onerror = () => { gi.hidden = true; }; gi.dataset.want = g.img; gi.src = g.img; // hidden until the new game's image loads (no stale picture) $('gmImg').alt = g.name; $('gmImgOpen').href = g.img; $('gmImgCopy').onclick = async () => { try { await navigator.clipboard.writeText(g.img); status('Image URL copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } }; + const gv = $('gmVideo'); if (gv) { gv.innerHTML = ''; gv.hidden = !g.video; + if (g.video) { const v = g.video, cap = v.cap.replace('{L}', link); const d = document.createElement('div'); d.className = 'promo-block'; + d.innerHTML = '
Trailer Best on: ' + esc(v.best) + '
' + esc(cap) + '
'; + const row = document.createElement('div'); row.className = 'pb-actions'; + row.appendChild(linkBtn(v.base + v.file, 'Download 16:9')); if (v.portrait) row.appendChild(linkBtn(v.base + v.portrait, 'Download vertical')); row.appendChild(linkBtn(v.base + v.poster, 'Poster image')); row.appendChild(copyBtn(cap, 'Copy caption')); + [linkBtn('https://x.com/intent/tweet?text=' + enc(cap), 'X'), linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(link), 'Facebook'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(cap.replace(link, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(cap), 'WhatsApp')].forEach(b => row.appendChild(b)); + d.appendChild(row); gv.appendChild(d); } } const pp = $('gmPosts'); pp.innerHTML = ''; for (const p of posts) pp.appendChild(block(p.text, '' + esc(p.name) + '', [linkBtn('https://x.com/intent/tweet?text=' + enc(p.text), 'X'), linkBtn('https://t.me/share/url?url=' + enc(link) + '&text=' + enc(p.text.replace(link, '').trim()), 'Telegram'), linkBtn('https://wa.me/?text=' + enc(p.text), 'WhatsApp')])); } diff --git a/public/games.html b/public/games.html index e2a9abb..d28f86e 100644 --- a/public/games.html +++ b/public/games.html @@ -78,6 +78,6 @@
Advertising services with a performance referral program. Not an investment product; no income guarantees.
- + diff --git a/public/my.html b/public/my.html index 487dea1..4aaf383 100644 --- a/public/my.html +++ b/public/my.html @@ -790,6 +790,7 @@
Share image 1200×630, for posts and link previews
Open image
+

Posts

your link is already in them
@@ -1150,7 +1151,7 @@ - + diff --git a/server.js b/server.js index 906a7ba..87fb0e4 100644 --- a/server.js +++ b/server.js @@ -1567,7 +1567,7 @@ function GAMES() { art: SW_URL() + '/og-spellwheel.jpg?v=1', play: '/api/my/spellwheel', pays: 'POL for levels, chapters and daily puzzles', soon: { opens: '2026-10-10', label: 'Opens Saturday, Oct 10' } }, // PolyWarriors (Marty 2026-10-05: "put Poly Warriors there as well, saying that it's coming next Monday") { slug: 'polywarriors', name: 'PolyWarriors', tag: 'Cyberpunk fighting', blurb: 'Turn-based fights with collectible low-poly warriors. Recruit fighters born with rare traits, climb the arena, challenge other members, and mint your warriors as NFTs.', - art: '/assets/games/polywarriors-soon.jpg?v=1', play: '/api/my/polywarriors', pays: 'POL for first wins over arena rivals', soon: { opens: '2026-10-12', label: 'Opens Monday, Oct 12' } }, + art: 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/promo/polywarriors-trailer.jpg', video: 'https://coolify-saasytop.nyc3.digitaloceanspaces.com/promo/polywarriors-trailer.mp4', play: '/api/my/polywarriors', pays: 'POL for first wins over arena rivals', soon: { opens: '2026-10-12', label: 'Opens Monday, Oct 12' } }, // live 10-12: trailer poster + 16:9 trailer on the public games page ]); } // each game's member perk (the $5 welcome offer, 2026-10-05) shown on its card @@ -3454,7 +3454,7 @@ const server = http.createServer(async (req, res) => { const soon = !!(g.soon && day < g.soon.opens), preSeason = !!(g.season && day < g.season.start); const isLive = !soon && !preSeason && live.has(g.slug); if (!isLive && !soon && !preSeason) continue; // not live and no date: not announced yet - out.push({ slug: g.slug, name: g.name, tag: g.tag, blurb: g.blurb, pays: g.pays, art: /^https?:/.test(g.art) ? g.art : 'https://instantadpay.com' + g.art, artPos: g.artPos || 'center', live: isLive, + out.push({ slug: g.slug, name: g.name, tag: g.tag, blurb: g.blurb, pays: g.pays, art: /^https?:/.test(g.art) ? g.art : 'https://instantadpay.com' + g.art, artPos: g.artPos || 'center', live: isLive, video: isLive && g.video ? g.video : null, opens: soon ? g.soon.label : preSeason ? 'Opens ' + lbl(g.season.start) : null, season: g.season && isLive ? { ends: lbl(g.season.end, true) } : null, open: S[g.slug] ? S[g.slug].open : null, host: S[g.slug] ? S[g.slug].host : null }); } return json(res, 200, { games: out }, { 'Access-Control-Allow-Origin': '*', 'Cache-Control': 'public, max-age=300' });