Personal fork of the original game by @codergautam. Adds experimental Web3 / on‑chain assets while honoring upstream gameplay and licence.
web3-main– default Web3 gameplay & release line. Free push / typical feature branches.main– upstream sync + patches Mirrorscodergautam/main& holds cherry‑picked security fixes. No Web3 code. Protected branch.upstream-main– local mirror Fast‑forward copy of upstream. Never pushed.
PR guide ‑ New Web3 features → target
web3-main‑ Security / bug fix for upstream → fix onweb3-main, cherry‑pick tomain, then open PR to upstream.
# Linux / WSL2 / MSYS2 Bash
bash <(curl -fsSL https://raw.githubusercontent.com/NovaCrafterLab/swordbattle.io/web3-main/scripts/init-web3.sh)
# – or –
wget -qO- https://raw.githubusercontent.com/NovaCrafterLab/swordbattle.io/web3-main/scripts/init-web3.sh | bashRequires
curlorwget. On Windows, run inside WSL2 or MSYS2 MinGW64 for a POSIX shell.
The script will:
- Clone
NovaCrafterLab/swordbattle.io - Add
codergautam/swordbattle.ioasupstream - Create branches
web3-main,main,upstream-main - Set
ghdefault repo to the fork
After it prints ✔ Ready you can:
git checkout -b feat/my-awesome-feature # start coding on web3-main- Sync upstream – run
scripts/sync-upstream.sh(pull → merge intomain&web3-main). - Develop – branch from
web3-main, PR back when ready. - Security patch – fix on
web3-main, cherry‑pick tomain, PR to upstream. - Release – tag on
web3-main(vX.Y.Z-web3.N), CI deploys.
- Original code © upstream authors, GPL v3.
- Only clean security fixes are sent upstream; Web3 logic stays here unless requested.
(Original upstream README below for reference)
Original upstream README
Swordbattle.io is a multiplayer game where players fight each other with different 2D swords, and try to gain coins. The more coins you have, the bigger and powerful you get! Try to become the biggest of them all.
- Guru for helping make it less laggy
- Mistik for networking base
- Cool guy 53 (aka yocto) for maintaining the game late 2024
- All the artists for bringing sb to life
Note: you are looking at the V2 version of the code. For the old V1 version, go to the v1 repo
Play now at swordbattle.io and see the leaderboard.
https://www.youtube.com/watch?v=cCBdGGHIX-0&t=2s
A more detailed guide will be released soon but for now, follow these instructions:
- Install NodeJS v18 and Yarn (with npm
npm install -g yarn) - Clone this repo
- Open two Terminals/CMD in the directory with extracted source
- Run this command on one window to start the server:
cd server && yarn install && yarn start - Run this command on the second terminal to start the client:
cd client && yarn install && yarn start - Go to
localhost:8000(server hosted atlocalhost:3000)
If you face any issues, you can get help on the Swordbattle.io Discord Server!
You can use this code as a base for your IO games, but please change it to a considerable amount to make it a different game. Under libraries and code you used, please add a link to this GitHub repository. Furthermore, under the GPL License, your game MUST also be open source. You cannot just take this free code and make it proprietary.
Thanks.