Sim Clash Download

Contribute

Build a hole. Fix a bug.

Sim Clash is open source under the MIT licence. The stages are plain JavaScript files that describe a piece of ground, so a new hole is something you can write in an evening and playtest without a launch monitor. Not a programmer? Make it yours shows how to get an AI coding assistant to do the typing.

Where everything is

The code is on GitHub at the Sim Clash repository. Bugs and ideas go in Issues; changes come in as pull requests.

PathWhat lives there
lib/match.jsThe match rules as a pure state machine: formats, knockout, sudden death, the stroke cap, undo. Described in docs/match.md.
lib/arcade.jsThe balls and tricks, shot grading, callouts, points and streaks. Described in docs/arcade.md.
lib/physics.jsBall flight, bounce, roll and the cup.
lib/openconnect.jsThe GSPro Open Connect listener that launch monitors talk to.
tools/arcade-holes/The stages: one file per hole in holes/, plus the builder. Described in docs/arcade-holes.md.
public/arcade/The game's screens and HUD, the 3D props, the announcer and the sound effects.
public/render/The 3D renderer (three.js): terrain, water, the themed looks, each stage's sky and far horizon, the stadium and its crowd, the trees, the ball camera. Described in docs/arcade-look.md.
lib/launch-monitors.jsonThe launch-monitor catalogue: every unit, its tier, its connector, its steps and the source of each claim. The game's wizard, the documentation and this site's Connect page are generated from it.
lib/foresight-bridge.jsThe built-in bridge for Foresight GC units. Described in docs/foresight-bridge.md.
test/The tests. npm test runs all of them.
site/This website. site/README.md says how it is put together and checked.

Run it for development

You need Node.js 22 or newer.

git clone (the repository address, from its GitHub page)
cd sim-clash
npm install
npm start
npm test

You do not need a launch monitor to work on the game. The TEST SWING button (key T) plays a shot without one, its SLIDERS take any numbers you like, and a running game accepts the same thing over HTTP, which is how the tests and the playtest scripts hit balls:

POST http://localhost:8222/api/test-shot
{ "speed": 150, "vla": 13, "hla": 0, "spin": 2600, "spinAxis": 0 }

That is a 150 mph drive launched at 13 degrees with 2,600 rpm. npm run start:server runs the game without the desktop window, for a browser at http://localhost:8222.

How the holes are authored

The holes exist nowhere on Earth: they are written by hand. Each one is a JavaScript file in tools/arcade-holes/holes/ that describes a piece of ground, and the builder turns it into the same course file format the engine already loads. One hole is one stage: its own world, theme, sky and wind.

A hole file exports:

ExportWhat it is
id, extentThe file's name, and the rectangle of ground the hole covers.
stageThe card: name, a number no stage has used before, its place in the tour, theme, time of day, a blurb under 90 characters, difficulty 1 to 3, an optional wind range, and freeBall for a rocket hole.
holePar, name, notes and the line of play, starting at the tee.
height(x, y)The ground: a function that returns the height in metres at any point. Cliffs, craters and islands are all just this function.
surfaces, trees, propsFairway, green, sand and water shapes; trees; and the props that carry the theme (lighthouses, pyramids, castles, crowds, blimps: over fifty kinds are modelled).
obLine, seaWhere a ball is out of bounds, and whether the hole sits in a sea.
probesSpots that must come out as a given surface, checked by the builder so a redesign cannot quietly drown the tee.

The themes are tropical, canyon, links, volcano, alpine, sakura, jungle, desert, neon and stadium. A theme sets the colours, the sky and what the water is: on a volcano stage it is lava.

node tools/arcade-holes/build.mjs              # build every stage and the tour list
node tools/arcade-holes/build.mjs --check      # validate only, write nothing
node tools/arcade-holes/preview.mjs            # top-down PNG maps of every hole

Add a stage

  1. Copy a hole in tools/arcade-holes/holes/ to holes/<your-id>.js. A par 3 such as lagoon-island.js is the easiest start. Give its stage a number that has never been used: it is the stage's identity for good.

  2. Shape the ground. Write height(x, y), lay out the surfaces, and place props. Give it a safe route and a hero route; a third route that needs a Rocket ball is the house style.

  3. Look at the map and validate it:

    node tools/arcade-holes/preview.mjs --only <your-id>
    node tools/arcade-holes/build.mjs --check --only <your-id>

    The builder names what is wrong: a green that is too steep, water above the ground beside it, a prop on the line of play.

  4. Playtest it. Build it, start the game, pick your stage (Practice > Free play, or a quick match) and fire test swings or /api/test-shot swings: a stock drive, a weak one, a slice, a Rocket. Check that a bad shot costs a stroke, not the hole.

  5. Add its tests. The catalogue test already checks every stage in general (it builds, validates, has a unique number, a green of the right size, known props). Add a test file for what is particular to yours: the carries, the routes, where a ball must stay dry.

  6. Open a pull request with a screenshot or two. If the stage gallery on this site should show it, node site/dev/refresh.mjs rewrites the cards from the game's own data.

Design rules for a hole

The stages are built for real swings by average golfers, two of them, in a hurry. The rules the existing ones follow:

  • Greens at least 28 by 24 metres (sudden-death greens 34 metres and more across), on a slope under 3 %.
  • Fairways 40 metres and wider where drives land.
  • A safe line and a hero line on every hole.
  • Hazards you can see from the tee, that cost a stroke rather than a lost ball.
  • Out of bounds far enough away that a reasonable miss never finds it.
  • Plenty of props: they are what makes a stage a world.
  • No wall a ball can get stuck behind: a player can aim 45 degrees either side of the flag and no further, so read "Aiming: 45 degrees and no more" in docs/arcade-holes.md before building anything tall.

Other ways to help

  • Tell us what your launch monitor does. The Connect page only lists setups with a source, and only one unit has been tested. A report that says "launch monitor X with connector Y works" (or does not, and how) is worth a lot: there is an issue form for exactly that, next to the one for bugs.
  • Show what you built. A hole, a ball or a game mode you made, by hand or by asking an AI assistant for it, is welcome as a pull request. A screenshot and a sentence about how it plays is enough of a description.
  • Play a match and report the rough edges. Anything confusing on screen, any moment the camera or the sound gets in the way.
  • Balls and tricks. They are entries in POWERUPS in lib/arcade.js, built from a handful of physics options (drag, lift, bounce, roll, the size of the cup). docs/arcade.md has the measured numbers for each.
  • Sound. Every effect is CC0 or generated for the project, and listed with its source in public/arcade/sfx/CREDITS.md. Replacements have to be as free as that.

Keep it clean. Nothing copied from a commercial game, film or broadcast: no sounds, no art, no course layouts. Everything in the repository has to be something the project may give away under the MIT licence.

Credits and licence

Sim Clash is free software under the MIT licence. It is a fork of Open-Birdie, and would not exist without it:

If you fix something in the engine itself (physics, the renderer, the launch-monitor link), consider sending it to Open-Birdie too, so both projects get it.

Sound effects use Kenney's CC0 audio packs and CC0 recordings from freesound.org, plus stings and an announcer generated for this project. The stage skies and ground textures were generated for the game with an image model; the trees are grown by code in the repository; the props were modelled for it. One CC0 sky photo from Poly Haven remains as a fallback. The full lists, with licences, are in CREDITS.md, ASSETS.md and public/arcade/sfx/CREDITS.md in the repository.

GSPro, Foresight, GSPconnect, Uneekor and the other product names on this site belong to their owners and are used only to describe what the game works with. Sim Clash is not affiliated with or endorsed by any of them.