yurkagon/gravity-defied-web
yurkagon/gravity-defied-web has 39 GitHub stars and 3 forks. Star changes are not measured yet. Last checked 2026-11-13 02:06 UTC. Last push 2026-10-01.
Legendary Gravity Defied game - web browser port
Measured star growth
- in 24h
- Collecting history
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalGravity Defied Web
Gravity Defied is a legendary mototrial racing mobile game. It was originally developed by Codebrew Software in 2004 for J2ME platform.
This is a web browser port of Gravity Defied, written in TypeScript using Vite as the build tool. The project includes all the features of the original game and runs directly in modern web browsers.
🎮 Play online:
https://yurkagon.github.io/gravity-defied-web/

Controls
On a phone or tablet the game shows on-screen buttons: the arrows ride the bike and move through the menus, OK selects, and Menu / Back pauses or goes back.
With a keyboard:
| Key | Action |
|---|---|
| ↑ / ↓ | Accelerate / Brake |
| ← / → | Lean rider backward / forward |
| Enter | Select menu item |
| Escape | Pause game |
Progress
Unlocked tracks and leagues, options and best times are stored in your browser (localStorage). The game saves them every time a track is finished and when the page is closed. Clearing the site data resets the game.
About
This project is a browser-based port of the classic Gravity Defied game. It's built using:
- TypeScript - for type-safe code
- JavaScript - for runtime execution
- Vite - for fast development and building
- HTML5 Canvas - for rendering the game graphics
The project is based on the C++ & SDL2 port: gravity_defied_cpp
Display
On a large screen the bike and the track can look small. Options > Zoom enlarges the game graphics from 1x to 4x. The choice is saved with the other options.
Disclaimer
This Project is not associated with Codebrew Software in any fashion. All rights to the original Gravity Defied, it's name, logotype, brand and all that stuff belong to Codebrew Software.
Getting Started
Prerequisites
- Node.js (v18 or higher recommended)
- npm or yarn
Installation
npm install
Development
Start the development server:
npm run dev
The game will be available at http://localhost:3000
Build
Build the project for production:
npm run build
The built files will be in the dist directory.
Preview
Preview the production build:
npm preview
Project Structure
gravity-defied-web/
├── src/ # Source code
│ ├── app.ts # Main application entry point
│ ├── main.ts # Application initialization
│ └── ... # Game logic, canvas rendering, physics, etc.
├── index.html # HTML entry point
├── vite.config.ts # Vite configuration
└── package.json # Dependencies and scripts
Technologies
- TypeScript - Type-safe JavaScript
- Vite - Next generation frontend tooling
- HTML5 Canvas - 2D graphics rendering
- ESLint - Code linting
Topics
gravity-defied game mototrial racing browser-game typescript vite canvas web-game retro-game j2me-port
Cheats and modding
The built-in cheat name, save editing and modding notes are in HACKING.md.
License
This project is licensed under the GNU General Public License v2.0 (GPL-2.0). See LICENSE.md for the full license text.
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
Contributors
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
459,068 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,732 starsreact/react
The library for web and native user interfaces.
252,565 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,527 stars