Coder Social home page Coder Social logo

hasangergames / suroi Goto Github PK

View Code? Open in Web Editor NEW
244.0 13.0 135.0 69.99 MB

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

TypeScript 91.58% HTML 3.83% SCSS 3.86% Nix 0.01% JavaScript 0.31% Svelte 0.40%
css html nodejs typescript scss uwebsocketsjs game io-game surviv-io survivio battle-royale surviv pixijs pixi iogame iogames suroi vite

suroi's Introduction

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

Join the Discord!

discord.suroi.io

Installation and setup

Start by installing Node.js and pnpm.

Next, click here to download the repo, or use the following command to clone it:

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

To install dependencies, open a terminal in the project root, and run this command:

pnpm install

This will create a node_modules directory in all three folders (client, common, and server) and link the packages there.

Development

To run the game locally, open a terminal in the project root and run the following:

pnpm dev

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

Production

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

pnpm build

To start the WebSocket server, run this command:

pnpm start

Production builds are served using NGINX. A sample configuration file can be found here.

Self-hosting

Visit the wiki for details on how to self-host.

suroi's People

Contributors

1092384 avatar alany08 avatar ariesninjadev avatar atk-r avatar bien-star avatar chpsterz avatar compositr avatar croissantedit avatar damienvesper avatar dedl0x avatar dependabot[bot] avatar domincog avatar ei-pi avatar emecdelam avatar hotduckwhatsup avatar hsanger avatar itslimenade avatar itsnmd404 avatar jcproject5678 avatar kaklikof13 avatar katloo24 avatar kenos1 avatar leia-uwu avatar lmssiehdev avatar pap-24 avatar pythoncat1 avatar renovate[bot] avatar rsgtree avatar scaredpenguinxxl avatar xluin 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  avatar  avatar  avatar  avatar

suroi's Issues

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.

Large bridge can spawn on water, as well as buildings surrounding it.

Describe the bug
The large bridge (which I cant find on the wiki either) is able to spawn with the end of it hanging into another river. The game then allows the bridge part to count as land, which makes the river that it is hanging over feel really weird. The bigger problem is that when this happens, the hut/shack thing that spawns at its side can also spawn in the river, so when you go into the hut and walk to where the the river would be, your skin glitches under the floor of the hut (presumably the river takes precedent in this case?) and you become invisible.

To Reproduce
Steps to reproduce the behavior:

  1. Get in a game where a big bridge spawns with side hanging into another river. Not too rare, happened to me twice.
  2. Go over there
  3. Go inside the hut (if it spawned hanging over a river) and go to the spot where the river should be.
  4. Watch as the skin glitches under the hut floor.
  5. Play around here more, as I was unable to do extensive testing of this bug in-game

Expected behavior
If the bridge spawned hanging over another river, then go on the bridge where the river should be and see how the bridge overrides the river. If there is a hut, the player should become invisible if in the hut and the river at the same time.

Screenshots
Will add screenshots when I encounter this problem again.

Desktop (please complete the following information):

  • OS: [e.g. Windows 11]
  • Browser [Chrome]
  • Version [Latest, Radio mania event]

Additional context
If there could be a check for other rivers while spawning the large bridge that would nullify this problem.

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

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!

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!

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

Joystick stuck

When I play this on the touch screen the directional joystick sometimes gets stuck

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'safari'
  2. Click on 'suroi.io'
  3. move
  4. See error

Fix it plz
Screenshots
IMG_1903

info:

  • OS: [iPadOS 17.5.5-17.6]
  • Browser [safari]
  • Devide [iPad Air 5th gen]

Damaging objects through walls

As I have seen, you can take a melee weapon and damage some object, like a barel, through a wall.
This is not really cool because you can kill a player through a wall just by destroying a barel (like I was killed).

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]

"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?

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

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

note

is the europe server done

Modal to choose Langage on "splashscreen" can be wider than the visible window and overlaps other modals

Describe the bug
Open in the Language Menu on a vertical screen brings the modal out of bounds. To close it the user has to scroll to the right to find the "X". Scrolling to the right reveals the game (level) underneath.
The language Modal does not close the "settings" and "loadout" modal.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Splashscreen' suroi.io ;-)
  2. Set the browser to simulate a mobile device e.g. iPhone 12 (Important in Portaitmode)
  3. Click on the "Settings" button
  4. Click on 'Language" button (Earth-icon bottom right)
  5. (The settings are still open underneath)
  6. Try to close the language modal. -> Scroll to the right. You'll see the level 'underneath'.

