משחקי דפדפן
שפה, מדינה ומטבע: HE · מחירים

נשמר בעוגייה במכשיר הזה. מחירים במטבע אחר הם בקירוב; כל מודעה מציגה גם את המחיר של המוכר. שערים מ-Exchange Rate API, מתעדכנים מדי יום.

משחקי דפדפן

יצירת משחק דפדפן ל־Sofala

Players start your game right on play.sofala.market, with nothing to install: free games at once, paid ones after one payment. The easy way is to let an AI agent build and upload it; doing it by hand comes after.

עם סוכן ה־AI

You do not need to know how to program. A coding agent writes the game with you, uploads it to Sofala, writes the listing and publishes it when you say it’s done. Any agent that works with MCP servers can do this; these steps use Claude Code on Windows, and we recommend it with the model Opus 5.5 or newer.

  1. Get a Claude accountGo to claude.ai, create an account and choose a paid plan (Pro or higher). Claude Code is not part of the free plan.
  2. Open PowerShellPowerShell is a window where you type commands. Press the Windows key, type powershell and press Enter. A window opens with a line that starts with PS C:\Users\ and your name. That is where the next lines go.
  3. Install Claude CodeCopy this line, paste it into PowerShell (right-click pastes) and press Enter. Nothing seems to happen while it downloads; wait until it says it is done.
    irm https://claude.ai/install.ps1 | iex
    Now close PowerShell and open it again. This matters: the window you installed from does not know the new program yet.
  4. Check that it worksIn the new PowerShell window, this prints a version number:
    claude --version
    Does it say that claude is not recognized? Then Windows has not been told where Claude Code is. Paste these two lines, one after the other, close PowerShell, open it again and try once more:
    $currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
    [Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
    Still stuck? Claude Code’s page for installation problems lists the other causes.
  5. Add Sofala, before you start Claude CodeThis tells Claude Code where Sofala is, so it can upload and publish for you. Paste it and press Enter:
    claude mcp add --transport http Sofala https://sofala.market/mcp
  6. Start Claude CodeType this and press Enter:
    claude
    The first time, your browser opens and asks you to sign in with your Claude account. Do that and come back to the PowerShell window.
    Does it stop to ask permission too often? Start it with this line instead, with no checks at all. It then does everything without asking, also when it gets something wrong, so use it only if you accept that; Anthropic advises it only on a computer with nothing on it that you would miss.
    claude --dangerously-skip-permissions
  7. Connect it to your Sofala accountInside Claude Code, type the line below and press Enter, pick Sofala and choose to sign in. Your browser opens sofala.market: type your email address, then the code Sofala emails you. That also makes your Sofala account if you have none; it is free and has no password. Then press Allow. Back in Claude Code, Sofala now shows as connected.
    /mcp
  8. Pick the modelType the line below, press Enter and choose Opus 5.5 or newer. A game is a lot of code, and smaller models make more mistakes.
    /model
  9. Ask for your gameNow say what you want, in your own words and in any language. For example:
    Make a simple online multiplayer snake game that runs in the browser, for Sofala. Use Sofala’s multiplayer rooms so friends can join. Let me test it, and when I say it’s done, put it on Sofala as a free game.
  • When the game is ready to try, your agent gives you a link to play it on Sofala before anyone else can see it. Say what to change, as often as you like: “make the snakes faster”, “add a score board”.
  • Happy with it? Say “publish it”. A person at Sofala plays each new game before it goes up; you get an email when it is live.
  • To change a live game later, open PowerShell, start Claude Code again and ask. The new build replaces the old one at the same address.
  • On a Mac or on Linux, open Terminal instead of PowerShell and install with the line on Claude Code’s setup page; the other steps are the same. Using another agent? Add a remote MCP server with the address https://sofala.market/mcp.

For manual game devs

Building or packaging the game yourself? This is what Sofala expects. An AI agent follows the same rules; it reads them from Sofala.

ה־ZIP

  • index.html מפעיל את המשחק. שמים אותו בראש ה־ZIP או בתוך התיקייה היחידה שלו.
  • כל מה שהמשחק טוען נמצא ב־ZIP ומקושר בנתיבים יחסיים: Build/game.wasm, אף פעם לא ‎/Build/game.wasm או כתובת מלאה של האתר שלך.
  • עד 1 GB דחוס, 10 000 קבצים ו־2 GB פרוס.

מנועים וסוגי קבצים

  • כל משחק שרץ בדפדפן עובד: HTML5 canvas, ‏WebGL ו־WebGPU (three.js, ‏Babylon.js, ‏PixiJS, ‏Phaser, ‏PlayCanvas), ‏WebAssembly (Emscripten, ‏Rust, ‏Bevy, ‏Go), ‏Godot 3 ו־4, ‏GameMaker, ‏Construct, ‏Defold, ‏PICO-8, ‏RPG Maker ו־LÖVE דרך love.js.
  • Unity WebGL: כל דחיסה עובדת. קובצי Brotli ו־gzip נשלחים עם הכותרות הנכונות, כך שאין צורך ב־decompression fallback.
  • מודולי JavaScript, ‏import maps, קובצי ‎.mjs, מודלים של glTF ו־GLB, טקסטורות KTX2 וצליל WAV, ‏OGG, ‏Opus ו־MP3 נשלחים כולם עם הסוג הנכון.

משחקים מרובי תהליכונים

  • גרסאות שמשתמשות בתהליכונים (SharedArrayBuffer), כמו Godot 4 עם תהליכונים, ‏Emscripten עם ‎-pthread וגרסאות Unity או love.js מרובות תהליכונים, צריכות עמוד מבודד בין מקורות. Sofala מזהה אותן כשמעלים את ה־ZIP ומריצה אותן כך. בגרסת Unity שדחוסה רק ב־Brotli, יש לסמן במודעה „דורש SharedArrayBuffer”.
  • משחק מבודד לא יכול לטעון סקריפטים, תמונות או צלילים מאתרים אחרים, אלא אם הם שולחים כותרות CORS או Cross-Origin-Resource-Policy, לכן כדאי לשים הכול ב־ZIP. משחקים בלי תהליכונים יכולים לטעון מאתרים אחרים.

בתוך המשחק

  • שמירות ב־localStorage או ב־IndexedDB נשארות בדפדפן של השחקן, בנפרד לכל משחק.
  • המשחק יכול להשתמש במסך מלא, בסמן העכבר, בבקרי משחק, בצליל וב־WebXR. גם בעמוד של Sofala יש כפתור מסך מלא.
  • הוא רץ במסגרת מבודדת בכתובת משלו: הוא לא יכול לפתוח חלונות קופצים, לעזוב את העמוד או לראות את חשבון ה־Sofala של השחקן. אין לבקש משחקנים להתחבר או לשלם בתוך המשחק; Sofala מוכרת אותו.
  • משחק מרובה משתתפים לא דורש שרת משלכם: Sofala מפעילה את החדרים (בהמשך). משחק יכול גם לדבר עם שרת משלכם.

טלפונים וטאבלטים

  • יש להאזין לנגיעות על אלמנט של המשחק, כמו ה־canvas שלו, לא על window או document: בתוך המסגרת, iPhone לא תמיד מעביר נגיעות ל־window.
  • יש לתת לאלמנט את ה־CSS touch-action: none, ולקרוא ל־preventDefault() במאזיני touchstart ו־touchmove שלו, שנוספו עם { passive: false }. אחרת הטלפון מפרש החלקה כגלילת הדף ומפסיק לעדכן את המשחק אחרי כמה פיקסלים.
  • אירועי pointer (pointerdown, pointermove) מגיעים גם בטלפונים. משחק יכול להאזין לשני הסוגים, כל עוד אצבע אחת נספרת פעם אחת.
  • Snake Party עושה את כל זה, וההחלקות שלו עובדות ב־iPhone; קוד המקור שלו מראה איך.
  • אם מנוע בנה את המשחק, קלט המגע הוא באחריות המנוע. לא משנה במה הוא נבנה, כדאי לנסות את המשחק בטלפון לפני הפרסום.
const area = document.querySelector('canvas');   // an element of the game, not window
area.style.touchAction = 'none';
let from = null;
area.addEventListener('touchstart', e => {
  e.preventDefault();
  from = [e.touches[0].clientX, e.touches[0].clientY];
}, { passive: false });
area.addEventListener('touchmove', e => {
  e.preventDefault();
  if (!from) return;
  const x = e.touches[0].clientX, y = e.touches[0].clientY, dx = x - from[0], dy = y - from[1];
  if (Math.abs(dx) < 20 && Math.abs(dy) < 20) return;
  from = [x, y];
  swipe(Math.abs(dx) > Math.abs(dy) ? (dx > 0 ? 'right' : 'left') : (dy > 0 ? 'down' : 'up'));
}, { passive: false });

מרובה משתתפים

  • Sofala מפעילה את החדרים, כך שהמשחק לא צריך שרת. שמים את sofala-game-1.1.js ב־ZIP ליד index.html, טוענים אותו לפני הסקריפט שלכם, ושורה אחת מכניסה את השחקן לחדר עם אחרים.
  • מה ששחקן אחד שולח מגיע לאחרים בחדר, לפי סדר השליחה. בחדר יש מקום לעד 32 שחקנים, וכל אחד יכול לשלוח 60 הודעות בשנייה בגודל של עד 16 KB: מתאים למשחקי תורות, משחקי מסיבה ומשחקי זמן אמת רגועים. משחק יריות מהיר עדיין צריך שרת משלו.
  • Sofala לא מריצה שום קוד שלכם. השחקן שנמצא בחדר הכי הרבה זמן הוא המארח: הוא מנהל את המשחק ומעדכן את האחרים במה שהשתנה. כשהמארח עוזב, השחקן הבא הופך למארח.
  • משחק מהיר ממלא חדרים ציבוריים. לחדר פרטי יש קוד שחברים מצטרפים איתו.
  • המשחק מכיר כל שחקן לפי id שנשאר קבוע במשחק ולפי שם השחקן, אף פעם לא לפי כתובת אימייל או חשבון. שם השחקן הוא השם ב־Sofala, אלא אם נבחר שם אחר בדף החשבון; המשחק יכול גם לאפשר להקליד שם בהצטרפות. מי שמשחק במשחק חינמי בלי להתחבר הוא אורח.
  • במחשב שלכם זה עובד אותו דבר: פותחים את המשחק מ־localhost והחדרים הם מרחב בדיקה פרטי.
  • ואם בכל זאת מפעילים שרת, Sofala.token() נותן לו אסימון חתום שאומר מי השחקן. אפשר לאמת אותו עם המפתחות הציבוריים ב־https://sofala.market/game-api/keys.
<script src="sofala-game-1.1.js"></script>
<script type="module">
  const room = await Sofala.rooms.quick({ max: 4 });   // a room with other players, or a new one

  room.on('message', (data, from) => { /* from.name did something */ });
  room.on('enter', peer => { });
  room.on('exit', peer => { });

  room.send({ move: 'e2e4' });                         // to everyone else in the room
</script>

כל מה שהחדרים יודעים לעשות מפורט בראש sofala-game-1.1.js. משחק שלם ללמוד ממנו, בקובץ אחד: Snake Party (קוד המקור שלו).

מכירה

  • אפשר לתת אותו בחינם, או לקבוע מחיר כולל מע"מ של לפחות ‏0.50 ‏€. מקבלים את המחיר בלי מע"מ, פחות העמלה של Sofala בשיעור 5% והעמלה של Stripe, דרך Stripe: קודם מגדירים תשלומים בעמוד המכירות.
  • תמונת השער הראשונה של המודעה היא האריח של המשחק ב־play.sofala.market; צילום מסך רחב ביחס 16:9 עובד הכי טוב. מוסיפים עוד צילומי מסך וסרטון תצוגה מקדימה בעמוד העריכה של המודעה.
  • אדם מ־Sofala משחק בכל משחק חדש לפני שהוא עולה; כשהוא באוויר נשלח אימייל.
  • כדי לעדכן משחק שכבר באוויר, מעלים את ה־ZIP החדש (הסוכן: upload_files עם replace). הוא מחליף את הישן תוך כדקה, בלי בדיקה חדשה ובאותה כתובת, כך שהשחקנים שומרים את ההתקדמות.

פרסום המשחק שלך