Contents
1 Overview
Dirt Dash MX is a motocross racing game with painted art, drawn on a 2D canvas in a 3/4 side view, for landscape and portrait screens. The bike and rider are physics based (suspension on both wheels, spring legs and arms, ragdoll crashes). You race three recorded rivals on four stacked lanes; inside your lane you change between three rows to dodge tire stacks and hay bales. Dodges, close calls and air tricks fill a turbo bar. The Tour has 4 arenas with 6 tracks each (Stadium at night, Countryside, Mud Valley in the rain and Dunes at sunset), each with its own music. A guided first track teaches the controls by playing. Time Trial races your best time as a ghost, and Freestyle is a never-ending run with a best score. Gears collected on the tracks buy 8 bike colors, 8 rider outfits and 4 dust trails in the garage.
This edition has no multiplayer, online ranking, ads or in-app purchases; the rivals are recorded runs, not online players. Progress, stars, gears, garage items and Time Trial ghosts are saved locally in the player's browser only.
This download includes the ready-to-host game, the full editable source (plain HTML, CSS and JavaScript), this guide and the third-party license notices.
START-HERE.txt
DOCUMENTATION.html
CHANGELOG.txt
documentation/index.html
game/
source/
THIRD-PARTY-LICENSES/
2 Install the ready-to-play game
Only the game/ folder needs to be uploaded to play.
- Extract the whole ZIP on your computer.
- Upload the contents of
game/to a folder on static hosting, using FTP or your host's file manager. - Open that folder's URL in a modern browser. The game uses relative paths and can be installed in a subfolder.
- Tap, click or press a key to start; browsers require a user gesture before playing audio. Test on the intended devices.
index.html straight from the disk (file://) is not supported: use a web address or the local server described below.
3 Requirements
- Any static web host able to serve plain files over HTTPS.
- A current desktop or mobile browser with JavaScript enabled.
- Node.js 22.12 or newer (Node 22 LTS), only if you want to run the tests, the local server or the build command from
source/.
No database, backend language or compile step is required to host the ready-to-play game/ folder.
Test on the exact devices and browsers your players will use before launch, especially for touch input.
4 Controls and how the game works
Keyboard: hold SPACE to accelerate, A or Left arrow to brake, W / S or Up / Down arrows to change row, X for an air trick and E (or Shift) to fire the turbo when its bar is full. In the air, D or Right arrow rotates the bike forward (front flip) and A or Left arrow rotates it backward (backflip). Touch: hold GAS on the right and BRAKE on the left, swipe up or down to change row, tap TURBO above GAS, and tap TRICK above BRAKE while in the air. P or Esc pauses, M mutes.
Land with both wheels lined up with the ground for a perfect landing: it gives points, combo and a little speed. Hitting an obstacle in your row is a crash and the rider respawns a moment later on the track. Dodging an obstacle at the last moment, a close call, a slalom of dodges, air tricks and flips fill the turbo bar; when it is full, the turbo gives a short burst of top speed.
A race is won at the finish line against three rivals; finishing in the top three shows a podium. Stars: the first for reaching the finish, the second for reaching the track's score goal, the third for the track's challenge (collect the 3 golden gears, a number of perfect landings, flips or air tricks, a combo, or no sketchy landings). Arenas unlock with stars; clearing every track shows the champion screen.
5 Interface
Six real captures from the shipped build, with numbered marks for the elements mentioned in this guide.
Marks on the screenshot
- Tour: opens the map of the arenas and their tracks
- Freestyle: a never-ending run with a best score
- Garage: bike colors, outfits and dust trails bought with gears
- Sound (music and effects volume) and Settings (vibration, less motion, language, fullscreen)
Marks on the screenshot
- Back to the title screen and the gears you have
- Stars collected out of the total
- The selected track (tap a track to select it, tap again or press Play to start)
- Arrows: the next or the previous arena
Marks on the screenshot
- Position in the race and race time
- Progress to the finish line, with each rider's helmet
- Speedometer (the red marks are turbo speed)
- Turbo button and its bar (E on the keyboard)
Marks on the screenshot
- Tabs: bike colors, outfits and trails
- Preview of the bike and rider with the selected items
- Items: owned, equipped or with their price in gears
Marks on the screenshot
- Stars earned on this track
- The three goals and the result of each one
- Map, retry the track, or the next track
Marks on the screenshot
- Fullscreen (where the browser supports it)
- Vibration and less motion (fewer screen effects)
- Interface language (switched instantly without reloading) and fullscreen
6 Settings and language
The sound button opens separate volumes for music and effects. The gear button opens Settings: vibration (on phones that support it), less motion (fewer screen effects), the interface language and fullscreen (where the browser supports it). Both buttons are on the title screen, on the map and during a race (the race pauses while a panel is open).
The interface ships in 14 languages: English, Portuguese, Spanish, French, German, Italian, Dutch, Polish, Turkish, Russian, Indonesian, Japanese, Korean and Chinese. The first visit follows the browser language.
7 File map
| Path | What it is |
|---|---|
game/index.html
|
Entry point; upload it together with the rest of game/. |
game/assets/
|
Art, music, sound effects and the font used by the game. |
source/src/tour.js
|
Tour data: the 4 arenas and their 6 tracks (seed, length, difficulty, section mix, score goal and star challenge). |
source/src/shop.js
|
Garage items: bike colors, rider outfits and dust trails with their colors and prices. |
source/src/game-1.js … game-4.js
|
The game code: classic scripts loaded in order by source/src/main.js (game-1.js to game-6.js, sharing their names). The painted race scene is in source/src/cena.js and the turbo numbers in source/src/juice.js. |
source/src/i18n.js
|
Interface texts live in source/src/i18n.js: one list of keys and, for each of the 14 languages, the texts in the same order. |
8 Customize
Most numbers are easy to find: the gameplay numbers are in the FEEL object of the game code (search for const FEEL: rows, obstacle gaps, how often rivals crash, air spin speed, landing speed recovery), and the turbo numbers are in source/src/juice.js (JF). The rivals of each track are recorded runs in source/assets/rivals/; if you change a track's layout, record them again so they match.
// source/src/game-1.js (search for: const G_)
const G_ = 1500,
STEP = 1 / 300,
COMBO_T = 3.2;
const VMAX = 800; // top speed (KS = 235 is the suspension spring).
Replace art or sounds with files of the same name and similar proportions. Keep the bundled font license notice if you keep using the bundled font.
9 Languages
The interface ships in 14 languages: English, Portuguese, Spanish, French, German, Italian, Dutch, Polish, Turkish, Russian, Indonesian, Japanese, Korean and Chinese. The first visit follows the browser language.
Interface texts live in source/src/i18n.js: one list of keys and, for each of the 14 languages, the texts in the same order.
10 Saved progress
Tour progress, stars, gears and garage items are saved automatically to the browser's local storage under the key dirt-dash-mx.template.save.v1, settings under dirt-dash-mx.template.settings.v1, the Freestyle best under dirt-dash-mx.template.best.v1 and Time Trial ghosts under keys that start with dirt-dash-mx.template.ghost.v1..
- Clearing the browser's site data for the game's address deletes this save.
- There is no cloud save or account; progress does not transfer between devices or browsers.
Uploading a new build over an existing install keeps the saved progress, because the save keys stay the same.
11 Install Node.js and use the source
Only if you want to run the tests, play the source on your computer or rebuild game/. The game itself needs no Node.js.
- Install Node.js 22 LTS (22.12 or newer) from nodejs.org (Windows and macOS: the installer; Linux: your package manager or the official binaries).
- Open a new terminal (Windows: PowerShell or Command Prompt) and check the versions with
node -vandnpm -v. - Go to the extracted
source/folder, the one withpackage.json, for example withcd path/to/source. - Run
npm ci(it checkspackage-lock.json; the project has no dependencies), thennpm test. - Run
npm run devand open http://localhost:5281/ to play the source. Add?devtestto the address to unlock every track and buy garage items for free while testing. - Run
npm run build: the ready-to-host copy is written tosource/dist/. Upload the contents ofdist/exactly likegame/.
npm ci
npm test
npm run dev
npm run build
node or npm not found (reinstall Node.js and open a new terminal so the PATH is updated); on Windows, npm.ps1 cannot be loaded (use Command Prompt or run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned in PowerShell); EBADENGINE or a version message (install the current LTS); ENOENT (you are not in the folder with package.json).
12 Updates and cache
Uploading a new build over an existing install keeps the saved progress, because the save keys stay the same.
Re-upload the full contents of game/ (or dist/ after a build), overwriting the previous files.
An old version shown in a browser tab after updating is almost always a caching issue, not a failed upload.
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.
13 Troubleshooting
- Blank page: check the browser console for a failed file, and confirm every file from
game/was uploaded, includinggame/src/andgame/assets/. - No sound: audio starts only after a tap, click or key, by browser policy; check the music and effects volumes in Settings and the sound button.
- Touch feels off: confirm the page is not zoomed and that no parent page or container blocks touch events when the game is embedded.
Audio needs at least one user gesture (tap, click or key press) before it can play; this is a browser requirement, not a bug in the game.
14 Frequently asked questions
Can I resell this template as-is?
Does the game need a server or database?
game/ folder is static files; progress is saved in the player's browser.Can I change the rider, the tracks or the garage?
source/src/shop.js, tracks and stars in source/src/tour.js, texts in source/src/i18n.js, and the painted art in source/assets/img/ (the race art of each arena is in source/assets/img/corrida/).15 Support and licenses
The font license is included in THIRD-PARTY-LICENSES/ and in licenses/ inside game/ and source/.
For product support, write to the address below.
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.
For AI assistants
- Read the installation and customize sections before changing anything. Upload only
game/(ordist/) to a host;source/is the editable project. - Preserve progress: keep the save keys, the relative paths and the translated texts unless the buyer asks for a change. New text keys go at the end of the list, in all 14 languages.
- Do not assume an account system, a server, ads or payments. This edition has none, and the code is the source of truth.