Expected behavior
Adapt the with of the modal to the size of the screen. Like with the settings and loadout modal. Close other modals when language moal is opened.

Screenshots
Screenshot 2024-07-17 at 09 38 35

Desktop (please complete the following information):

  • OS: any
  • Browser: any
  • Version v18.3

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.

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.

Ghost Party Members

To Reproduce
probably at some point, you will have a ghost member on the team

Expected behavior
valid player, but not exist

Screenshots

killer pov image

victim pov image

Desktop

  • OS: Windows And Linux
  • Browser Firefox
  • Version All Game Versions

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

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!

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

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

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.

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.

Need Proxy

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

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

FoV rebalancing

Is your feature request related to a problem? Please describe.
It is generally not a nice feeling to get shot at by an enemy outside of your FoV. This can happen if they have a scope greater than yours, but as someone who plays on a widescreen monitor (of course, horizontally oriented) in fullscreen mode, more often than not, that enemy is below me, and can see me because my window is too 'flat', even with the same 'scope level'.

The game currently calculates the scale of the "actual game window" as follows:

const minDimension = Math.min(this.width, this.height);
const maxDimension = Math.max(this.width, this.height);
const maxScreenDim = Math.max(minDimension * (16 / 9), maxDimension);
const scale = (maxScreenDim * 0.5) / (this._zoom * PIXI_SCALE);

(https://github.com/HasangerGames/suroi/blob/master/client/src/scripts/rendering/camera.ts#L51)

(note that a lower scale is generally better, since you can see more.)

We can see the two cases here:

  • if the window is 'flatter' than 16:9 or 9:16, the camera rectangle so that the in-world length of the long side is 'fixed' to a maximum value
  • otherwise, the canvas scales so that the short side is fixed to its maximum value <ca. 0.56x the maximum value of the long side>

Note that this prioritizes people who play on an aspect ratio close to 16:9 (in either orientation), as well as allowing people who play in 'vertical mode' (something that few, if any, people have ever thought of doing) to see things that other players cannot.
As some players can also theorhetically switch between the two easily, e.g. via a hotkey that resizes the browser window, this makes the game unfair for those who cannot, e.g. due to operating system limitations.

Describe the solution you'd like

Tweak scaling as follows:

  • There is a square area centered on the player (or whatever else the camera is supposed to be focused on), let's call it the 'field of vision', outside of which the player can never see, and which scales with the equipped scope scale.
  • The 'effective camera' is a rectangle also centered on the player, touching the sides of the square (from the inside) with its short sides (=> as big as possible) and with the same aspect ratio as the game window.
  • Add an option somewhere in the settings to override this behaviour, so that field of vision is centered in the game window, touches the edges with 2 sides, and everything outside of the field of vision is hidden by a black border (so that every player who has it enabled sees everything they could ever see, and two players with the same scope scale and the feature enabled can see each other at exactly the same moments).

Describe alternatives you've considered

  • Inform the player that the game is meant to be player at 16:9 resolution, and give them a way to easily resize their "game window" (or, at least, show the aspect ratio)
  • Use any other 'aspect ratio' for the field of vision as described above, e.g. 16:9 (to give players playing at 16:9 a maximum FoV, but effectively allowing every other player to play at 16:9)

Additional context
image
The graph of 'visible world height' (green) and 'visible world width' (blue) at aspect ratio [x value]:1.
Note that a value of '1' means the maximum length any side of the screen can ever reach (in-world).
The graphs start at 1:1 (square screen), and the 'corner' is at 16:9 (or 9:16)

The game server shouldn’t send the position of objects inside buildings

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.

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.

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]

Unhinged Solos

Think of it like this, you go around playing queued solos to where you encounter another player.
You have two options, kill them, or invite them to the team.
The Team Size is dynamic and will grow to a max of three players for a team.
However Players in a team can join other teams and betray each other, which is the point of a dynamic team.
Last team standing wins.

Something I've wanted to bring up, just want to see what you guys think.

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

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.