No description
  • Rust 47.2%
  • TypeScript 28.1%
  • JavaScript 13.8%
  • Svelte 7%
  • CSS 3.6%
  • Other 0.2%
Find a file
coyotte508 0b7b2f1442 Fix Calendar incident undo and food allocation; release 0.1.196
Allow safe Calendar-known incident undo with knowledge boundaries intact. Prevent avoidable waste in event food distribution. Fix composed tactics translations across supported locales. Add engine, viewer and browser regressions. Publish with matching engine 0.4.131.
2026-11-03 00:07:45 +00:00
.github Disable Renovate and restore lucide-svelte 0.577 and Playwright 1.62.1 2026-10-08 09:34:48 +02:00
.idea action log (#277) 2025-06-20 06:21:41 +00:00
client Fix native CI and keep snapshot checks read-only 2026-11-02 20:54:13 +00:00
docs Complete current localization coverage and release viewer 0.1.190 2026-11-02 16:27:54 +01:00
scripts Add manually authored Simplified Chinese game localization 2026-10-20 14:32:19 +02:00
server Fix Calendar incident undo and food allocation; release 0.1.196 2026-11-03 00:07:45 +00:00
web-client Fix Calendar incident undo and food allocation; release 0.1.196 2026-11-03 00:07:45 +00:00
.gitignore fix replay, teach us now, try new font (#252) 2025-05-15 07:36:40 +00:00
AGENTS.md Publish objective fixes in viewer 0.1.171 and engine 0.4.116 2026-10-28 14:52:13 +01:00
ANALYSIS.md Preserve observed cards across rerolls and gate refilled decks 2026-09-27 19:21:10 +02:00
Cargo.lock Merge current engine into 3D viewer and prepare main delivery 2026-10-04 11:55:47 +02:00
Cargo.toml use workspace (#253) 2025-05-15 09:27:51 +02:00
LICENSE Initial commit 2022-12-28 11:56:35 +01:00
mise.toml Fix native CI and keep snapshot checks read-only 2026-11-02 20:54:13 +00:00
README.md docs: add Boardgamers play link 2026-09-28 22:47:01 +02:00
RELEASING.md Publish server (#56) 2024-09-29 13:22:34 +02:00

clash

Lines of code

Play online at

boardgamers.space

Client

Run native client

  • cd client
  • cargo run.

Run remote with boardgamers-mono web client locally

  • mise run build-remote-client
  • cd client/js/dist && basic-http-server .
  • google-chrome --js-flags='--stack-trace-limit 100' --disable-web-security --user-data-dir=/tmp http://localhost:8612

Server wrapper

  • cd server
  • cargo install wasm-pack (if you haven't already)
  • ./build-remote-server.sh

Notes

Todo

Boardgamers Mono

old

.tool-versions

nodejs 16.x
pnpm 6.14.1

Bypass npm publish

Index: apps/game-server/app/services/engines.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/apps/game-server/app/services/engines.ts b/apps/game-server/app/services/engines.ts
--- a/apps/game-server/app/services/engines.ts	(revision 741eecd403ed7c5b38b3b98b1e26be8a502cafc0)
+++ b/apps/game-server/app/services/engines.ts	(date 1726905060117)
@@ -7,9 +7,7 @@
 const engines = {};
 
 async function requirePath(name: string, version: number) {
-  const entryPoint = (await GameInfo.findById({ game: name, version }, "engine.entryPoint", { lean: true })).engine
-    .entryPoint;
-  return `../../games/node_modules/${name}_${version}/${entryPoint}`;
+  return `/home/gregor/source/clash/server/pkg`;
 }
 
 export async function getEngine(name: string, version: number): Promise<Engine> {

Set viewer directly

Index: apps/api/app/resources.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/apps/api/app/resources.ts b/apps/api/app/resources.ts
--- a/apps/api/app/resources.ts	(revision 741eecd403ed7c5b38b3b98b1e26be8a502cafc0)
+++ b/apps/api/app/resources.ts	(date 1726922668897)
@@ -31,7 +31,8 @@
 
   const viewer: ViewerInfo =
     gameInfo?.viewer?.alternate?.url && ctx.query.alternate === "1" ? gameInfo?.viewer.alternate : gameInfo.viewer;
-  const viewerUrl = ctx.query.customViewerUrl || viewer.url;
+  const viewerUrl = "http://127.0.0.1:4000/client.js";
 
   ctx.body = `
     <html>
@@ -48,7 +49,9 @@
         </div>
       </body>
       <${"script"} type='text/javascript'>
-        const gameObj = window.${viewer.topLevelVariable}.launch('#app');
+        const gameObj = window.clash.launch('#app');
         window.addEventListener('message', event => {
           console.log('received message from controller', event.data.type, JSON.parse(JSON.stringify(event.data)));
           switch (event.data.type) {

GameInfo.json (for now)

  {
    "_id": {
      "game": "clash",
      "version": 1
    },
    "description": "Clash of Cultures",
    "engine": {
      "package": {
        "name": "@boardgamers/clash-server",
        "version": "*"
      },
      "entryPoint": "server.js"
    },
    "expansions": [],
    "label": "Clash of Cultures",
    "meta": {
      "public": true,
      "needOwnership": true
    },
    "options": [],
    "players": [
      2,
      3,
      4
    ],
    "preferences": [],
    "rules": "",
    "viewer": {
      "url": "//cdn.jsdelivr.net/npm/@boardgamers/clash-client@0.0.5/client.js",
      "topLevelVariable": "clash",
      "dependencies": {
        "scripts": [],
        "stylesheets": []
      },
      "replayable": true,
      "alternate": null,
      "settings": []
    }
  }

Also add "script URL" = https://not-fl3.github.io/miniquad-samples/mq_js_bundle.js

Docs