CannonSmash-Web

indigodaddy1 pts0 comments

GitHub - jgbrwn/cannonsmash-web: A browser-based, mobile-first remake of CannonSmash (the classic open-source 3D table tennis game), true to the original's physics and assisted-control feel, rebuilt around touch. · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

jgbrwn

cannonsmash-web

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>52 Commits<br>52 Commits

docs

docs

src

src

test

test

.gitignore

.gitignore

LICENSE

LICENSE

NOTICE

NOTICE

README.md

README.md

index.html

index.html

package-lock.json

package-lock.json

package.json

package.json

tsconfig.json

tsconfig.json

vite.config.ts

vite.config.ts

View all files

Repository files navigation

CannonSmash Web

A browser-based, mobile-first remake of CannonSmash<br>(the classic open-source 3D table tennis game), true to the original's physics<br>and assisted-control feel, rebuilt around touch.

Play: https://cannonsmash.exe.xyz/

Controls (touch / mouse)

Gesture<br>Action

Drag left/right<br>Move your player/paddle laterally (finger = paddle)

Flick up<br>Swing. Flick angle aims left/right, flick speed & length = power, upward flick = topspin drive

Flick down<br>Backspin push

Flick (on your serve)<br>Toss + serve

✕ (top center)<br>Quit match, back to menu

Tap (after match)<br>Return to menu

The ball must actually be within paddle reach when it arrives — if you're out<br>of position, you whiff. When you're not dragging, a positioning assist drifts<br>you toward the predicted contact point (the original game also auto-positioned<br>during the backswing); the assist gets slower on higher difficulties, so<br>manual positioning matters more.

Rules

11-point games, deuce (win by 2), serve rotation every 2 points (every point at<br>deuce), best of 3 games.

Development

npm install<br>npm run dev # vite dev server on :8000<br>npm run build # production build to dist/<br>npm run typecheck<br>npx tsx test/sim.ts # headless full-match simulation<br>npx tsx test/human.ts # sloppy-human sim across all difficulties

Deployed as a static build served by nginx with gzip compression and<br>aggressive caching (immutable cache headers for content-hashed assets,<br>short-lived cache for HTML). After building:

npm run build<br>sudo systemctl restart cannonsmash # syncs build to nginx serve dir (rsync)

See cannonsmash.service for the deployment process and the nginx config at<br>/etc/nginx/sites-available/cannonsmash for server tuning.

See docs/DESIGN.md for architecture, physics notes, tuning<br>rationale, and the project plan/history.

License

This project is licensed under the GNU General Public License v2 .<br>See LICENSE for full terms.

See NOTICE for attribution of the original CannonSmash game,<br>three.js, and other third-party dependencies.

About

A browser-based, mobile-first remake of CannonSmash (the classic open-source 3D table tennis game), true to the original's physics and assisted-control feel, rebuilt around touch.

cannonsmash.exe.xyz

Resources

Readme

License

GPL-2.0 license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

star

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

TypeScript<br>91.2%

CSS<br>5.5%

HTML<br>3.3%

You can’t perform that action at this time.

cannonsmash license reload json flick game

Related Articles