Contents
1 Overview
Suncrest Archery is a complete HTML5 first-person 3D archery game. The player holds a bow, draws it, aims through a sight ring and shoots at straw targets on a painted outdoor range. The wind pushes the arrow, so every shot is a small decision: how long to draw, where to aim and when to let go.
It has two modes. The Tournament has 10 stages in 4 biomes: Alpine Morning, Tuscan Autumn, Twilight Lanterns and Snowy Summit. Each stage has its own number of arrows, goal score and wind. The targets are static, swing on a pendulum, glide on a rail or turn on a wheel, and bonuses such as balloons, crystals, a bronze bell and an apple add points. The Endless mode starts with 10 arrows and builds a new wave after every 3 hits, with stronger wind and longer distances, until the arrows run out.
Around the shooting: a perfect-draw window, a streak that turns the arrow golden and then sunfire, a slow-motion arrow camera on the best shots, up to 3 stars at the end of a stage, 14 interface languages, a left-handed option, reduced motion, music and effects volumes, and vibration on phones. It is drawn in real 3D with Three.js, which is included in the download.
2 Installing on your website
Installing takes a few minutes if you have FTP access or a file manager in your hosting panel.
- 1. Extract
suncrest-archery-static-1.0.1.zipon your computer. -
2. Connect to your hosting by FTP or its file manager and open the folder where the game should live, for
example
public_html/games/suncrest-archery/. -
3. Upload only the contents of the
game/folder, so thatindex.htmlsits directly inside the target folder. -
4. Keep
css/,src/,assets/andlib/besideindex.html, with names and letter case unchanged. -
5. Open
https://your-domain.example/games/suncrest-archery/in a modern browser.
source/ folder, the documentation/ folder or the ZIP itself.
Players need no Node.js, PHP, database or account.
3 Requirements
-
Any static web hosting with HTTPS (or HTTP). Opening
index.htmldirectly from the disk (file://) does not work, because browsers block JavaScript modules there. - A current browser with WebGL 2 and its graphics acceleration turned on: Chrome, Edge, Firefox, Safari or Opera, on desktop or mobile. The game draws in 3D.
-
About 6.3 MB of space on the server (124 files). The game makes no request to other websites: the Three.js
library, fonts, pictures, sounds and music are all inside
game/. -
Node.js is only needed to run the tests or to rebuild the game from
source/(see the development section).
4 How to play
Goal: reach the goal score of the stage before the arrows run out. A stage ends as soon as the goal is reached. The rings of a straw target give 100 (X-ring), 60 (bullseye), 40, 25 and 10 points. Bonuses add more: balloons (100), crystals (150), the bronze bell (120) and the apple (40). Hits of 50 points or more build a streak that adds bonus points.
Mouse: move the cursor to look around, press and hold the left button to draw the bow, keep it held and drag to aim, and release to shoot. The right button or Esc cancels the draw. Keys: 1 pauses (in the menu it opens How to play), 2 opens Sound, 3 opens Settings, and Esc closes the open panel or pauses.
Touch: press and hold to draw, drag your finger to aim and lift it to shoot. A Cancel button appears while you draw: lift your finger over it to cancel. The round buttons in the corner open Pause, Sound and Settings.
Timing and wind: the ring around the sight fills while you draw and turns green at 86% of the draw, the perfect draw: the arrow flies a little faster and the bow sways less. The bow stays steady for 7.2 seconds, then it starts to shake. The wind pushes the arrow sideways: the screen shows its strength in m/s and, after a miss, how many centimetres it pushed the arrow, so you can aim a little into it next time. A very short draw (under 22%) is cancelled instead of shot.
5 Screens
Marks on the screenshot
- Logo
- Tournament: 10 stages
- Endless mode
- How to play
- Sound: music and effects volume
- Settings
Marks on the screenshot
- The three steps
- Got it
Marks on the screenshot
- Score and goal
- Wind
- Arrows left
- Pause
Marks on the screenshot
- Result
- Stars
- Score, streak and precision
- Next stage
- Back to the menu
Marks on the screenshot
- Score and goal
- Where the last arrow hit
Marks on the screenshot
- Language
- Arrow camera
- Vibration
- Left-handed
- Reduced motion
- Close
Marks on the screenshot
- Cancel
6 Files and folders
game/ is the ready-to-host game. source/ has the same editable files plus the
tests, a local preview server and the build command. The code is plain JavaScript ES modules with no compile
step and no npm dependency.
game/ - upload these contents to your web host
index.html - the page with every screen
css/ - ui.css (9-slice art frames), screens.css (layout), fx.css (fonts, effects)
src/game.js - START HERE: shooting, wind, scoring, stages; tuning constants at the top
src/levels.js - the 10 stages and the endless wave generator
src/bow.js - the first-person bow, FEEL numbers, the arrow model
src/targets.js - targets (static, pendulum, rail, wheel) and bonuses
src/main.js - starts everything, connects the screens, the HUD and the keyboard
src/settings.js - Sound, Settings and Language panels
src/audio.js - sounds and music
src/world.js, backdrop.js, scenery.js, textures.js - the scene of each biome
src/particles.js, postfx.js - effects and color grade
src/i18n.js - language list and detection
src/locales/ - interface and stage texts, one file per language (14)
assets/ui/ - interface art and icons (WebP)
assets/scene/ - ground, boards and the two sprite atlases (+ their .js rectangles)
assets/sky/ - painted sky, mountains and hills of each biome, clouds
assets/bow3d/ - bow textures
assets/audio/ - sounds and music (MP3)
assets/fonts/ - Fredoka and its license
lib/three/ - the Three.js library (MIT), unminified, and its license
DOCUMENTATION.txt - short note that points to this guide
source/ - the same editable files, plus:
package.json, package-lock.json
README.md, DO-NOT-UPLOAD.txt
tests/ - npm test
tools/build.mjs - copies the game into dist/
tools/serve.mjs - local preview server (npm run dev, npm run preview)
tools/check-node.mjs - checks the Node.js version before the commands
documentation/index.html - this guide (offline, 14 languages)
documentation/customization.html - step-by-step customization guide
documentation/img/ - the screenshots of the guides
DOCUMENTATION.html - shortcut to this guide
CUSTOMIZATION.html - shortcut to the customization guide
START-HERE.txt, CHANGELOG.txt
THIRD-PARTY-LICENSES/ - Three.js and Fredoka licenses
-
src/game.js: the game itself: input, shooting, wind, scoring, stages and the endless mode. The tuning numbers (WIND_ACCEL_FACTOR,STEADY_HOLD,TREMOR_RAMP,ZERO_SPEED,IMPACT) are at the top.src/levels.js: the 10 stages and the endless wave generator. -
src/bow.js: the first-person bow, its feel numbers (FEEL) and the arrow model.src/targets.js: the targets and bonuses.src/particles.jsandsrc/postfx.js: the effects and the color grade of each biome. -
src/main.js: starts everything and connects the screens, the HUD and the keyboard.src/settings.js: the Sound, Settings and Language panels.src/audio.js: sounds and music.src/i18n.jsandsrc/locales/: the languages. -
src/world.js,src/backdrop.js,src/scenery.jsandsrc/textures.js: the scene of each biome (light, fog, sky layers, ground, trees, flags and the painted boards). -
index.html: the page with every screen.css/: the look of the screens (ui.cssdraws the 9-slice art frames,screens.cssthe layout andfx.cssthe fonts and effects). -
assets/:ui/interface art and icons,scene/ground, boards and the two sprite atlases,sky/the painted sky layers,bow3d/the bow textures,audio/sounds and music (MP3),fonts/the font and its license.lib/three/: the Three.js library and its license.
7 Customizing
CUSTOMIZATION.html in the main folder of the download, or
documentation/customization.html.
Brand: the name in the browser tab is the <title> line of index.html. The
logo is assets/ui/logo.webp (1000 x 438 pixels, transparent background) and the page icon is
assets/ui/icons/target.webp. The word painted on the scoreboard in the 3D scene is in
paintScoreboard in src/textures.js.
Pictures: replace a file in assets/ with another WebP of the same name and a similar size. The
sky of each biome is assets/sky/<biome>-sky.webp, -mountains.webp and
-hills.webp (biomes alpine, autumn, twilight and
snow), the clouds are cloud-1.webp to cloud-6.webp, and the interface
art is in assets/ui/.
Stages: src/levels.js. Each stage lists its biome, arrows, goal score and wind, and its targets
and bonuses with their distance, position and motion. Change a number, save, reload the page and play the
stage again.
Difficulty: the goal and the arrows of each stage are in src/levels.js and its wind is
windX. How hard the wind pushes is WIND_ACCEL_FACTOR, how long the bow stays
steady is STEADY_HOLD and how fast the shake grows is TREMOR_RAMP, all at the top
of src/game.js.
Sounds and music
Every sound is an MP3 in assets/audio/ named after the sound, for example
hit-x.mp3. Replace a file and keep its name. The music is assets/audio/music.mp3,
one looping track, and wind.mp3 is the wind loop.
To add a sound, put the file in the folder, add its name to SAMPLES in
src/audio.js and play it from a method of the sound engine with
this._play('name'). npm test checks that every name in SAMPLES has
its file and that no file is left out of the list.
suncrest_ (for
example suncrest_best_campaign and suncrest_lang). If you host more than one
copy of the game on the same domain, they share these values: in one copy, replace
suncrest_ with another prefix in the source files (search for it) and update the key list in
tests/hooks.test.mjs.
8 Languages
The game has 14 languages: English, Portuguese, Spanish, French, German, Italian, Dutch, Polish, Turkish, Russian, Indonesian, Japanese, Korean and Chinese. The first visit uses the browser language; the player can change it in Settings.
To change a text, edit the same key in src/locales/<code>.js. A key missing in another
language falls back to English. The ten stage names and descriptions are the stages list and
the biome names are biomes in each file. To add a language, copy en.js, translate
it, and import it and list it in STRINGS and LANGS in src/i18n.js.
The first visit uses the language of the browser and the player changes it in Settings, where it is
remembered. The included Fredoka font covers the Latin and Latin Extended letters: English, Portuguese,
Spanish, French, German, Italian, Dutch, Polish, Turkish and Indonesian. Russian, Japanese, Korean and
Chinese are shown with the fonts of the device (the page falls back to system-ui, Segoe UI,
Hiragino Sans and Noto Sans), so their look depends on the device.
9 Saving and resetting
- The best scores (tournament and endless), the language, the volumes and the settings are saved automatically in the browser of each player (localStorage). Nothing is sent to a server. The tournament itself is not saved: it always starts at stage 1.
-
Everything is stored under keys that start with
suncrest_:best_campaign,best_endless,seen_help,lang,arrowcam,vibe,lefty,motion,musicandsfx(the oldsuncrest_soundis only read). - To start over, delete these keys in the developer tools (F12), under Application, Local Storage, or clear the site data in the browser.
suncrest_best_campaign
suncrest_best_endless
suncrest_lang
10 Development (optional)
This section is only for changing the code. The game/ folder already contains the finished
game, so installing it needs no Node.js. The game has no npm dependencies and no compile step:
npm run build only copies the files into dist/.
1. Install Node.js. Open https://nodejs.org/en/download and choose the latest Node.js 26 LTS installer for your system (minimum 26.13.0). npm is included.
Windows: run the .msi installer, keep npm and Add to PATH enabled, finish the installation and reopen Command Prompt. macOS: run the official .pkg installer and reopen Terminal. Linux: follow the instructions on the same page for your distribution.
2. Check the installation. Run node --version and npm --version separately. Both
must print a version number, and Node.js must be 26.13.0 or newer. If a command is not found, reopen the
terminal and check that Node.js is in PATH.
node --version
npm --version
3. Extract the complete ZIP first and open its source/ folder, where
package.json is. Windows: type cmd in the address bar of that folder in File Explorer. macOS
and Linux: open Terminal and use cd with the path of the folder.
4. Run the commands below one by one. npm ci checks the lock file (nothing is downloaded, the
project has no dependencies). npm test runs the checks: the 10 stages and the endless
generator, the 14 languages, the list of sounds, the files of the package and the absence of test hooks.
npm ci
npm test
5. Preview: npm run dev starts a local server; open http://localhost:5180/ in your browser,
play for a while, and stop the server with Ctrl+C.
npm run dev
6. Build: npm run build empties source/dist/ and copies index.html,
css/, src/, assets/ and lib/ into it.
dist/ is what you publish; while the source is unchanged it is identical to game/.
npm run build
7. Publish: back up the game on your website, then upload the contents of dist/ in place of the
old files, keeping the folders. If you deleted or renamed a file, delete the old one on the server yourself.
Clear the cache afterwards.
npm test, means Node.js is too old. If PowerShell
blocks npm.ps1, use Command Prompt or run npm.cmd.
11 Updating and clearing the cache
Clearing the cache without losing progress
Progress is stored in this browser, not on the server. Clearing cached images and files, or doing a hard reload, keeps your progress.
Computer: press Ctrl+F5 on Windows and Linux, or Cmd+Shift+R on macOS. Phone: in the browser settings, choose the option to clear cached images and files.
Do not choose cookies and site data, or clear site data, for the game's address. That deletes the local save.
12 Licences and credits
The game code, the artwork, the sound effects and the music are supplied under the license of the item you purchased.
Third-party parts, with their complete license texts in THIRD-PARTY-LICENSES/: the Three.js
library r180, unminified in game/lib/three/ (MIT License), and the Fredoka font (SIL Open Font
License 1.1, also in assets/fonts/).
13 Common problems
-
Blank page or a game that never opens: the game was opened from the disk or a file is missing. Use a web
host and keep every file and folder of
game/next toindex.html. - No sound: browsers start audio only after the first tap, click or key press. Check both volumes in the Sound panel and the volume of the device.
-
A blank page after you edit a stage or a code file: a typo in the file. Open the browser console (F12) to
see the line, and run
npm testbefore publishing. - The game feels slow on an old phone or a computer: turn on the graphics acceleration of the browser, close other tabs and turn on Reduced motion in Settings, which softens the screen shake and the arrow wobble.
- The old version still appears after an update: clear the cache (see the section above). Two copies on the same domain share their saved values: give each copy its own save prefix.
- A black or empty 3D view: the browser has no WebGL 2 or the graphics acceleration is turned off. Turn hardware acceleration on in the browser settings or try another browser.
14 FAQ
Does the game need a database or a server language?
Does it use a game engine?
Can I make my own stages?
src/levels.js (see the Customization Guide), reload the page and play
them. npm test checks that every stage follows the rules the game expects.
Does it work on phones?
Does it have ads, accounts or an online ranking?
Does the game save the tournament?
15 For AI assistants
If you ask an AI assistant to help you change this game, give it the prompt below together with your request. It describes the project so the assistant works on the right files and does not break the rules of the game.
You are helping me change "Suncrest Archery", a finished HTML5 first-person 3D archery game (version 1.0.1). Read these facts before you edit anything.
PROJECT
- Plain JavaScript ES modules, HTML and CSS. No bundler, no compile step, no npm dependencies.
- The 3D drawing uses Three.js r180, unminified, in lib/three/ and imported from src/ with '../lib/three/three.module.js'. Do not upgrade, minify or reformat it.
- The editable project is source/ (the same files as game/, plus tests and tools). Edit source/, never game/ or source/dist/.
- npm run build copies index.html, css/, src/, assets/ and lib/ into source/dist/ and nothing else. Upload the CONTENTS of dist/ (or game/) to a static web host.
- Node.js 26.13.0 or newer is needed only for: npm ci, npm test, npm run dev (http://localhost:5180/), npm run build, npm run preview.
GAME
- First-person archery. Two modes: Tournament (10 stages in 4 biomes: alpine, autumn, twilight, snow) and Endless (waves from generateEndlessWave).
- src/levels.js: CAMPAIGN_STAGES, each with biome, arrows, goalScore, windX, targets (static, pendulum, rail or a wheel) and bonuses (balloon, crystal, bell). An apple can sit on a target (apple: true).
- src/game.js: the constants STEADY_HOLD (7.2 s), TREMOR_RAMP (5.7 s), WIND_ACCEL_FACTOR (0.38), ZERO_SPEED (55) and IMPACT at the top; input, ballistics, scoring (_handleTargetHit: X-ring 100, bullseye 60, great 40, good 25, outer 10), arrows, stages and endless mode.
- src/bow.js: the bow and FEEL. src/targets.js: targets and bonus points. src/main.js: screens, HUD, keyboard, stars (starsFor). src/settings.js: Sound, Settings, Language. src/audio.js: SAMPLES list and sound engine.
- Look of each biome: BIOME_CONFIG in src/world.js and setBiomeStyle in src/postfx.js. Sky layers: assets/sky/<biome>-sky|mountains|hills.webp. Interface art: assets/ui/ drawn as 9-slice frames by css/ui.css.
- Texts: src/locales/<code>.js, 14 languages, same keys in every file (stages and biomes lists included); English is the fallback. New text goes in all 14.
- Saving: localStorage keys start with suncrest_: best_campaign, best_endless, seen_help, lang, arrowcam, vibe, lefty, motion, music, sfx (suncrest_sound is only read).
- Sounds: assets/audio/<name>.mp3 listed in SAMPLES in src/audio.js (music.mp3 is the music loop).
RULES FOR YOU
1. Make the smallest change that does what I ask. Do not rename or move files.
2. Run npm test after every change and fix what it reports. Run npm run build at the end.
3. Test through a web server (npm run dev), never from file://.
4. Add no network request, CDN, analytics, advertising or external font. Keep THIRD-PARTY-LICENSES/, lib/three/LICENSE and assets/fonts/OFL-Fredoka.txt.
5. Keep comments in English and keep the last line of each own JavaScript and CSS file: // End of <path> (complete file).
MY REQUEST:
(write what you want here)
Replace the last line with what you want, for example: make stage 3 easier, change the colors of the autumn
biome or add a new language. Always run npm test after the change.
16 Support
Questions or problems: write to willian@polargames.com.br with your purchase code, the browser
and a short description or screenshot.
Support request
When you write to support, include the browser and device, the game version, the page address, the steps that caused the problem, a screenshot and the first error shown in the browser console. Never send passwords, payment details or secret keys.