hasangergames / suroi Goto Github PK
View Code? Open in Web Editor NEWAn open-source 2D battle royale game inspired by surviv.io. Work in progress.
Home Page: https://suroi.io
License: GNU General Public License v3.0
An open-source 2D battle royale game inspired by surviv.io. Work in progress.
Home Page: https://suroi.io
License: GNU General Public License v3.0
MAKE suroi2.io NOW.
Describe the bug
To Reproduce
Expected behavior
Screenshots
N/A
Desktop (please complete the following information):
Additional context
N/A
Hi,
You should add suroi2.io. Suroi.io has gotten blocked at my school and it’s annoying. Please do this. I love this game.
I think it is unfinished
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are pending. To force PRs open, click the checkbox below.
@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@pixi/graphics-extras
, pixi.js
).github/workflows/ci.yml
actions/checkout v4
pnpm/action-setup v2
actions/setup-node v4
actions/upload-artifact v4
actions/checkout v4
pnpm/action-setup v2
actions/setup-node v4
actions/checkout v4
pnpm/action-setup v2
actions/setup-node v4
actions/checkout v4
pnpm/action-setup v2
actions/setup-node v4
client/package.json
@fortawesome/fontawesome-free ^6.5.1
@pixi/graphics-extras ^7.3.3
@pixi/sound ^5.2.2
jquery ^3.7.1
nipplejs ^0.10.1
pixi.js 7.3.3
@sveltejs/vite-plugin-svelte ^3.0.0
@tsconfig/svelte ^5.0.2
@types/jquery ^3.5.29
@types/node ^20.10.6
postcss ^8.4.32
postcss-import ^16.0.0
postcss-loader ^8.0.0
postcss-preset-env ^9.3.0
sass ^1.69.6
sirv-cli ^2.0.2
svelte ^4.2.3
svgo ^3.2.0
ts-node ^10.9.2
tslib ^2.6.2
typescript 5.3.3
vite ^5.0.10
vite-plugin-image-optimizer ^1.1.7
vite-spritesheet-plugin 0.0.3
node >=18.8.0
common/package.json
@damienvesper/bit-buffer ^1.0.0
@types/node ^20.10.6
@typescript-eslint/eslint-plugin ^6.17.0
@typescript-eslint/parser ^6.17.0
eslint ^8.56.0
eslint-config-standard-with-typescript ^43.0.0
eslint-plugin-import ^2.29.1
eslint-plugin-n ^16.6.1
eslint-plugin-promise ^6.1.1
package.json
@typescript-eslint/eslint-plugin ^6.18.1
@typescript-eslint/parser ^6.18.1
eslint ^8.56.0
eslint-config-standard-with-typescript ^43.0.0
eslint-plugin-import ^2.29.1
eslint-plugin-n ^16.6.2
eslint-plugin-promise ^6.1.1
typescript 5.3.3
server/package.json
@damienvesper/bit-buffer ^1.0.0
ws ^8.16.0
@types/node ^20.10.6
@types/sanitize-html ^2.9.5
@types/ws ^8.5.10
@typescript-eslint/eslint-plugin ^6.17.0
@typescript-eslint/parser ^6.17.0
ts-node-dev ^2.0.0
typescript 5.3.3
node >=18.8.0
How do you setup vscode to debug the client ?
i keep getting : unbound breakpoint
Describe the bug
When clicking with a mouse on disabled mobile controls, it brings up the aim line and mobile joystick, and the character looks to the right, making the game almost unplayable for users with a mouse on mobile.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Left clicking should either cause the character to hit, or fire a weapon in the direction the mouse cursor is, without bringing up the mobile joystick and aim line, or rotating the character.
Desktop (please complete the following information):
Describe the bug
https://wiki.suroi.io/ is down due to 502 Bad Gateway
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The wiki should be accessible.
suroi/server/src/inventory/inventory.ts
Line 135 in 2d47886
Is this intentional? (I could also be misunderstanding the code)
The effective switch delay should only impact shooting, and not reloading.
ps. great job actually implementing the free switch system
is the europe server done
hello
I read the Self‐hosting for suroi
and I try to enter local server
It show
"Error finding game.
Please try again."
I try to build again 4 times, but same result, can you help me? thank you so much!
Hey guys, I have a question there is a feature for frag grenades where if you cook the grenade for ~2-3 seconds you can throw it & it will phase through obstacles (not buildings tho). Is this a feature that's supposed to be there or is this a bug? Thanks
Describe the bug
I honestly don't know what happened but I just wanted to report the bug because it's a weird visual thing that happened!
Expected behavior
You're not supposed to have guns in slot 3 and also, the baseball bat shows up when you go to slot 3 in the game but the ui shows its a gun!
Desktop (please complete the following information):
Hey guys.
Just curious if there is a way to host this on replit so I can add my own stuff and play with my friends. Thanks!
Describe the bug
Objects can take damage and be destroyed while the character isn't facing towards them.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The object should only take damage when the player is punching toward it.
Screenshots
The box was damage while the player is facing away from it.
Desktop (please complete the following information):
Additional context
N/A
There sometimes are like 3-4 rivers...
Make only one.
I see that in the code, every movement is sent separately through the network. Couldn't we e.g. send the movements in one packet ? It should improve the overall game experience through the network.
E.g. Something like here:
https://github.com/HasangerGames/suroi/blob/master/client/src/scripts/packets/sending/inputPacket.ts
Change to:
import { SendingPacket } from "../../types/sendingPacket";
import {
PacketType,
InputActions,
INPUT_ACTIONS_BITS
} from "../../../../../common/src/constants";
import type { SuroiBitStream } from "../../../../../common/src/utils/suroiBitStream";
export class InputPacket extends SendingPacket {
override readonly allocBytes = 16;
override readonly type = PacketType.Input;
override serialize(stream: SuroiBitStream): void {
super.serialize(stream);
const player = this.playerManager;
// 1. Bit Packing is here, we send all movements in one packet
let movementBits = 0;
movementBits |= (player.movement.up ? 1 : 0) << 0;
movementBits |= (player.movement.down ? 1 : 0) << 1;
movementBits |= (player.movement.left ? 1 : 0) << 2;
movementBits |= (player.movement.right ? 1 : 0) << 3;
movementBits |= (player.isMobile && player.movement.moving ? 1 : 0) << 4;
movementBits |= (player.attacking ? 1 : 0) << 5;
movementBits |= (player.turning ? 1 : 0) << 6;
// Assuming you have a maximum of 8 flags, you can use a single byte.
stream.writeByte(movementBits);
if (player.isMobile) {
stream.writeRotation(player.movementAngle, 16);
}
if (player.turning) {
stream.writeRotation(player.rotation, 16);
}
stream.writeBits(player.action, INPUT_ACTIONS_BITS);
switch (player.action) {
case InputActions.EquipItem:
stream.writeBits(player.itemToSwitch, 2);
break;
case InputActions.DropItem:
stream.writeBits(player.itemToDrop, 2);
break;
}
player.action = InputActions.None;
}
}
Though it should be edited analogously on the server side
When I'm trying to install all the dependencies, via 'pnpm install', I get the following output:
Scope: all 5 workspace projects
Lockfile is up to date, resolution step is skipped
WARN Broken lockfile: no entry for 'uWebSockets.js@https://codeload.github.com/uNetworking/uWebSockets.js/tar.gz/105d9ec47126cb82e4a6f3a08aa2ac78b4bb14f1' in pnpm-lock.yaml
ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY The lockfile is broken! Resolution step will be performed to fix it.
server | WARN Could not find preferred package uWebSockets.js@https://codeload.github.com/uNetworking/uWebSockets.js/tar.gz/105d9ec47126cb82e4a6f3a08aa2ac78b4bb14f1 in lockfile
Downloading [email protected]: 9.27 MB/9.27 MB, done
/mnt/server:
ENOENT Command failed with ENOENT: git ls-remote --refs https://github.com/uNetworking/uWebSockets.js.git v20.41.0
spawn git ENOENT
This error happened while installing a direct dependency of /mnt/server
pnpm: Command failed with ENOENT: git ls-remote --refs https://github.com/uNetworking/uWebSockets.js.git v20.41.0
spawn git ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Progress: resolved 39, reused 39, downloaded 0, added 0
How can I fix it? What can I do about it?
In credits
https://github.com/HasangerGames/suroi/blob/master/client/public/img/credits.txt
Ammunition art isn't mentioned. iirc cobby made 5.45mm and .40, i think? and .338 if it will ever be added.
Emerald made the curadell art and maybe if my modification gets approved then i should be there too i think
thanks :3
Describe the bug
The water tank's texture shows it to be rounded at the edges, however it's hitbox is not so you cannot go against them.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The water tank's hitbox should match the texture's corners.
GitHub Issue Report
Issue Description:
I am unable to pick up any items using any phone on my Suroi server. Whenever I press the pickup icon in the center of the screen, no action occurs. This feature functions correctly on any PC.
Observations:
Environment:
Steps to Reproduce:
Expected Behavior:
Pressing the pickup icon should result in picking up the item, similar to the behavior observed on PC.
Additional Notes:
This issue significantly impacts gameplay experience on mobile devices and I am unsure whether this is a bug on my side, or if this is an issue with the client's code.
First off, great last update, felt a lot more like surviv.io then previous versions.
Not sure if the kill leader mechanic is supposed to work like this, but the when the kill leader is killed, the mechanic still shows them as the kill leader. I've seen it work properly a couple times, so I'm not sure what the problem is. Maybe it's supposed to work so whoever has had the most kills shows up (whether dead or alive) or whether you only wanted to show the current alive kill leader. (right now it's showing whoever has had the most kills, whether or not they are alive or not) Hope this feedback helps!!
UNPLAYABLE, jk i love you devs
Describe the bug
Attacking doesn't seem to work when joystick size is 100 or under.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Being able to attack with any joystick size setting.
Desktop (please complete the following information):
Additional context
Tested on two different devices.
Describe the bug
When you summon two airdrops at the same position, one will fall on the other one.
To Reproduce
Summon two airdrops at the same position using radios.
Expected behavior
The secondly summoned airdrop is pushed away by the firstly summoned airdrop.
Additional context
I think this is caused by the "summonAirdrop" function, in the server's "Game" class.
Hello! I recently tried this game and I really loved how they were able to recreate something very similar to surviv.io. I know the game is in beta but I still want to recommend a few things to add:
An account system
Simple and easy an account system (even if it is in beta) where you can register and save your account, with the stats of kills, wins, etc. In addition to allow you (as in the original surviv) to be able to save your skins and other things. Moreover I recommend to add also for those who registered in the beta to give them some special skin, for having supported the project from the beginning.
A duo and squad mode
To have a good time with friends and have fun playing some games.
A buddy system
If they create an account system, they can identify themselves with an ID or with your name to add friends.
An application for pc
Instead of playing it only on google, there should be a way to download it and be able to have it in application. Since google is usually poorly optimized and usually runs poorly.
Airdrop system
That when the first zone is closed, or the zones are closed, airdrops fall and in this way to be able to find more rare and op loot.
Grenade mechanics
Add a system of fragmentation grenades, flash grenades, and smoke grenades. Since the game from what I saw in mechanics is a bit clumsy, because it is very difficult to attack a person without having to go head on and die.
A more complete map
I know it's in beta but it's something I recommend for next updates. I suggest that they make houses with subway areas (such as surviv) and areas of nightclubs, super markets, and other things. To make the map more beautiful to explore
I'm sorry if I got too excited suggesting so much haha, but when I saw this and you usually pay attention to your community, I was happy and wanted to suggest some things that would be missing in the game to at least make me happy.
I hope you read this and wish you luck with your project. It looks very promising!
Describe the bug
Part1:
on inputmanager.ts
at handleInput
modifierCount
modifierCount no matter how many modifiers are there it will never be above 1
Part2:
if you press a, then shift(or any meta key) then unpress a
you wont stop moving even if there are no keys pressed
this might be because it makes the event.key an uppercase value
i tried seeing where the code screws up but it seems to be accounted for but it isn't
Expected behavior
if you press shift and alt you will see that modifierCount remains at 1
because a switch statement is used for some weird reason
and "break;" exits the switch statement and doesn't increase the modifier further
i would just use a series of if statement even though it doesn't look nice
or just remove break; as it isn't needed in this case
also is this makes the modifiercount go over one the check to see if any of the meta keys are in the event.key isn't needed
as event.shiftKey altKey etc.. is turned down even if the only main input
Desktop :
unable to load hosted server
Hosted on linode pointed to proxy for dns.
br.itbros.gg
Config Client:
GNU nano 6.2 client/src/scripts/config.ts
export const Config = {
regions: {
dev: { name: "ITB Battle", address: "br.itbros.gg", https: true },
na: { name: "NA Public", address: "na.suroi.io", https: true }
},
defaultRegion: "na",
mode: "winter"
} satisfies ConfigType as ConfigType;
export interface ConfigType {
readonly regions: Record<string, {
readonly name: string
readonly address: string
readonly https: boolean
}>
readonly defaultRegion: string
readonly mode: string
}
Config Server:
......
export const Config = {
host: "0.0.0.0",
port: 8000,
mapName: "main",
spawn: { mode: SpawnMode.Random },
maxPlayersPerGame: 80,
maxGames: 3,
..................
Google console log:
.......
main-fh98jROC.js:52 Could not load player count for br.itbros.gg.
(anonymous) @ main-fh98jROC.js:52
Promise.catch (async)
r @ main-fh98jROC.js:52
(anonymous) @ main-fh98jROC.js:52
(anonymous) @ main-fh98jROC.js:52
wt @ vendor-AjI_24a3.js:10
le @ vendor-AjI_24a3.js:10
setTimeout (async)
(anonymous) @ vendor-AjI_24a3.js:10
I @ vendor-AjI_24a3.js:10
fireWith @ vendor-AjI_24a3.js:10
fire @ vendor-AjI_24a3.js:10
I @ vendor-AjI_24a3.js:10
fireWith @ vendor-AjI_24a3.js:10
ready @ vendor-AjI_24a3.js:10
setTimeout (async)
.......
1:
on the original surviv.io pressing the mouse once and holding it will keep the player punching
here you have to keep pressing the mouse and even then you have a delay between clicks
2:
if you are shooting then you switch weapons (from automatic to automatic)
you will not keep shooting and you have to wait for the delay then press down the mouse again
Desktop :
This happens because in the inputManager.ts
, event.key is being used. It's value is not constant. For example, if you press the "E" key with english keyboard language, the event.key
value will be "e", however if you press the "E" again but with (for example greek language) the event.key
value will be "ε".
I did some local code testing and I basically replaced every event.key
(in inputManager.ts
) with String.fromCharCode(event.keyCode)
. Which is a very goofy method I came up with and I stopped experiencing the issue/bug. I am not sure if this will break any other part of the code because I saw some special conditions being checked for the "Space" key, the "Ctrl" key etc so I did not create a pull request on this.
I also made a bug report on this too in the discord server on April 3rd.
Sur.oi has been blocked by schools since surviv.io meme started. I need a proxy for the game, thx.
Sorry that I have not read the source code yet, but it appears that the game server sends the position of the player under the roof to the client. Some cheaters simply remove the roof graphics, allowing them to see players inside. I believe that when something is fully covered, it should be completely invisible. While this change may not significantly reduce cheating, it is still an improvement.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.