Giter Club home page Giter Club logo

suroi's People

Contributors

1092384 avatar alany08 avatar ariesninjadev avatar ariespowv avatar atk-r avatar chpsscode avatar compositr avatar croissantedit avatar damienvesper avatar dependabot[bot] avatar domincog avatar ei-pi avatar gatovuelta avatar hsanger avatar itslimenade avatar itsnmd404 avatar j0m1ty avatar jakweg avatar katloo24 avatar kenos1 avatar leia-uwu avatar lightningeek avatar lmssiehdev avatar pythoncat1 avatar renovate[bot] avatar rsgtree avatar scaredpenguinxxl avatar viswas-programs avatar xluin avatar zspybr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

suroi's Issues

Grenades

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

Airdrops can fall on each other

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.

InputManager

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 :

  • OS: [e.g. iOS]
  • Browser [e.g. chrome]

Kill Leader Mechanic

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!!

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Other Branches

These updates are pending. To force PRs open, click the checkbox below.

  • chore(deps): update dependency vite to v5.0.12 [security]
  • chore(deps): update dependency eslint-config-standard-with-typescript to v43.0.1
  • chore(deps): update dependency eslint-plugin-n to v16.6.2
  • chore(deps): update dependency postcss to v8.4.33
  • chore(deps): update dependency svelte to v4.2.9
  • chore(deps): update dependency @types/node to v20.11.7
  • chore(deps): update dependency sass to v1.70.0
  • chore(deps): update typescript-eslint monorepo to v6.19.1 (@typescript-eslint/eslint-plugin, @typescript-eslint/parser)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.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
npm
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

  • Check this box to trigger a request for Renovate to run again on this repository

Disable Mobile Controls Glitch

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:

  1. Go to settings, and click on disable mobile controls, on a mobile device with a mouse and keyboard connected.
  2. Reload the page, join a game, then left click.
  3. See error

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):

  • OS: iPad OS 17.2
  • Browser: Safari
  • Version 0.12.1

"pnpm install" doesn't work

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?

The water tank texture is rounded although it's hitbox is not.

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:

  1. Play the game
  2. Find a water tank
  3. Attempt to go against the corners
  4. Notice that you cannot

Expected behavior
The water tank's hitbox should match the texture's corners.

Error finding game. Please try again. (Self Hosted)

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)
.......

Mouse Input

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 :

  • OS: [iOS]
  • Browser [chrome]

Gun Slot UI Glitch

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!

Screenshots
image

Desktop (please complete the following information):

  • Browser: Chrome

New Website

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.

Bug: Keyboard inputs won't work if the player's language is not set to English.

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.

More mobile input issues

Describe the bug

  1. Sometimes grenades get launched into a random direction that is not the one you aimed at
  2. You can't press the reload button while moving

To Reproduce

  1. Randomly happens when throwing grenades
  2. Try to press the reload button while moving

Expected behavior

  1. The grenades get thrown in the direction you aim
  2. The guns reload

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Android
  • Browser: Samsung Internet
  • Version 19.0.3.12

Additional context
N/A

Unable to attack with joystick size of 100 or under

Describe the bug
Attacking doesn't seem to work when joystick size is 100 or under.

To Reproduce
Steps to reproduce the behavior:

  1. Set joystick size to 100 or under on mobile.
  2. Try to attack.

Expected behavior
Being able to attack with any joystick size setting.

Screenshots

Desktop (please complete the following information):

  • OS: Android
  • Browser: Tested on Chrome and Samsung Internet
  • Version: Chrome 116.0.5845.114, Samsung Internet 19.0.3.12

Additional context
Tested on two different devices.

note

is the europe server done

Error finding game. Please try again.

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!

Need Proxy

Sur.oi has been blocked by schools since surviv.io meme started. I need a proxy for the game, thx.

Mobile Item-Pickup bug

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:

  • There are no errors or warnings being outputted in the client's web console or the server's logs.
  • Attempts to resolve the issue included restarting the server, trying different browsers, and using different phones, but none of these actions resolved the problem.

Environment:

  • Operating System: Android
  • Browser: Chrome

Steps to Reproduce:

  1. Access the Suroi server from any phone.
  2. Attempt to pick up an item by pressing the pickup icon in the center of the screen.
  3. Observe that no action occurs.

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.

Several suggestions for the game

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:

  1. 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.

  2. A duo and squad mode
    To have a good time with friends and have fun playing some games.

  3. A buddy system
    If they create an account system, they can identify themselves with an ID or with your name to add friends.

  4. 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.

  5. 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.

  6. 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.

  7. 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!

Bit packing for packet client server communication

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

Hosting On Replit

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!

Objects can be destroyed while not looking at them

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:

  1. Go to an object and make sure you are touching it
  2. Rotate your character to face in the opposite direction of the object
  3. Click to punch
  4. The object will take damage even though the fists are punching in the opposite direction

Expected behavior
The object should only take damage when the player is punching toward it.

Screenshots
image
The box was damage while the player is facing away from it.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: v0.1.0

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.