Host a web game you already made, with a backend, multiplayer and a Solana economy
You made a browser game. xcore is one command line that checks it the way xgames.fun serves it, gives it what a game needs from a backend, and publishes it at a link anyone can play. The game keeps its code, its framework and its build.
Start
npx -y @xgamesfun/xcore adopt ./my-game # its record, and the list of what to fix
npm i -g @xgamesfun/xcore # or install it once, then:
xcore check ./my-game # the page in Chrome, as the host serves it
xcore dev ./my-game # play it here as xgames.fun hosts it
xcore add signin ./my-game # players sign in (X or a wallet); saves and leaderboards
xcore add database ./my-game # a database of its own (D1), put up with the game
xcore add multiplayer ./my-game # rooms players share
xcore loot add ./my-game # only if it gets an economy (a Solana economy on loot)
xcore review ./my-game # the security review: what a cheater gets
xcore login && xcore publish ./my-gameIt needs Node 24 or later, and Chrome, Edge or Chromium for the check. (xcore alone on npm is another package: always @xgamesfun/xcore.)
What it takes
A game that ends up as static files a browser runs on its own: plain HTML and JavaScript, a Vite, Next.js static export, Astro, SvelteKit, Nuxt, Create React App or Parcel project, and Godot 4 and Unity web exports. If it needs a backend, that is either server code xgames.fun runs with the game, or a backend of your own that is public on the internet.
What the game gets
- A link anyone can playxcore publish puts the game’s static build on xgames.fun at its own address, and prints the link.
- Player sign-inWith X, Google or a Solana wallet. One call from the game: await GamesFun.signIn().
- Saves and leaderboardsAny JSON, 64 KB a save and 16 saves a player; boards a game submits scores to.
- A databaseOne SQLite database (D1) a game, read and written from its server, and from your terminal with xcore db.
- Multiplayer roomsRooms the game owns, joined with GamesFun.rooms.join(code). Godot’s high-level multiplayer runs over them unchanged.
- A server of its ownCode in server/ answers the game’s /api/*. It runs as a Worker, published with the game.
- A Solana economyShops, loot boxes, raffles, prize pools, staking, crafting and rewards on loot, with no program to write.
- Its own site and domainYour site may show the game in a frame; on a paid plan it plays at a domain of yours.
The plans
| Free | Creator | |
|---|---|---|
| For | A game in one of your 2 free slots | A game in a paid slot: $15 for 30 days |
| Server | 50 ms of CPU a request; 600 requests a minute | 200 ms; 6,000 a minute |
| Saves and scores | 10 MB of saves; 8 boards of 10,000 entries | 1 GB; 16 boards of 1,000,000 |
| Sites that embed it | 3 | 10 |
| Domains of your own | None | 1 |
Past what a plan includes, a game is capped until the month ends: its server is switched off and its pages keep loading, and nothing is lost. Paid slots are prepaid in SOL or USDC, with no automatic renewal. The README has every limit.
What it does not do
- Server-side rendering. The host serves files. Make the page static and put what needs a server in
server/. - A server in Node, Python, Ruby or Go on xgames.fun. The game’s server is a Worker. Any other backend runs on a host of your own, and the game may call it.
- Scripts, style sheets and fonts from a CDN. The page loads code from its own files, so bundle them or copy them in.
- A fallback to index.html for every path. Use a hash router, or links that start at the entry page.
With a coding agent
xcore connect # Claude Code and Codex: the skill, and the economy’s tools
npx skills add XGamesFun/xcore # the same skill for Cursor, Copilot, Gemini CLI and othersThe skill walks an agent through the same steps. Before an economy, a draw or anything a player pays for, read Before you build: one method that finds what a design gets wrong.
A Solana economy for the game
A game’s economy runs on loot, one shared Solana program: on devnet by default, and on mainnet, with real money, when its file says so. The program has not been independently audited. Add Solana to a browser game walks through it, and the toolkit’s page lists what it can build.
Questions people ask
How do I host an HTML5 or Vite game for free with a backend?
Run npx -y @xgamesfun/xcore adopt on its folder, fix what the list names, then xcore check and xcore publish. Everyone gets 2 free slots, and a game in one has a server of its own, 10 MB of saves and 8 leaderboards within the Free plan’s limits.
Which game engines and frameworks does it take?
Anything that builds to static files a browser runs: plain HTML and JavaScript, Vite, a Next.js static export, Astro, SvelteKit, Nuxt, Create React App and Parcel projects, and Godot 4 and Unity web exports. A page rendered per request by Node does not run there.
How do I add multiplayer to a browser game without running a server?
xcore add multiplayer adds sign-in and rooms the game owns, published with the game. A web game joins one with GamesFun.rooms.join(code), then sends and receives messages. A Godot game keeps its high-level multiplayer code and runs it over the same rooms.
How do I add Solana payments or loot boxes to an existing web game?
xcore loot add gives the game an economy on loot, one shared Solana program. You describe shops, loot boxes, raffles, staking and rewards in one JSON file, and the tools check, simulate and price it before it goes live.
Can Claude Code, Codex or Cursor publish my game?
Yes. xcore connect copies a skill into Claude Code’s and Codex’s skills and adds the economy’s MCP tools; npx skills add XGamesFun/xcore installs the same skill for other agents. The agent then walks the same steps: adopt, check, add what the game needs, review, publish.
What does it cost?
Two game slots are free. More games need a paid slot at 15 US dollars for 30 days, prepaid in SOL or USDC with no automatic renewal; its game runs on the Creator plan, with more server time, 1 GB of saves and a domain of its own.
What is not supported?
Server-side rendering, a server in Node, Python, Ruby or Go on xgames.fun (the game’s server is a Worker; any other backend runs on a host of your own, which the game may call), scripts and fonts loaded from a CDN, and a fallback to index.html for every path.
Is xcore on npm this package?
No. This one is @xgamesfun/xcore: run it as npx -y @xgamesfun/xcore, or install it with npm i -g @xgamesfun/xcore. It needs Node 24 or later.
More how-tos
- Make a loot box or gacha: Odds, prizes and a roll nobody can steer, in one JSON file.
- Add NFT staking: Lock tiers and rewards for any collection, one you did not mint too.
- Run an NFT raffle or a lottery: The winner gets the NFT before the seller is paid; a short round refunds.
- Run an NFT auction: A reserve, a late-bid extension, and every outbid bidder refunded at once.
- Run an airdrop people claim: A list of wallets with an amount each; only its Merkle root goes on chain.
- Pay players token rewards: A server that checks, a voucher it signs, and caps a leaked key cannot pass.
- Add Solana to a browser game: Payments, loot boxes and token rewards in a game you already made.
- Solana MCP servers and plugins, by job: Which one for docs, programs, chain data, NFTs, wallets, trading and economies.
- The whole toolkit: what else it builds, and how to install it in Claude Code, Codex, Cursor or a chat app.
Checked against @xgamesfun/solana 0.29.3 on 2026-11-21.