Polar Games · VERSION 1.1.0

Velvet Pool

1. Overview

  • 8-ball rules with fouls, ball-in-hand and solids/stripes
  • Easy, Medium and Hard CPU opponents
  • Practice table with undo, ball placement and re-rack
  • Two players on the same device
  • Cue-ball spin, five cloth colors and five cue styles
  • Local achievements, statistics and personal scores

Vanilla JavaScript + WebGL2
14 languages: English, Português (Brasil), Español, Français, Deutsch, Italiano, Nederlands, Polski, Türkçe, Русский, Bahasa Indonesia, 日本語, 한국어, 简体中文

2. Quick installation

  1. Extract the ZIP on your computer.
  2. Connect to your website with any FTP program (FileZilla, for example) or your host's File Manager.
  3. Upload everything inside the game/ folder to a folder on your site, for example public_html/velvet-pool/. Keep all subfolders as they are.
  4. Open that address in your browser (for example https://yoursite.com/velvet-pool/). The game starts.

That is all: no npm, no terminal, no build step, no PHP, no database and no account. Do not open index.html by double-clicking it (browsers block game modules on file://); use your website address, or the optional local test below.

Optional local test: open a terminal inside game/ and run python -m http.server 8765, then visit http://localhost:8765/.

3. Requirements and audio

Use a modern browser with JavaScript, ES modules and WebGL2. Enable hardware acceleration for 3D games. The first user gesture unlocks audio; browsers may block autoplay. Use HTTPS for public hosting. In an iframe, allow fullscreen and autoplay when needed.

4. Controls

Move the mouse to aim, click to lock the line, then drag down and release to shoot. Right-click releases the aim; the mouse wheel fine-tunes it. On touch, aim on the table and pull the power control. The Spin button controls follow, draw and side spin.

5. Interface guide

Main menu: modes and navigation
Main menu: modes and navigation
Actual gameplay: play area and HUD
Actual gameplay: play area and HUD
Settings: language, sound and game options
Settings: language, sound and game options

6. File map

Everything is in four folders: game/ (publish this), source/ (developer edition), documentation/ (this guide and its images) and THIRD-PARTY-LICENSES/. Paths in the table are relative to source/ or game/, which share the same layout.

Path Purpose
game/ Ready-to-upload edition: the only folder you publish
source/ Same game as editable developer edition (plus README, package.json and tests)
THIRD-PARTY-LICENSES/ Font license texts and a README.txt summary
src/core/physics.js Ball simulation, spin and cushion response
src/core/rules.js 8-ball rules and foul decisions
src/core/ai.js CPU shot selection
src/game/controls.js Aiming, power and spin input
src/game/progress.js Achievements, cloths, cues and match scoring
src/game/i18n.js Text in 14 languages (list in LANGS)
src/game/localRecords.js Local score history
src/game/audio.js Sound effects and music playback
css/style.css · css/fonts.css Theme, responsive layout and font declarations
assets/ Art, audio (music, sfx, voice) and fonts with their OFL licenses

7. Customization

Edit cloth and cue definitions in progress.js. Keep stable IDs for saved cosmetics. Tune CPU decisions in ai.js and physical parameters in physics.js independently; verify the 8-ball tests after changing rules or physics. Replace branding in assets/logo/ and adjust the matching dimensions in CSS.

Back up before editing. Change one feature at a time and test menu, gameplay, pause, result and reload. Keep item IDs and save keys stable to preserve existing players.

8. Optional developer workflow

This edition uses static JavaScript modules. No build step and no npm install are required to play or edit it. Edit the files in source/, then copy the changed files to game/ (the folder structure is identical). Serve the folder over HTTP, for example with python -m http.server 8765.

The code in source/src and game/src is plain, formatted JavaScript (no minified or bundled files).

Optional automated checks: with Node.js 20 or newer, open a terminal inside source/ and run npm test (the same as node tests/run.js). No dependency installation is needed. The suite checks physics, 8-ball rules, CPU matches and translation-key consistency. It does not replace browser, device and audio testing.

9. Saves and local records

Completed eligible CPU matches save a personal score locally. Practice and same-device matches do not submit ranking records. Match statistics and cosmetics remain on this browser. Changing the nickname does not create an online account.

Storage belongs to the browser origin (protocol, host and port). Changing domains does not transfer saves. Clearing data or private browsing can remove progress. Back up storage before migrating. This edition uses its own keys, separate from portal editions.

10. Third-party libraries and licenses

Velvet Pool is plain JavaScript with WebGL2: it does not use Three.js or any other code library, so there is no library folder. Everything the game needs at run time is inside game/ (code, fonts, art and audio). Nothing is downloaded from a CDN or another site, and no account or service is required. A fresh page load still needs access to your HTTP host, so this is not an installable offline app.

Component Version License Folder Project
Manrope (web font) variable, latin SIL OFL 1.1 assets/fonts/ github.com/googlefonts/manrope
Fraunces (web font) variable, latin SIL OFL 1.1 assets/fonts/ github.com/undercasetype/Fraunces

The full license text of each font is in THIRD-PARTY-LICENSES/ (see its README.txt) and next to the fonts in assets/fonts/. Keep these notices with your end product.

Multiplayer servers, online leaderboards, ad SDKs, native-app projects and internal editors are not included. Use the included assets as part of your licensed end product under the marketplace terms; do not resell them separately.

11. Troubleshooting and FAQ

Blank screen

Check that you opened the page over HTTP(S), that WebGL2 is enabled, and that paths keep their exact upper/lower case. Read the browser console.

“Module refused” or MIME error

Your server must send .js files with a JavaScript MIME type and .wasm as application/wasm. Do not serve modules as text/plain.

No audio

Tap or click the game first (browsers block autoplay), then check volume and browser permissions.

Saved progress disappeared

Progress belongs to the browser origin: check domain, port, private mode and cleared site data.

Can I add multiplayer?

It needs your own development and server; it is not part of this edition.

Will it run on any phone?

Controls adapt to the screen size; performance depends on the browser and hardware, so test your target devices.

12. Support and updates

Support and custom development: willian@polargames.com.br. Include version, URL, browser, reproduction steps and a screenshot. Support follows the marketplace item terms. Updates are distributed through your purchase channel; read the changelog before replacing files and preserve saves. This guide does not promise a fixed response time or new features on specific dates.

1. Visão geral

  • Regras de bola 8, faltas e bola na mão
  • CPU Fácil, Médio e Difícil
  • Treino com desfazer, mover bolas e remontar mesa
  • Dois jogadores no mesmo aparelho
  • Efeitos na branca, cinco panos e cinco tacos
  • Conquistas, estatísticas e pontuação local

Vanilla JavaScript + WebGL2
14 idiomas: English, Português (Brasil), Español, Français, Deutsch, Italiano, Nederlands, Polski, Türkçe, Русский, Bahasa Indonesia, 日本語, 한국어, 简体中文

2. Instalação rápida

  1. Extraia o ZIP no seu computador.
  2. Conecte-se ao seu site por qualquer programa de FTP (como o FileZilla) ou pelo Gerenciador de Arquivos da hospedagem.
  3. Envie tudo o que está dentro da pasta game/ para uma pasta do seu site, por exemplo public_html/velvet-pool/. Mantenha todas as subpastas como estão.
  4. Abra esse endereço no navegador (por exemplo https://seusite.com/velvet-pool/). O jogo inicia.

É só isso: sem npm, sem terminal, sem build, sem PHP, sem banco de dados e sem conta. Não abra o index.html com duplo clique (os navegadores bloqueiam módulos em file://); use o endereço do seu site ou o teste local opcional abaixo.

Teste local opcional: abra um terminal dentro de game/ e execute python -m http.server 8765; depois acesse http://localhost:8765/.

3. Requisitos e áudio

Use navegador moderno com JavaScript, módulos ES e WebGL2. Habilite aceleração de hardware para os jogos 3D. O primeiro toque libera o áudio; autoplay pode ser bloqueado pelo navegador. Use HTTPS para hospedar publicamente. Em iframe, permita fullscreen e autoplay quando necessário.

4. Controles

Mova o mouse para mirar, clique para travar, arraste para baixo e solte para bater. O botão direito destrava a mira e a roda ajusta o ângulo. No toque, mire na mesa e puxe a força. O botão Spin ajusta o efeito da bola branca.

5. Guia visual da interface

Menu principal: modos e navegação
Menu principal: modos e navegação
Jogo real: área de jogo e indicadores
Jogo real: área de jogo e indicadores
Configurações: idioma, som e opções
Configurações: idioma, som e opções

6. Mapa de arquivos

Tudo fica em quatro pastas: game/ (é a que você publica), source/ (edição de desenvolvimento), documentation/ (este guia e as imagens) e THIRD-PARTY-LICENSES/. Os caminhos da tabela são relativos a source/ ou game/, que têm a mesma estrutura.

Caminho Função
game/ Edição pronta para publicar: a única pasta que você envia
source/ Mesmo jogo como edição de desenvolvimento (com README, package.json e testes)
THIRD-PARTY-LICENSES/ Textos de licença das fontes e resumo em README.txt
src/core/physics.js Simulação das bolas, efeito e tabelas
src/core/rules.js Regras de bola 8 e decisões de falta
src/core/ai.js Escolha de tacadas da CPU
src/game/controls.js Controle de mira, força e efeito
src/game/progress.js Conquistas, panos, tacos e pontuação
src/game/i18n.js Textos em 14 idiomas (lista em LANGS)
src/game/localRecords.js Histórico local de pontuação
src/game/audio.js Efeitos sonoros e reprodução de música
css/style.css · css/fonts.css Tema, layout responsivo e declaração das fontes
assets/ Arte, áudio (música, efeitos, voz) e fontes com licenças OFL

7. Personalização

Edite panos e tacos em progress.js e preserve seus IDs. Ajuste as decisões da CPU em ai.js e a física em physics.js separadamente. Após mudar física ou regras, execute os testes de bola 8. Troque a marca em assets/logo/ e ajuste as dimensões correspondentes no CSS.

Faça backup antes de editar. Altere um recurso por vez e teste menu, partida, pausa, resultado e recarregamento. IDs de itens e chaves de save devem permanecer estáveis para preservar jogadores existentes.

8. Desenvolvimento opcional

Esta edição usa módulos JavaScript estáticos. Não há etapa de build nem é necessário npm install para jogar ou editar. Edite os arquivos em source/ e copie os alterados para game/ (a estrutura de pastas é idêntica). Sirva a pasta por HTTP, por exemplo com python -m http.server 8765.

O código em source/src e game/src é JavaScript simples e formatado (sem arquivos minificados ou empacotados).

Testes automatizados opcionais: com Node.js 20 ou mais novo, abra um terminal dentro de source/ e execute npm test (o mesmo que node tests/run.js). Não é preciso instalar dependências. A suíte verifica física, regras de bola 8, partidas da CPU e consistência das traduções. Ela não substitui testes de navegador, aparelho e áudio.

9. Saves e recordes locais

Partidas elegíveis concluídas contra a CPU salvam pontuação local. Treino e dois jogadores locais não geram recorde no ranking. Estatísticas e cosméticos ficam neste navegador. Trocar apelido não cria conta online.

Os dados pertencem à origem do navegador (protocolo, host e porta). Trocar domínio não transfere saves. Limpar dados ou usar navegação privada pode apagar o progresso. Faça backup do armazenamento antes de migrar. A edição usa chaves próprias, separadas das versões de portal.

10. Bibliotecas de terceiros e licenças

O Velvet Pool é JavaScript puro com WebGL2: não usa Three.js nem outra biblioteca de código, então não existe pasta de bibliotecas. Tudo o que o jogo precisa para rodar está dentro de game/ (código, fontes, arte e áudio). Nada é baixado de CDN ou de outro site e não é preciso conta nem serviço externo. Cada carregamento da página ainda precisa acessar o seu servidor HTTP; não é um aplicativo offline instalável.

Componente Versão Licença Pasta Projeto
Manrope (web font) variable, latin SIL OFL 1.1 assets/fonts/ github.com/googlefonts/manrope
Fraunces (web font) variable, latin SIL OFL 1.1 assets/fonts/ github.com/undercasetype/Fraunces

O texto completo da licença de cada fonte está em THIRD-PARTY-LICENSES/ (veja o README.txt) e ao lado das fontes em assets/fonts/. Mantenha esses avisos no seu produto final.

Servidor multiplayer, ranking online, SDKs de anúncios, projetos nativos e editores internos não estão incluídos. Use os recursos incluídos como parte do seu produto final licenciado, conforme os termos do marketplace; não os revenda isoladamente.

11. Solução de problemas e FAQ

Tela vazia

Confirme que abriu por HTTP(S), que o WebGL2 está ativo e que os caminhos respeitam maiúsculas e minúsculas. Leia o console do navegador.

“Module refused” ou erro de MIME

O servidor deve enviar .js com MIME de JavaScript e .wasm como application/wasm. Não sirva módulos como text/plain.

Sem áudio

Toque ou clique no jogo primeiro (navegadores bloqueiam autoplay) e confira volume e permissões do navegador.

O progresso salvo sumiu

O progresso pertence à origem do navegador: confira domínio, porta, modo privado e limpeza de dados.

Posso adicionar multiplayer?

Requer desenvolvimento e servidor próprios; não faz parte desta edição.

Funciona em qualquer celular?

Os controles se adaptam à tela; o desempenho depende do navegador e do hardware, então teste seus aparelhos alvo.

12. Suporte e atualizações

Suporte e desenvolvimento personalizado: willian@polargames.com.br. Envie versão, URL, navegador, passos para reproduzir e captura. O suporte segue os termos do item no marketplace. Atualizações são distribuídas pelo canal da compra; confira o changelog antes de substituir arquivos e preserve saves. Esta documentação não promete prazo fixo de atendimento ou novos recursos em datas específicas.