MCPcopy Index your code
hub / github.com/HasangerGames/suroi

github.com/HasangerGames/suroi @v0.30.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.30.2 ↗ · + Follow
1,895 symbols 5,542 edges 162 files 202 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Suroi


About

Suroi is an open-source 2D battle royale game inspired by surviv.io. It is currently a work in progress.

Play the game!

suroi.io

Donate!

Any amount helps! All donation money goes towards the game directly.

ko-fi.com/suroi

Join the Discord!

discord.suroi.io

Installation and setup

Start by installing Git and Bun.

Use the following command to clone the repo:

git clone https://github.com/HasangerGames/suroi.git

Enter the newly created suroi directory with this command:

cd suroi

Finally, run this command in the suroi directory to install dependencies:

bun install

Development

To start the game locally, run the following command in the project root:

bun dev

Or, to see output from the server and client separately, you can use the bun dev:server and bun dev:client commands. (Both must be running simultaneously for the game to work.)

To open the game, go to http://127.0.0.1:3000 in your browser.

Production

To build the client for production, run this command in the project root:

bun build:client

To start the game server, run this command:

bun start

Production builds are served using NGINX. Visit the wiki for details on how to self-host.

Extension points exported contracts — how you extend this code

DeepCloneable (Interface)
(no doc) [2 implementers]
common/src/utils/misc.ts
GameData (Interface)
(no doc) [1 implementers]
server/src/gameManager.ts
RegionInfo (Interface)
(no doc)
client/src/scripts/ui.ts
TranslationManifest (Interface)
(no doc)
client/vite/plugins/translations-plugin.ts
Helper (Interface)
(no doc)
tests/src/validationUtils.ts
Cloneable (Interface)
(no doc) [2 implementers]
common/src/utils/misc.ts
PlayerDamageEvent (Interface)
(no doc)
server/src/pluginManager.ts
ConfigType (Interface)
(no doc)
client/src/scripts/config.ts

Core symbols most depended-on inside this repo

fromRect
called by 2746
common/src/utils/hitbox.ts
getBuiltInCVar
called by 172
client/src/scripts/console/gameConsole.ts
map
called by 136
client/src/scripts/managers/perkManager.ts
getTranslatedString
called by 116
client/src/scripts/utils/translations/translations.ts
get
called by 107
common/src/utils/random.ts
push
called by 94
common/src/utils/misc.ts
randomFloat
called by 92
common/src/utils/random.ts
filter
called by 80
client/src/scripts/console/gameConsole.ts

Shape

Method 971
Function 514
Class 226
Interface 145
Enum 39

Languages

TypeScript100%

Modules by API surface

server/src/objects/player.ts81 symbols
common/src/utils/hitbox.ts79 symbols
client/src/scripts/game.ts68 symbols
client/src/scripts/managers/uiManager.ts54 symbols
common/src/utils/misc.ts49 symbols
common/src/utils/math.ts48 symbols
server/src/game.ts47 symbols
server/src/inventory/inventory.ts45 symbols
client/src/scripts/console/gameConsole.ts44 symbols
common/src/utils/byteStream.ts42 symbols
client/src/scripts/utils/graph/graph.ts42 symbols
client/src/scripts/ui.ts41 symbols

For agents

$ claude mcp add suroi \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact