From 0edb50470029693711a915d9693793b740d25dcd Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 17:41:41 +0300 Subject: [PATCH 01/85] Update --- llgvis/Cargo.toml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/llgvis/Cargo.toml b/llgvis/Cargo.toml index 0c79dc479..30ebe91e4 100644 --- a/llgvis/Cargo.toml +++ b/llgvis/Cargo.toml @@ -1,11 +1,10 @@ [package] name = "llgvis" version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +edition = "2024" [dependencies] esp = { path = "../server/esp" } globed-derive = { path = "../server/derive" } -plotters = "0.3.5" + +plotters = "0.3.7" From efde990808658ece071bee465b911bcd36316797 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 17:44:06 +0300 Subject: [PATCH 02/85] Update --- server/central/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/central/Cargo.toml b/server/central/Cargo.toml index 0ba914844..d79d4662e 100644 --- a/server/central/Cargo.toml +++ b/server/central/Cargo.toml @@ -11,7 +11,7 @@ blake2 = "0.11.0-pre.4" digest = "0.11.0-pre.9" ipnet = "2.10.1" iprange = "0.6.7" -serde = { version = "1.0.215", features = ["serde_derive"] } +serde = { version = "1.0.216", features = ["serde_derive"] } serde_json = "1.0.133" tokio = { version = "1.42.0", features = ["full"] } json_comments = "0.2.2" @@ -22,5 +22,5 @@ sqlx = { version = "^0.7.0", features = [ # TODO: rocket_db_pools is broken in s "runtime-tokio-rustls", ] } rocket_cors = "0.6.0" -const_format = "0.2.33" +const_format = "0.2.34" hex = "0.4.3" From 8199c38f4ed272ba381e3834cee4df3f29e4467a Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 17:44:49 +0300 Subject: [PATCH 03/85] Update From 24251dbe769392d0c046d99723634fb16d6c8bac Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 17:45:28 +0300 Subject: [PATCH 04/85] Update From 0d933550473dca79ab5f756fe419ed3b36eb2082 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 17:47:27 +0300 Subject: [PATCH 05/85] Update --- server/game/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/game/Cargo.toml b/server/game/Cargo.toml index ddac9fce9..37b988d0e 100644 --- a/server/game/Cargo.toml +++ b/server/game/Cargo.toml @@ -11,7 +11,7 @@ esp = { path = "../esp" } alloca = "0.4.0" ctrlc = "3.4.5" rustc-hash = "2.1.0" -serde = { version = "1.0.215", features = ["serde_derive"] } +serde = { version = "1.0.216", features = ["serde_derive"] } serde_json = "1.0.133" futures-util = "0.3.31" console-subscriber = { version = "0.4.1", features = ["parking_lot"] } @@ -20,6 +20,7 @@ console-subscriber = { version = "0.4.1", features = ["parking_lot"] } # "full", # "tracing", # ], optional = true } + tokio = { version = "1.42.0", features = ["full"], optional = true } aho-corasick = "1.1.3" From 4683f2242b103c4d0f5b7df59b45a3931a5d6bb7 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 17:48:14 +0300 Subject: [PATCH 06/85] Update --- server/observer/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/observer/Cargo.toml b/server/observer/Cargo.toml index 00332dc33..2e3932935 100644 --- a/server/observer/Cargo.toml +++ b/server/observer/Cargo.toml @@ -8,4 +8,5 @@ globed-shared = { path = "../shared" } globed-derive = { path = "../derive" } observer-shared = { path = "../observer-shared" } esp = { path = "../esp" } -egui = "0.29.1" + +egui = "0.30.0" From 1c6dee2cb9c28a1ccb21d054ba695ec9512fc160 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 17:50:56 +0300 Subject: [PATCH 07/85] Update --- server/shared/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/shared/Cargo.toml b/server/shared/Cargo.toml index eb9bf1f9f..ae60ac9a8 100644 --- a/server/shared/Cargo.toml +++ b/server/shared/Cargo.toml @@ -9,7 +9,7 @@ globed-derive = { path = "../derive" } anyhow = "1.0.94" base64 = "0.22.1" -colored = "2.1.0" +colored = "2.2.0" crypto_box = { version = "0.9.1", features = ["std", "chacha20"] } hmac = "0.13.0-pre.4" log = "0.4.22" @@ -21,7 +21,7 @@ reqwest = { version = "0.12.9", default-features = false, features = [ ] } sha2 = "0.11.0-pre.4" time = { version = "0.3.37", features = ["formatting"] } -serde = { version = "1.0.215", features = ["derive"] } +serde = { version = "1.0.216", features = ["derive"] } crypto_secretbox = { version = "0.1.1", features = ["chacha20"] } serde_json = "1.0.133" argon2 = "0.6.0-pre.1" From 770d3d99dc4bc26220bd67c500212951f825a111 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 17:52:32 +0300 Subject: [PATCH 08/85] Update thisss --- server/protocol.md | 194 ++++++++++++++++++++++----------------------- 1 file changed, 94 insertions(+), 100 deletions(-) diff --git a/server/protocol.md b/server/protocol.md index 3a8645d2c..0c1b0f58d 100644 --- a/server/protocol.md +++ b/server/protocol.md @@ -1,112 +1,106 @@ ## Protocol -if you somehow stumbled upon this file, hi! this is a brief protocol description so that I don't forget what everything does :p +If you somehow stumbled upon this file, hi! This is a brief protocol description so that I don't forget what everything does. :p -`+` - encrypted packet. +### Legend -`!` - this packet is unused and may be removed completely in the future +- `+` - Encrypted packet. +- `!` - This packet is unused and may be removed completely in the future. +- `^` - This packet is not fully functional, and work needs to be done on either the client side or the server side. -`^` - this packet is not fully functional and work needs to be done on either the client side or the server side +(Note: I will probably forget to update this very often.) -i will probably forget to update this very often +--- ### Client -Connection related - -* 10000 - PingPacket - ping -* 10001 - CryptoHandshakeStartPacket - handshake -* 10002 - KeepalivePacket - keepalive -* 10003+ - LoginPacket - authentication -* 10004 - LoginRecoverPacket - recover a disconnected session -* 10005 - ClaimThreadPacket - claim a tcp thread from a udp connection -* 10006 - DisconnectPacket - client disconnection -* 10007 - KeepaliveTCPPacket - keepalive but for the tcp connection -* 10200 - ConnectionTestPacket - connection test (response 20010) - -General - -* 11000 - SyncIconsPacket - store client's icons -* 11001 - RequestGlobalPlayerListPacket - request list of all people in the server (response 21000) -* 11002 - RequestLevelListPacket - request list of all levels people are playing right now (response 21005) -* 11003 - RequestPlayerCountPacket - request amount of people on up to 128 different levels (response 21006) -* 11004 - UpdatePlayerStatusPacket - updates the player's status to either visible or invisible - -Game related - -* 12000 - RequestPlayerProfilesPacket - request account data of another player (or all people on the level) -* 12001 - LevelJoinPacket - join a level -* 12002 - LevelLeavePacket - leave a level -* 12003 - PlayerDataPacket - player data -* 12004 - PlayerMetadataPacket - player metadata -* 12010+ - VoicePacket - voice frame -* 12011^+ - ChatMessagePacket - chat message - -Room related - -* 13000 - CreateRoomPacket - create a room -* 13001 - JoinRoomPacket - join a room -* 13002 - LeaveRoomPacket - leave a room (no need for a response) -* 13003 - RequestRoomPlayerListPacket - request list of all people in the given room (response 21004) -* 13004 - UpdateRoomSettingsPacket - update the settings of a room -* 13005 - RoomSendInvitePacket - send invite to a room -* 13006 - RequestRoomListPacket - request a list of all public rooms - -Admin related - -* 19000+ - AdminAuthPacket - admin auth -* 19001+ - AdminSendNoticePacket - send notice to everyone or a specific connected person -* 19002 - AdminDisconnectPacket - disconnect a user with a specific message -* 19003 - AdminGetUserStatePacket - get user state -* 19004+ - AdminUpdateUserPacket - mute/ban/whitelist a user, etc. +#### Connection related +- **10000** - PingPacket: ping +- **10001** - CryptoHandshakeStartPacket: handshake +- **10002** - KeepalivePacket: keepalive +- **10003+** - LoginPacket: authentication +- **10004** - LoginRecoverPacket: recover a disconnected session +- **10005** - ClaimThreadPacket: claim a TCP thread from a UDP connection +- **10006** - DisconnectPacket: client disconnection +- **10007** - KeepaliveTCPPacket: keepalive but for the TCP connection +- **10200** - ConnectionTestPacket: connection test (response 20010) + +#### General +- **11000** - SyncIconsPacket: store client's icons +- **11001** - RequestGlobalPlayerListPacket: request list of all people in the server (response 21000) +- **11002** - RequestLevelListPacket: request list of all levels people are playing right now (response 21005) +- **11003** - RequestPlayerCountPacket: request amount of people on up to 128 different levels (response 21006) +- **11004** - UpdatePlayerStatusPacket: updates the player's status to either visible or invisible + +#### Game related +- **12000** - RequestPlayerProfilesPacket: request account data of another player (or all people on the level) +- **12001** - LevelJoinPacket: join a level +- **12002** - LevelLeavePacket: leave a level +- **12003** - PlayerDataPacket: player data +- **12004** - PlayerMetadataPacket: player metadata +- **12010+** - VoicePacket: voice frame +- **12011^+** - ChatMessagePacket: chat message + +#### Room related +- **13000** - CreateRoomPacket: create a room +- **13001** - JoinRoomPacket: join a room +- **13002** - LeaveRoomPacket: leave a room (no need for a response) +- **13003** - RequestRoomPlayerListPacket: request list of all people in the given room (response 21004) +- **13004** - UpdateRoomSettingsPacket: update the settings of a room +- **13005** - RoomSendInvitePacket: send invite to a room +- **13006** - RequestRoomListPacket: request a list of all public rooms + +#### Admin related +- **19000+** - AdminAuthPacket: admin auth +- **19001+** - AdminSendNoticePacket: send notice to everyone or a specific connected person +- **19002** - AdminDisconnectPacket: disconnect a user with a specific message +- **19003** - AdminGetUserStatePacket: get user state +- **19004+** - AdminUpdateUserPacket: mute/ban/whitelist a user, etc. + +--- ### Server -Connection related - -* 20000 - PingResponsePacket - ping response -* 20001 - CryptoHandshakeResponsePacket - handshake response -* 20002 - KeepaliveResponsePacket - keepalive response -* 20003 - ServerDisconnectPacket - server kicked you out -* 20004 - LoggedInPacket - successful auth -* 20005 - LoginFailedPacket - bad auth (has error message) -* 20006 - ProtocolMismatchPacket - protocol version mismatch -* 20007 - KeepaliveTCPResponsePacket - keepalive response but for tcp -* 20008 - ClaimThreadFailedPacket - failed to claim thread -* 20009 - LoginRecoveryFailedPacket - failed to recover session -* 20100 - ServerNoticePacket - message popup for the user -* 20101 - ServerBannedPacket - message about being banned -* 20102 - ServerMutedPacket - message about being muted -* 20200 - ConnectionTestResponsePacket - connection test response - -General - -* 21000! - GlobalPlayerListPacket - list of people in the server -* 21001 - LevelListPacket - list of all levels in the room -* 21002 - LevelPlayerCountPacket - amount of players on certain requested levels - -Game related - -* 22000 - PlayerProfilesPacket - list of requested profiles -* 22001 - LevelDataPacket - level data -* 22002 - LevelPlayerMetadataPacket - metadata of other players -* 22010+ - VoiceBroadcastPacket - voice frame from another user -* 22011+ - ChatMessageBroadcastPacket - chat message from another user - -Room related - -* 23000 - RoomCreatedPacket - returns room id (returns existing one if already in a room) -* 23001 - RoomJoinedPacket - returns nothing ig?? just indicates success -* 23002 - RoomJoinFailedPacket - also nothing, the only possible error is no such room id exists -* 23003 - RoomPlayerListPacket - list of people in the room -* 23004 - RoomInfoPacket - settings updated and stuff -* 23005 - RoomInvitePacket - invite from another player -* 23006 - RoomListPacket - list of all public rooms - -Admin related - -* 29000 - AdminAuthSuccessPacket - admin auth successful -* 29001+ - AdminErrorPacket - error happened when doing an admin action -* 29002+ - AdminUserDataPacket - data about the player -* 29003+ - AdminSuccessMessagePacket - small success message about an action -* 29004 - AdminAuthFailedPacket - admin auth failed \ No newline at end of file +#### Connection related +- **20000** - PingResponsePacket: ping response +- **20001** - CryptoHandshakeResponsePacket: handshake response +- **20002** - KeepaliveResponsePacket: keepalive response +- **20003** - ServerDisconnectPacket: server kicked you out +- **20004** - LoggedInPacket: successful auth +- **20005** - LoginFailedPacket: bad auth (has error message) +- **20006** - ProtocolMismatchPacket: protocol version mismatch +- **20007** - KeepaliveTCPResponsePacket: keepalive response but for TCP +- **20008** - ClaimThreadFailedPacket: failed to claim thread +- **20009** - LoginRecoveryFailedPacket: failed to recover session +- **20100** - ServerNoticePacket: message popup for the user +- **20101** - ServerBannedPacket: message about being banned +- **20102** - ServerMutedPacket: message about being muted +- **20200** - ConnectionTestResponsePacket: connection test response + +#### General +- **21000!** - GlobalPlayerListPacket: list of people in the server +- **21001** - LevelListPacket: list of all levels in the room +- **21002** - LevelPlayerCountPacket: amount of players on certain requested levels + +#### Game related +- **22000** - PlayerProfilesPacket: list of requested profiles +- **22001** - LevelDataPacket: level data +- **22002** - LevelPlayerMetadataPacket: metadata of other players +- **22010+** - VoiceBroadcastPacket: voice frame from another user +- **22011+** - ChatMessageBroadcastPacket: chat message from another user + +#### Room related +- **23000** - RoomCreatedPacket: returns room ID (returns existing one if already in a room) +- **23001** - RoomJoinedPacket: returns nothing (just indicates success) +- **23002** - RoomJoinFailedPacket: also nothing, the only possible error is "no such room ID exists" +- **23003** - RoomPlayerListPacket: list of people in the room +- **23004** - RoomInfoPacket: settings updated and stuff +- **23005** - RoomInvitePacket: invite from another player +- **23006** - RoomListPacket: list of all public rooms + +#### Admin related +- **29000** - AdminAuthSuccessPacket: admin auth successful +- **29001+** - AdminErrorPacket: error happened when doing an admin action +- **29002+** - AdminUserDataPacket: data about the player +- **29003+** - AdminSuccessMessagePacket: small success message about an action +- **29004** - AdminAuthFailedPacket: admin auth failed From e4ed2301963cd5f3604049fd624496b52f286eb3 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 17:57:02 +0300 Subject: [PATCH 09/85] FINALLY DONE --- server/readme.md | 208 ++++++++++++++++++++++++----------------------- 1 file changed, 106 insertions(+), 102 deletions(-) diff --git a/server/readme.md b/server/readme.md index 427f52b22..b82054cf4 100644 --- a/server/readme.md +++ b/server/readme.md @@ -1,111 +1,120 @@ -# Globed Server +# Globed Server Setup Guide ## Prerequisites -Before trying to setup a server, it is **recommended** that you understand what it involves. You will likely need to either setup port forwarding or use a VPN tool like Radmin VPN if you are hosting the server on your PC, and that won't be covered in this guide. +Before setting up the server, it is **recommended** that you understand what it entails. You may need to set up port forwarding or use a VPN tool like Radmin VPN if hosting the server on your PC. These steps are not covered in this guide. -In case you are familiar with [Pterodactyl](https://pterodactyl.io/), there are eggs available for the [central](https://github.com/DumbCaveSpider/globed-central-egg) and [game](https://github.com/DumbCaveSpider/globed-game-egg) servers that could simplify the setup (thanks to [@DumbCaveSpider](https://github.com/DumbCaveSpider/)) +If you're familiar with [Pterodactyl](https://pterodactyl.io/), there are eggs available for both the [central](https://github.com/DumbCaveSpider/globed-central-egg) and [game](https://github.com/DumbCaveSpider/globed-game-egg) servers that can simplify the setup (thanks to [@DumbCaveSpider](https://github.com/DumbCaveSpider)). -Additionally, if you are setting up a public server, please keep in mind that there are no stability guarantees. Big changes to the server can be made at any time, and updates to the mod can cause your server to stop accepting users until you update it. +Please note, if you're setting up a public server, there are no guarantees regarding stability. The server may undergo significant changes at any time, and updates to the mod can cause your server to stop accepting users until it is updated. ## Setup -If you want to host a server yourself, first you have to download the server binaries from the [latest GitHub release](https://github.com/GlobedGD/globed2/releases/latest), named `globed-central-server` and `globed-game-server`. Depending on your OS and architecture, you want the one ending in `.exe` on Windows, the `-x64` one on Linux x64, and the `-arm64` one on Linux ARM64. +To host a server yourself, follow these steps: -After that is done, you have 2 paths: +1. **Download the Server Binaries:** + Download the server binaries from the [latest GitHub release](https://github.com/GlobedGD/globed2/releases/latest), which include `globed-central-server` and `globed-game-server`. Choose the appropriate file based on your operating system: + - For **Windows**, download the `.exe` file. + - For **Linux x64**, download the `-x64` file. + - For **Linux ARM64**, download the `-arm64` file. -* If you want to setup a small, simple server you can jump to the [standalone section](#standalone) -* If you want to setup a bigger or more configurable server, keep reading. +2. **Choose Your Setup Path:** + - If you want a small, simple server, proceed to the [Standalone section](#standalone). + - If you're aiming for a larger or more configurable setup, continue reading. -After launching the central server binary, you should see two new files called `central-conf.json` and `Rocket.toml`. This is where you can configure everything about the server. For documentation about all the options, jump to the [configuration section](#central-server-configuration), however for now we only need the option `game_server_password`. +3. **Configure the Central Server:** + Launch the `central-server` binary. Afterward, you should see two new files: `central-conf.json` and `Rocket.toml`. These files contain the server's configuration. For now, focus on the `game_server_password` option. -With your central server properly setup and started, jump to the [bridged](#bridged) section of the game server configuration and launch the game server, with the password that you configured earlier. +4. **Launch the Game Server:** + With the central server configured, proceed to the [Bridged section](#bridged) of the game server configuration and launch the game server using the password set earlier. -If you did everything right, you should see no errors or warnings in the console and instead you should see "Server launched on x.x.x.x". This means everything worked! Congrats :) +If everything is done correctly, the console should show "Server launched on x.x.x.x", indicating a successful setup. -## Game server configuration +## Game Server Configuration -note: if you are not on Windows, in the following examples replace `set` with `export` and replace `globed-game-server.exe` with the appropriate server binary (such as `globed-game-server-x64`) +**Note:** If you're not on Windows, replace `set` with `export` and use the appropriate server binary (e.g., `globed-game-server-x64` for Linux). ### Standalone -If you want to spin up a quick, standalone game server, without needing to start a central server, then it is as simple as running the `globed-game-server.exe` executable directly. +To quickly launch a game server without the central server, run the `globed-game-server.exe` executable directly. -If you want to change the port (default is 4202) then you'll have to run the executable with an additional argument like so: +To change the port (default is 4202), use the following command: ```sh -# replace 4202 with your desired port +# Replace 4202 with your desired port globed-game-server.exe 0.0.0.0:4202 ``` -**To connect to your server, you want to use the Direct Connection option inside the server switcher in-game**. (with the address `127.0.0.1:4202` if the server is running on the same device) - -Keep in mind that a standalone server makes the configuration very limited (for example you can't ban/mute users anymore) and disables any kind of player authentication. +**Connecting to the server:** +Use the **Direct Connection** option in the game’s server switcher, with the address `127.0.0.1:4202` if the server is running on the same machine. +Keep in mind, a standalone server offers limited configuration (e.g., you can't ban or mute users) and disables player authentication. ### Bridged -To start the game server and bridge it together with an active central server you must use the password from the `game_server_password` option in the central server configuration. Then, you have 2 options whenever you start the server: +To bridge the game server with a central server, use the `game_server_password` from the central server configuration. You have two options to start the server: ```sh globed-game-server.exe 0.0.0.0:4202 http://127.0.0.1:4201 password +``` -# or like this: - +Or set environment variables and then run the server: +```sh set GLOBED_GS_ADDRESS=0.0.0.0:4202 set GLOBED_GS_CENTRAL_URL=http://127.0.0.1:4201 set GLOBED_GS_CENTRAL_PASSWORD=password globed-game-server.exe ``` -Replace `0.0.0.0:4202` with the address you want the game server to listen on, `http://127.0.0.1:4201` with the URL of your central server, and `password` with the password. - -### Environment variables - -`GLOBED_GS_NO_FILE_LOG` - if set to 1, don't create a log file and only log to the console. - -## Central server configuration - -By default, the file is created with the name `central-conf.json` in the current working directory when you run the server, but it can be overriden with the environment variable `GLOBED_CONFIG_PATH`. The path can be a folder or a full file path. - -### General settings -| JSON key | Default | Description | -|---------|---------|-----------------| -| `web_mountpoint` | `"/"` | HTTP mountpoint (the prefix before every endpoint) | -| `game_servers` | `[]` | List of game servers that will be sent to the clients (see below for the format) | -| `maintenance` | `false` | When enabled, anyone trying to connect will get an appropriate error message saying that the server is under maintenance | -| `status_print_interval` | `7200` | How often (in seconds) the game servers will print various status information to the console, 0 to disable | -| `userlist_mode` | `"none"` | Can be `blacklist`, `whitelist`, `none` (same as `blacklist`). When set to `whitelist`, players will need to be first whitelisted before being able to join | -| `tps` | `30` | Dictates how many packets per second clients can (and will) send when in a level. Higher = smoother experience but more processing power and bandwidth | -| `admin_webhook_url` | `(empty)` | When enabled, admin actions (banning, muting, etc.) will send a message to the given discord webhook URL | -| `rate_suggestion_webhook_url` | `(empty)` | When enabled, sending a level to be featured will send a message to the given discord webhook URL | -| `featured_webhook_url` | `(empty)` | When enabled, featuring a level will send a message to the given discord webhook URL | -| `featured_webhook_message` | `(empty)` | The message to send in the body of the webhook message for featured levels | -| `room_webhook_url` | `(empty)` | When enabled, creating a room will send a message to the given discord webhook URL | -| `chat_burst_limit` | `0` | Controls the amount of text chat messages users can send in a specific period of time, before getting rate limited. 0 to disable | -| `chat_burst_interval` | `0` | Controls the period of time for the `chat_burst_limit_setting`. Time is in milliseconds | -| `roles` | `(...)` | Controls the roles available on the server (moderator, admin, etc.), their permissions, name colors, and various other things | - -### Security settings (the boring stuff) - -These are recommended to adjust if you're hosting a public server, otherwise the defaults should be fine. - -| JSON key | Default | Description | -|---------|---------|-----------------| -| `admin_key` | `(random)` | The password used to unlock the admin panel in-game, must be 32 characters or less | -| `use_gd_api` | `false` | Verify account ownership via requests to GD servers. Note that you must set `gd_api_account` and `gd_api_gjp` accordingly if you enable this setting | -| `gd_api_account` | `0` | Account ID of a bot account that will be used to verify account ownership | -| `gd_api_gjp` | `(empty)` | GJP2 of the GD account used for verifying ownership. Figuring this out is left as an excercise to the reader :) | -| `gd_api_url` | `(...)` | Base link to the GD API used for account verification. By default is `https://www.boomlings.com/database`. Change this if you're hosting a server for a GDPS | -| `skip_name_check` | `false` | Skips validation of account names when verifying accounts | -| `refresh_interval` | `3000` | Controls the time (in milliseconds) between requests to the GD server for refreshing messages | -| `secret_key` | `(random)` | Secret key for signing authentication keys | -| `secret_key2` | `(random)` | Secret key for signing session tokens | -| `game_server_password` | `(random)` | Password used to authenticate game servers | -| `cloudflare_protection` | `false` | Block requests coming not from Cloudflare (see `central/src/allowed_ranges.txt`) and use `CF-Connecting-IP` header to distinguish users. If your server is proxied through cloudflare, you **must** turn on this option. | -| `challenge_expiry` | `30` | Amount of seconds before an authentication challenge expires and a new one can be requested | -| `token_expiry` | `86400` (1 day) | Amount of seconds a session token will last. Those regenerate every time you restart the game, so it doesn't have to be long | - -Formatting for game servers: +Replace: +- `0.0.0.0:4202` with your desired game server address. +- `http://127.0.0.1:4201` with the URL of your central server. +- `password` with your configured password. + +### Environment Variables + +- `GLOBED_GS_NO_FILE_LOG` - Set to `1` to prevent the creation of a log file, logging only to the console. + +## Central Server Configuration + +By default, the `central-conf.json` file is created in the current directory when you run the central server, but it can be overridden using the `GLOBED_CONFIG_PATH` environment variable. + +### General Settings + +| JSON Key | Default | Description | +|------------------------------------|---------------|-------------| +| `web_mountpoint` | `"/"` | HTTP mountpoint (prefix before every endpoint) | +| `game_servers` | `[]` | List of game servers sent to clients (see below for format) | +| `maintenance` | `false` | If enabled, users trying to connect will receive a maintenance message | +| `status_print_interval` | `7200` | Time in seconds between status messages printed to the console (set to `0` to disable) | +| `userlist_mode` | `"none"` | Options: `blacklist`, `whitelist`, `none` (whitelist requires players to be whitelisted to join) | +| `tps` | `30` | Number of packets per second clients can send in a level (higher = smoother experience) | +| `admin_webhook_url` | `(empty)` | URL for sending admin action notifications (banning, muting, etc.) to Discord | +| `rate_suggestion_webhook_url` | `(empty)` | URL for sending level submission notifications to Discord | +| `featured_webhook_url` | `(empty)` | URL for sending level feature notifications to Discord | +| `room_webhook_url` | `(empty)` | URL for sending room creation notifications to Discord | +| `chat_burst_limit` | `0` | Limit on the number of text messages a user can send in a period (set to `0` to disable) | +| `chat_burst_interval` | `0` | Time period for chat burst limit (in milliseconds) | +| `roles` | `(...)` | List of available roles, with permissions and settings | + +### Security Settings (Recommended for Public Servers) + +| JSON Key | Default | Description | +|------------------------------------|---------------|-------------| +| `admin_key` | `(random)` | Password for unlocking the admin panel (max 32 characters) | +| `use_gd_api` | `false` | Verify account ownership via GD servers (requires `gd_api_account` and `gd_api_gjp`) | +| `gd_api_account` | `0` | Bot account ID for verification | +| `gd_api_gjp` | `(empty)` | GJP2 for account verification | +| `gd_api_url` | `(...)` | Base URL for GD API used for account verification | +| `skip_name_check` | `false` | Skips account name validation when verifying accounts | +| `refresh_interval` | `3000` | Time in milliseconds between GD server requests for refreshing messages | +| `secret_key` | `(random)` | Secret key for signing authentication keys | +| `secret_key2` | `(random)` | Secret key for signing session tokens | +| `game_server_password` | `(random)` | Password for authenticating game servers | +| `cloudflare_protection` | `false` | Block non-Cloudflare requests and use the `CF-Connecting-IP` header if server is proxied through Cloudflare | +| `challenge_expiry` | `30` | Time (in seconds) before an authentication challenge expires | +| `token_expiry` | `86400` (1 day) | Time (in seconds) a session token lasts | + +### Game Server Formatting Example: ```json { @@ -116,54 +125,49 @@ Formatting for game servers: } ``` -**Note that the `address` key must be a public IP address if you want others to be able to connect. Putting 127.0.0.1 will make it possible to only connect from *your* machine.** +**Note:** The `address` key must be a public IP address if you want others to connect. Use `127.0.0.1` for local connections only. -Formatting for user roles: +### User Role Formatting Example: ```json { - // all keys except id and priority are optional. - "id": "mod", - "priority": 100, // determines which roles can edit users with other roles - "badge_icon": "role-mod.png", // make sure it's a valid sprite! (can be empty) - "name_color": "#ff0000", // name color - "chat_color": "#ff0000", // color of chat messages - - // permissions - "notices": false, // ability to send notices (popup messages) - "notices_to_everyone": false, // ability to send a notice to everyone on the server - "kick": false, // ability to disconnect users from the server - "kick_everyone": false, // ability to disconnect everyone from the server - "mute": false, // ability to mute/unmute - "ban": false, // ability to ban/unban & whitelist (on whitelist enabled servers) - "edit_role": false, // ability to change roles of a user - "edit_featured_levels": false, // ability to edit featured levels - "admin": false, // implicitly enables all other permissions and also does some additional things + "priority": 100, + "badge_icon": "role-mod.png", + "name_color": "#ff0000", + "chat_color": "#ff0000", + "notices": false, + "notices_to_everyone": false, + "kick": false, + "kick_everyone": false, + "mute": false, + "ban": false, + "edit_role": false, + "edit_featured_levels": false, + "admin": false } ``` -There is also a special format for tinting colors, for example setting `name_color` to `#ff0000 > 00ff00 > 0000ff` would make your name fade between red, green and blue. Spaces and a `#` at the start are for clarity and are optional. (Maximum 8 colors supported in one string) +### Special Role Tinting: + +You can create color transitions for names by using a special format, e.g., setting `name_color` to `#ff0000 > 00ff00 > 0000ff` will make the name fade between red, green, and blue. -### Rocket.toml +### Rocket.toml Configuration -Additionally, when first starting up a server, a `Rocket.toml` file will be created from a template. By default, it will be put in the current working directory, or `ROCKET_CONFIG` if specified. +When starting the server, a `Rocket.toml` file is generated, typically in the current working directory (or the directory specified by `ROCKET_CONFIG`). This file is used for configuring the HTTP port and database path, among other settings. Refer to [Rocket documentation](https://rocket.rs/guide/v0.5/configuration/#rocket-toml) for further configuration options. -The `Rocket.toml` is primarily used for changing the HTTP port and the path to the database, however other settings are also free to change, as per [Rocket documentation](https://rocket.rs/v0.5/guide/configuration/#rockettoml). Changing the TOML configuration is as simple as the JSON configuration, however it is *not* hot-reloadable. +## Building the Server -## Building +To build the server yourself, you will need a nightly Rust toolchain. Once set up, use the following commands to build: -If you want to build the server yourself, you need a nightly Rust toolchain. After that, it's as simple as: ```sh cd server/ -rustup override set nightly # has to be done only once +rustup override set nightly cargo build --release ``` -## Extra - -In release builds, by default, the `Debug` and `Trace` log levels are disabled, so you will only see logs with levels `Info`, `Warn` and `Error`. +## Extra Configuration -This can be changed by setting the environment variable `GLOBED_LOG_LEVEL` for the central server, or `GLOBED_GS_LOG_LEVEL` for the game server. The appropriate values are: `trace`, `debug`, `info`, `warn`, `error`, `none`. +In release builds, the default log levels are set to `Info`, `Warn`, and `Error`. To change the log level, set the environment variable `GLOBED_LOG_LEVEL` for the central server or `GLOBED_GS_LOG_LEVEL` for the game server. Possible values include: `trace`, `debug`, `info`, `warn`, `error`, `none`. -`GLOBED_NO_FILE_LOG` can be set to a nonzero value to disable logging to a file. \ No newline at end of file +To disable logging to a file, set `GLOBED_NO_FILE_LOG` to a nonzero value. From 4820c1090fa78ee18dafc305c788cc1d2f31066d Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 18:15:02 +0300 Subject: [PATCH 10/85] Update modss readmee --- about.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/about.md b/about.md index 59cd50841..acc5eb61d 100644 --- a/about.md +++ b/about.md @@ -4,35 +4,35 @@ Globed is an open-source, highly customizable multiplayer mod for Geometry Dash. ## Usage -In the main menu, an extra button is added to the bottom row. This button opens the Globed Menu, where you can join a server and start playing online with other people. +In the main menu, an extra button is added to the bottom row. This button opens the Globed Menu, where you can join a server and start playing online with others. -If you have any issues, suggestions or just want to see the development of the mod, you can join our [discord server](https://discord.gg/d56q5Dkdm3)! +If you have any issues, suggestions, or just want to follow the development of the mod, you can join our [Discord server](https://discord.gg/d56q5Dkdm3)! ## Support Globed is a completely free mod, and will never require any payment to use. -But if you want to support the developer and help us pay for server expansions, you can do it on our [Ko-Fi page](https://ko-fi.com/globed)! +However, if you'd like to support the developer and help us with server expansions, you can contribute through our [Ko-Fi page](https://ko-fi.com/globed)! -As a sign of appreciation, you will get a nice purple name and a badge in-game, and a role on our discord server :) +As a token of appreciation, you will receive a purple name, an in-game badge, and a special role on our Discord server. :) ## Credit Globed is made by: -* [dank_meme](user:9735891) - owner and main developer -* [availax](user:1621348) - co-owner, community manager, artist -* [ItzKiba](user:4569963) - artist, developer -* [TechStudent10](user:20284359) - developer -* [ninXout](user:7479054) - developer +- [dank_meme](user:9735891) - Owner and main developer +- [availax](user:1621348) - Co-owner, community manager, artist +- [ItzKiba](user:4569963) - Artist, developer +- [TechStudent10](user:20284359) - Developer +- [ninXout](user:7479054) - Developer and the rest of our awesome [contributors](https://github.com/GlobedGD/globed2/graphs/contributors)! -Special thanks: +### Special thanks: -* [MathieuAR](user:3759035) - for providing us server hosting -* [HJfod](user:104257) - for making [our website](https://globed.dev) -* [alk1m123](user:11535118) - for working together for EditorCollab interoperability -* [Alphalaneous](user:1139015) - for making the DeathLink mod and allowing us to take their idea and implement it in Globed -* [Everyone from the Geode Team](https://github.com/orgs/geode-sdk/people) - for making Geode -* Server staff and supporters - for helping in shaping this mod to be what it is today :) +- [MathieuAR](user:3759035) - For providing us with server hosting +- [HJfod](user:104257) - For creating [our website](https://globed.dev) +- [alk1m123](user:11535118) - For collaborating on EditorCollab interoperability +- [Alphalaneous](user:1139015) - For creating the DeathLink mod and allowing us to implement their idea into Globed +- [Everyone from the Geode Team](https://github.com/orgs/geode-sdk/people) - For developing Geode +- Server staff and supporters - For helping shape this mod into what it is today :) From 10ef98141cceb1f77da8c6a5484020ebe6384915 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 18:19:36 +0300 Subject: [PATCH 11/85] Update --- support.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/support.md b/support.md index 05b053d85..7e232996b 100644 --- a/support.md +++ b/support.md @@ -1,6 +1,5 @@ Globed is a completely free mod, and will never require any payment to use. -But if you want to support the developer and help us pay for server expansions, you can do it on our [Ko-Fi page](https://ko-fi.com/globed)! - -As a sign of appreciation, you will get a nice purple name in-game and a role on our discord server :) +However, if you'd like to support the developer and help us with server expansions, you can contribute through our [Ko-Fi page](https://ko-fi.com/globed)! +As a token of appreciation, you will receive a purple name, an in-game badge, and a special role on our Discord server. :) From 7e23004fdda7458e04d76d3a53888e5683830c66 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 18:28:23 +0300 Subject: [PATCH 12/85] Update readmee --- README.md | 56 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 35af3a811..a2af510a6 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,11 @@ Globed is a [Geode](https://geode-sdk.org/) mod, so it requires you to install G ## Features -* Real-time multiplayer -* Completely free and open-source, easy to host your own server -* Available for Windows, Android and MacOS -* In-game voice & text chat -* Public & private rooms +- Real-time multiplayer +- Completely free and open-source, easy to host your own server +- Available for Windows, Android, and MacOS +- In-game voice & text chat +- Public & private rooms ## Hosting a server @@ -22,35 +22,45 @@ See the [server readme](./server/readme.md) for more information about hosting a Build like any other mod, see [Geode documentation](https://docs.geode-sdk.org/getting-started/cpp-stuff). -Only compiler supported is Clang, MSVC is unsupported since release v1.7.0 (for Geode v4). If compiling on linux, clang-cl is required instead of regular clang. +- Only compiler supported is Clang, MSVC is unsupported since release v1.7.0 (for Geode v4). +- If compiling on Linux, `clang-cl` is required instead of regular clang. ## Credit Globed is made by: -* [dank_meme](https://github.com/dankmeme01) - owner and main developer -* [availax](https://availax.xyz/) - co-owner, community manager, artist -* [ItzKiba](https://github.com/ItzKiba/) - artist, developer -* [TechStudent10](https://github.com/TechStudent10) - developer -* [ninXout](https://github.com/ninXout/) - developer +- [dank_meme](https://github.com/dankmeme01) - Owner and main developer +- [availax](https://availax.xyz/) - Co-owner, community manager, artist +- [ItzKiba](https://github.com/ItzKiba) - Artist, developer +- [TechStudent10](https://github.com/TechStudent10) - Developer +- [ninXout](https://github.com/ninXout) - Developer and the rest of our awesome [contributors](https://github.com/GlobedGD/globed2/graphs/contributors)! -Special thanks: +**Special thanks**: -* MathieuAR - for providing us server hosting -* HJfod - for making [our website](https://globed.dev) -* alk1m123 - for working together for EditorCollab interoperability -* Alphalaneous - for making the DeathLink mod and allowing us to take their idea and implement it in Globed -* [Everyone from the Geode Team](https://github.com/orgs/geode-sdk/people) - for making Geode -* Server staff and supporters - for helping in shaping this mod to be what it is today :) +- [MathieuAR](user:3759035) - For providing us with server hosting +- [HJfod](user:104257) - For creating [our website](https://globed.dev) +- [alk1m123](user:11535118) - For collaborating on EditorCollab interoperability +- [Alphalaneous](user:1139015) - For creating the DeathLink mod and allowing us to implement their idea into Globed +- [Everyone from the Geode Team](https://github.com/orgs/geode-sdk/people) - For developing Geode +- Server staff and supporters - For helping shape this mod into what it is today :) ### Licenses Globed is licensed under the MIT license. All of the following libraries used in Globed have their own licenses you may want to read: -* Geode - [website](https://geode-sdk.org) - [repository](https://github.com/geode-sdk/geode) - [license](https://github.com/geode-sdk/geode/blob/main/LICENSE.txt) -* Boost - [website](https://boost.org) - [repository](https://github.com/boostorg/boost) - [license](https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt) -* UIBuilder - [repository](https://github.com/camila314/uibuilder) - [license](https://github.com/camila314/uibuilder/blob/main/LICENSE) -* Opus - [website](https://opus-codec.org/) - [repository](https://github.com/xiph/opus) - [license](https://github.com/xiph/opus/blob/master/COPYING) -* libsodium - [website](https://libsodium.gitbook.io/doc/) - [repository](https://github.com/jedisct1/libsodium) - [license](https://github.com/jedisct1/libsodium/blob/master/LICENSE) +- **Geode** + [website](https://geode-sdk.org/) | [repository](https://github.com/geode-sdk/geode) | [license](https://github.com/geode-sdk/geode/blob/main/LICENSE.txt) + +- **Boost** + [website](https://www.boost.org/) | [repository](https://github.com/boostorg/boost) | [license](https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt) + +- **UIBuilder** + [repository](https://github.com/camila314/uibuilder) | [license](https://github.com/camila314/uibuilder/blob/main/LICENSE) + +- **Opus** + [website](https://opus-codec.org/) | [repository](https://github.com/xiph/opus) | [license](https://github.com/xiph/opus/blob/main/COPYING) + +- **libsodium** + [website](https://libsodium.gitbook.io/doc) | [repository](https://github.com/jedisct1/libsodium) | [license](https://github.com/jedisct1/libsodium/blob/master/LICENSE) From d9a00689ef4a9c8bf49a6b55d6d0ce024ec4610b Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 18:35:58 +0300 Subject: [PATCH 13/85] Update changelog --- changelog.md | 628 +++++++++++++++++---------------------------------- 1 file changed, 212 insertions(+), 416 deletions(-) diff --git a/changelog.md b/changelog.md index 2d49a2950..29bcb176f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,418 +1,214 @@ -## v1.7.2 - -* Make some corrections to the texture pack detection algorithm -* Fix rare crash when viewing changelog popup -* Fix rare crash caused by a race condition - -## v1.7.1 - -* Fix room password popup having broken UI - -## v1.7.0 - -* Port to Geode v4.0.0 -* Added a 2-player mode room setting, allowing you to play 2-player levels with a remote friend -* Added a way to filter levels in the Globed level list -* Added a mechanism that allows for compatibility with outdated mod versions and game versions -* Make the direct connection popup allow for 64 characters in the address instead of 21 -* Added some guides to the GitHub repository (currently only a guide on how to use certain launch options) -* Added a 'cheat indicator' to the room creation UI, to show which settings enable safe mode -* Improve error messages in failed web requests -* Improve sliders (volume, etc.) in UI, now no longer squished! -* Improve server security & performance -* Improve packet fragmentation algorithm -* Revamp moderator panel -* Add a way to override the main server URL (for GDPS owners). The searched sources are, in order: -* \-- `GLOBED_MAIN_SERVER_URL` environment variable -* \-- `globed-server-url.txt` in the game folder -* \-- `globed-server-url.txt` in the mod config folder -* \-- `globed-server-url.txt` in the mod save directory -* \-- Default value, `https://main.globed.dev` -* Fix crash when trying to join a room with an unlisted/deleted level -* Fix minor memory leak whenever any player leaves the level :P (thanks sleepyut) -* Fix crashes when using an outdated texture pack that modifies Globed textures -* Fix some logic issues in the audio recording system -* Fix a rare crash during closing the game that no one except Brittank88 ever experienced :D -* Fix rare multithreading crash when loading into the main menu - -## v1.6.2 - -* Fix crashes on some Windows devices - -## v1.6.1 - -* Fix crash when pressing any key on Mac -* Fix crash when opening the globed menu on Mac -* Fix player list looking weird after leaving a room with a pinned level -* In Death Link, faster reset will now be enabled for everyone if the room creator has it enabled -* Add verification for discord linking -* Only show 1 badge near a player's name when in a level - -## v1.6.0 - -* Add a way to pin a specific level in a room -* \-- If you are a room creator, there will now be a new button whenever opening an online level -* \-- The chosen level will be pinned at the top of the player list in the globed menu -* \-- Thanks [TechStudent10](user:20284359) for implementing this (and [Dasshu](user:1975253) for the textures!) -* Add a popup showing the changelog of the most recent update -* Change the invisibility button to instead open a popup with more advanced options -* \-- You can now choose to separately hide yourself from the player list, the level, or the invite list -* Add a new Discord bot for supporters to be able to obtain their in-game roles without having to ask a staff member -* Show all the badges of a player instead of just one at a time (for example Mod & Booster) (thanks [Kiba](user:4569963) -* When playing in a Death Link room, the faster reset option is now forcefully disabled for all players (to prevent desync) -* Automatically block invites from users that you have blocked on GD -* Change the player list to sort players in a random order, to fight against people making alt accounts to promote their levels -* Add a Force Progress Bar setting, that makes it so that the progress bar is enabled if you are connected to the server, when it's otherwise disabled (thanks TechStudent10!) -* Add Node IDs dependency -* Remove Custom Keybinds dependency from Android, as it was unused -* Various security improvements +### 1.7.2 +- Corrected texture pack detection algorithm +- Fixed rare crash when viewing changelog popup +- Fixed rare crash caused by a race condition + +### v1.7.1 +- Fixed broken UI in room password popup + +### v1.7.0 +- Ported to Geode v4.0.0 +- Added **2-player mode room setting**, enabling remote 2-player levels +- Added **level filtering** in the Globed level list +- Introduced compatibility for **outdated mod versions and game versions** +- Allowed **64 characters** in the direct connection popup address +- Added GitHub guides (currently about launch options) +- Added **cheat indicator** in the room creation UI to highlight safe mode settings +- Enhanced error messages for failed web requests +- Improved UI sliders (volume, etc.) +- Enhanced server security & performance +- Revamped packet fragmentation algorithm +- Revamped moderator panel +- Added ability for GDPS owners to override main server URL with several fallbacks +- Fixed crash when joining a room with an unlisted/deleted level +- Fixed minor memory leak when players leave levels +- Fixed crashes with outdated texture packs modifying Globed textures +- Fixed audio recording system logic issues +- Fixed rare crash during game closing +- Fixed multithreading crash when loading into the main menu + +### v1.6.2 +- Fixed crashes on some Windows devices + +### v1.6.1 +- Fixed crash when pressing any key or opening the Globed menu on Mac +- Fixed player list layout issues after leaving a room with a pinned level +- Enabled faster reset for all players in Death Link if the room creator enables it +- Added **verification for Discord linking** +- Showed only 1 badge near a player's name in-game + +### v1.6.0 +- Added ability to **pin specific levels** in a room + - Room creators can now pin levels at the top of the player list in the Globed menu +- Added **changelog popup** showing the latest update details +- Replaced invisibility button with advanced options + - Option to hide yourself from player list, level, or invite list +- Introduced new **Discord bot** for supporters to automatically obtain in-game roles +- Displayed all badges of a player (e.g., **Mod & Booster**) +- Enforced faster reset option in **Death Link** rooms +- Automatically **blocked invites** from blocked users +- Changed player list sorting to **random order** to prevent alt account promotion +- Added **Force Progress Bar** setting for server-connected progress bar +- Removed **Custom Keybinds** dependency from Android +- Improved security Bugfixes: - -* Fixed some login issues (login taking a very long time and sometimes failing for no reason) -* Fixed player names and status icons not rotating together with the camera (i.e. arrow trigger) -* \-- You can return to the old behavior by disabling the "Rotate names" setting -* \-- Thanks [TheSillyDoggo](user:16778880) for implementing this! -* Fixed crash caused by closing the globed menu too fast -* Fixed crash when muting a user that has exited the level -* Fixed room name overlapping other UI elements in the room listing -* Fixed player count going up to 4 digits on android (and cap to 10000 instead of 65535) -* Fixed crash on entering a level when Force Platformer is enabled in Megahack -* Fixed the room listing getting closed when trying to join a room, even if joining fails -* Fixed "Player" with default icons showing up in the player list -* Fixed ship fire showing near invisible players -* Change max web request timeout to be 10 seconds in most places instead of 3 or 5 seconds - -## v1.5.1 - -* Fix Globed not loading on Android due to missing Custom Keybinds dependency - -## v1.5.0 - -* Add a Death Link setting to rooms, which causes all players in the level to die if one of them dies -* \-- **Huge thanks to Alphalaneous for making the DeathLink mod and allowing us to use their idea** -* Add ability for the room owner to close the room (kicks all players) -* Change the Receive Invites From setting to friends only by default instead of everyone -* Fix the player not being disconnected from the server if they log out of their GD account -* Fix crash when closing the featured level list too fast -* Fix spammy error popups on self-hosted servers when no featured level is selected -* Add an age warning to the discord invite button - -## v1.4.5 - -* Add player counts to the featured level list -* Make player names in invites clickable to bring up their profile -* Fix some bugs with the featured level list -* Fix level ordering in the saved tab (again) -* Fix "Receive Invites From" setting crashing the game -* Fix the next arrow button showing on the last page of the featured level list - -## v1.4.4 - -* Add Globed Featured Levels (thanks [Kiba](user:4569963)) -* \-- A level will be chosen every few days to be featured on Globed -* \-- Levels can be rated Featured, Epic and Outstanding -* Levels played on Globed are now put at the top of the saved levels list, rather than the bottom -* Hopefully fix room list not loading on some devices -* Change the icon used in Discord RPC integration to a better one -* Various small fixes and UI changes - -## v1.4.3 - -* Fix crash on ARM MacOS when a player with an animated name is online -* Fix rare crash with devtools -* Add error message when entering wrong room password -* Minor UI changes - -## v1.4.2 - -* Put yourself at the top of the player list (thanks [Kiba](user:4569963)) -* Add integration with the Discord Rich Presence mod -* \-- If you have the mod installed, you will have a special rich presence while playing on Globed -* Playing an unlisted level in the editor will no longer show the level on the level list -* \-- Note: joining an unlisted level NOT through the editor will still cause the level to be shown on the level list, as the game does not know whether the level is unlisted or not. -* Add option to disable multiplayer in the level editor -* Fix crash when completing created levels on ARM MacOS -* Fix server list being broken on MacOS -* Fix joining a room while in a level causing visual glitches until you reopen the level -* Small UI changes and fixes -* Make the main room menu significantly more optimized -* Fix weirdness when opening someone's levels or lists while in a level and then coming back -* Fix hitboxes of mini icons being too big in collision rooms -* Remove version checks when adding a new server -* Small fixes to asset preloading - -## v1.4.1 - -* Add MacOS support -* Improve the room listing (now shows player count/limit and whether the room has collision enabled or a password set) -* Sort room list by player count -* Fix room list not starting at the top -* Fix the Audio Device and Receive Invites From settings not saving when exiting the game -* Fix weirdness when receiving an invite while in a level - -## v1.4.0 - -* Overhaul the room system -* \-- You can now send room invites to other players -* \-- Rooms have various settings, i.e. password, collision, player limit, name, invite-only -* \-- Public room listing that lets you discover rooms without having to be invited -* \-- You can control whether you can be invited by anybody, only friends, or by nobody -* Add user roles -* \-- Staff, supporters, etc. will have special name color, text chat color, and a badge near their name -* \-- Thanks to [LimeGradient](user:7214334), [Terma](user:4706010) and [Capeling](user:18226543) for help! -* Add editor compatibility -* \-- This does **NOT** mean you can build levels together! -* \-- If you are the creator of a level, you will be able to see other people playing while in the editor -* \-- When [EditorCollab by alk1m123](https://github.com/altalk23/EditorCollab) comes out, you will also be able to playtest non-uploaded levels together with others -* \-- Experimental, might have issues -* Add automatic reconnection to the server in case of a disconnect -* Add credits to the globed menu (thanks [TechStudent10](user:20284359) for partial help) -* Fix all unsynced clock issues (auth no longer uses TOTP) -* Fix most "unhandled packet" errors by rewriting networking core -* Fix many connection related bugs -* Ask the user if they want voice chat enabled or not on first startup -* Add a Compressed Player Count setting which changes the "X players" label to be more compact (thanks [Uproxide](user:25397826)!) -* Add support & voice chat guide buttons in the menu (thanks [Kiba](user:4569963) for the design) -* Add a gradient and an icon to your friends on the player list -* Add a way to hide yourself from the player list in menus (thanks [TechStudent10](user:20284359)) -* Redesign the main menus and change textures for many of the icons -* Add much better error messages for outdated clients -* Don't play effects and animations if the player is too far, to decrease lag -* Replace the Overlay settings tab with Menus and move overlay settings into Level UI -* Pin the main server to the top of the server list and disallow deleting or modifying it -* Make some of the UI look better on weird aspect ratios (such as 4:3) -* Fix "already inside of a level" error sometimes appearing when it shouldn't, and add a way to bypass it -* Fix settings menu looking a bit broken due to a Geode update -* Fix the placeholder green icon color being a slightly different shade than the actual default green -* Fix a missing texture crash when asset preloading is disabled -* Fix progress indicator line going out of the progressbar (thanks [Terma](user:4706010)) -* Lots of internal restructuring and rewrites, for improved performance and user experience -* Protocol optimization (slightly less bandwidth usage) -* Change the compiler used for Windows releases - -Some of the features have been co-developed by [ninXout](user:7479054), who has now also become an official Globed developer :) - -## v1.3.7 - -* Add a mysterious button to the room menu -* Fix interpolation issues related to vsync -* Fix being unable to restart a level with the Confirm Restart feature in BetterPause (and other bugs similar to this) - -## v1.3.6 - -* Fix crash on startup on Android - -## v1.3.5 - -* Fix crashes and other weird behavior when opening profiles of others when in a level -* ^ also makes it impossible to open another level while already in a level -* Fix issues with zip file texture packs -* Fix own name setting not working on Mac -* Fix crash when having the confirm quit menu open without a visible pause menu and trying to quit the level (yes this is very specific and there's like 1 person who ever encountered this) -* Fix rare crash when exiting a level -* Fix rare crash when exiting the game - -## v1.3.4 - -* Fix player collision being broken in the editor -* Fix crash when opening player list -* Fix crash when quickly closing the level browser on Android -* Make the icons above players change their opacity too when changing player opacity - -## v1.3.3 - -* Speed up asset preloading even more (death effects now don't preload if they are disabled or if Default death effects is enabled) -* Add a way to hide specific players -* Add an option to load assets when first joining an online level instead of on the loading screen (for Colon) -* Add an option that shows your own name above your icon -* Add ability to copy room IDs by pressing the title -* Death effects and spider animations of other players now play while paused -* Some player animations are now paused when that player is also paused -* Fix some (but not all) crashes related to asset preloading and texture packs -* Fix platformer squish animation looking wrong when jumping sideways from a wall -* Fix (yet again) progressing in levels with start positions - -## v1.3.2 - -* **Improve loading times** - Asset preloading is now up to **3-5 times faster** on Windows (not as fast on other platforms, but still slightly faster) -* Fix rare crash when exiting a level -* Fix some crashes in the level browser on android -* Improve the platformer squish animation slightly -* Make the "outdated client" message more straightforward -* Add player counts to tower levels (**requires** Node IDs mod to be installed first to work) -* Fix progressbar icons having wrong glow when the Colored Icon Kit mod is installed -* Try to fix progressing in levels with startpos (again) -* Try to fix crashes when using a Level Edit hack -* Hide loopback devices from audio settings -* Add a way to manually set packet limit -* Fix players not appearing in a level until you move away from the spawn position - -## v1.3.1 - -* Fix being unable to join a room on some Android devices (due to room ID input being limited to 5 characters) -* Fix the "application was in the background for too long" disconnect error sometimes appearing when it shouldn't -* Fix portal gauntlet progress resetting -* Fix some voice chat crashes on Android -* Fix progressing in levels with start positions -* Fix undeafen notification not showing up in platformers if you had proximity chat on -* Remove voice chat hints on Mac and Android (since you can't really press V there) -* Disable audio device setting on Mac and Android -* Added a report button in the user list that redirects to the Globed Discord -* Server level lists now show up to 30 levels by default, with a new option being added to increase it back to 100 - -## v1.3.0 - -**Add support for Android (both 32-bit and 64-bit) and MacOS!** - -This is a **required** update, and you will not be able to connect to the server until you update the mod. - -Please note that those platforms are not as thoroughly tested, so they may have issues. Additionally, talking in voice chat is **currently impossible** on all platforms except Windows, but you will still be able to hear others. - -Other changes include: - -* Redesign the settings menu to be more convenient (it now has tabs!) -* Enable Lower audio latency by default -* Enable Hide conditionally by default (for ping overlay) -* Add the squish animation for other players whenever they jump in platformer mode -* Add a setting to always show players, even if they are invisible -* Add deafen notifications (can be disabled in settings) -* Add better server messages for failed login attempts -* Add a voice volume slider in the player list on the pause menu -* Add player name colors to the room list -* Slightly improve bandwidth usage by optimizing the protocol -* Made the jump to level button jump to a main level page if it's a classic main level -* Fix the ball icon sometimes being displayed as a cube with Default mini icons enabled -* Fix crashes due to the menu button being removed by another mod -* Fix player count on main levels not animating together with the button -* Fix player count being in a wrong place with Compact Lists installed -* Change the scaling and pop animation of many buttons to look a bit more pretty - -Thank you [Capeling](user:18226543), [ninXout](user:7479054) and [TheSillyDoggo](user:16778880) for their first contributions to the mod in this update :) - -## v1.2.5 - -* Fix crash when browsing levels -* Fix player count label being shown in lists (in a silly place) -* Fix audio test in settings being broken -* Hide player count on levels with no people - -## v1.2.4 - -* Add name colors to player list -* Fix the player count label being displayed when not connected to a server -* Fix player count being displayed in wrong places (like in map pack list) -* Fix the game not closing properly sometimes - -## v1.2.3 - -* Add an option for proximity voice in non-platformer mode -* Add a player count to main levels -* Add player counts to the level browser -* Make it harder to accidentally close an error/notice popup -* Fix dual icon still being visible after exiting dual mode -* Slightly fix the layout of the voice chat overlay cells -* Fix the robot fire staying in the air after death -* Fix name searching in the admin panel - -## v1.2.2 - -* Add a voice overlay to show who's currently speaking -* Don't record audio if voice chat is disabled (oops) -* Try to fix crashes that don't even show an error popup -* Fix a crash when connecting to an invalid server -* Fix login issues when the username has spaces -* Add a setting that lets you change opacity of the icons under the progressbar (or edge of the screen in platformer) -* Scale down the name of a server if it's too long - -## v1.2.1 - -* Refresh server list more often (fixes some crashes and connection issues) -* Make the player list in-game more compact -* Fix some issues with the admin panel - -## v1.2.0 - -* Fix deadlock on packet limit test failure -* Fix audio stack overflow due to high deltatime -* Add a geode setting to disable asset preloading (in case the game doesn't launch) -* Make own icon being above everyone else on the progress bar -* Server owners now have an advanced admin panel to moderate the server - -## v1.1.2 - -* Add player searching in the player list menu -* Fix lag when activating voice chat -* Fix rare audio crashes caused by data races -* Fix crash when changing the Position setting -* Fix crash when editing a central server -* Fix robot fire sometimes randomly appearing in a level -* Fix login failed issue when changing the url of a server - -## v1.1.1 - -* Add pages to the online level list (and fix some levels not appearing) -* Add a Hide Nearby Players setting that allows you to make nearby players transparent -* Fix some more network related issues (specifically keeping the TCP connection alive) -* Fix huge lag related to packet limit & fragmentation -* Fix huge lag when exiting a level -* Fix some audio related issues -* Fix the mute button not working immediately in platformer -* Fix the cube icon being default in levels starting with a non-cube gamemode -* Allow editing the server name even if the server is offline -* Fix being able to quit/resume the level while having the user popup opened on the pause menu -* Fix some lagspikes when recording audio -* Fix crash when connecting to an invalid server - -## v1.1.0 - -Globed now uses a different networking protocol (hybrid TCP/UDP instead of just UDP). This should fix **many (but not all!) of the connection related issues**, such as players not loading in a level, or the player list popup taking an infinite amount of time to load. - -That means this is a **required** update which bumps the protocol version to 2. You will not be able to connect to an updated server without updating the mod to this version. - -If you are a server owner, please read the [server changelog](https://github.com/GlobedGD/globed2/blob/main/server/changelog.md) as there have been some changes to the server. - -Additional changes include: - -* Improve the **account verification** system (and enable it on the main server) -* Fix the freezes/crashes on the loading screen and update the message text at the bottom when loading icons -* Add a connection calibration button in settings (try to use it if you have connection issues) -* (Maybe) fix crash when applying a texture pack with Texture Loader -* Fix audio crash -* Add a volume indicator in the pause menu player list -* Fix the TPS cap setting being impossible to change -* Fix bug with blank names when clicking on a user to open their profile -* Make the mute button work immediately instead of with a delay -* Add an automatic rollback system for a certain save bug related to gauntlets -* ^ in versions before v1.0.5 there used to be a bug that would cause your savefile to have some invalid levels. Now those will be automatically removed on startup. - -## v1.0.5 - -* Preload icons on the loading screen (longer loading time but hopefully a lot less lagspikes in-game now) -* Fix disconnecting when minimizing the game -* Room popup now doesn't auto refresh, and sorts players alphabetically (also your friends are now shown before everyone else!) -* ^ same applies for the in-game player list popup -* Scroll position no longer resets when refreshing a list -* Changed the voice chat volume slider to be ranged from 0% to 200% instead of 100% -* You can now hear yourself when testing audio in settings -* Make asset preloading optional (if you have weird texture bugs, disable it in settings!) -* Hopefully fix a crash when disconnecting the active audio input device -* Maybe fixed death effects crashing the game -* Fix some crashes caused by corrupted data -* Fix gauntlet levels sometimes being broken -* Fix player opacity not working properly on spider and robot -* Add a message indicating how to use voice chat - -## v1.0.4 - -* Make incompatible with More Level Tags (the issues were too hard to fix sorry) -* Make deafening immediate (you will stop hearing others as soon as you press B, no need to wait) -* Fix crashes on old CPUs, now for real - -## v1.0.2 - -* Use github actions for releases (hopefully no more crashes on old CPUs) -* Add a volume slider for voice chat -* Add a button that opens the discord server -* Fixed a crash in the editor -* Fixed an incompatibility with the mod More Level Tags, should no longer crash when opening a level +- Fixed login issues (long login time and occasional failures) +- Fixed player names/status not rotating with camera + - Option to disable name rotation available +- Fixed crash when closing the Globed menu quickly +- Fixed crash when muting players who left the level +- Fixed room name overlapping UI in room listing +- Fixed player count capping at 10000 instead of 65535 +- Fixed crash with **Force Platformer** enabled in Megahack +- Fixed room listing closing when joining a room + +### v1.5.1 +- Fixed Globed not loading on Android due to missing **Custom Keybinds** dependency + +### v1.5.0 +- Added **Death Link** setting to rooms, causing all players to die when one dies +- Added ability for room owners to close rooms (kicks all players) +- Changed default **Receive Invites From** setting to "friends only" +- Fixed player not disconnecting from server when logging out of GD account +- Fixed crash when closing the featured level list too quickly +- Fixed error popups on self-hosted servers when no featured level is selected +- Added **age warning** to Discord invite button + +### v1.4.5 +- Added **player counts** to the featured level list +- Made player names in invites clickable to bring up profiles +- Fixed bugs with the featured level list +- Fixed level ordering in saved tab +- Fixed "Receive Invites From" setting crash + +### v1.4.4 +- Added **Globed Featured Levels** (thanks Kiba) + - Levels rated **Featured**, **Epic**, and **Outstanding** +- Featured levels now appear at the top of saved levels list +- Fixed room list not loading on some devices +- Changed Discord RPC integration icon +- Various small UI fixes + +### v1.4.3 +- Fixed crash on ARM MacOS with animated player names +- Fixed rare crash with devtools +- Added error message when entering wrong room password + +### v1.4.2 +- Displayed yourself at the top of the player list (thanks Kiba) +- Integrated with **Discord Rich Presence mod** + - Special rich presence for players using the mod +- Fixed issue with unlisted levels in editor showing up in the level list +- Added option to **disable multiplayer in level editor** +- Fixed crash when completing created levels on ARM MacOS +- Fixed server list issue on MacOS + +### 1.4.1 +- Added **MacOS support** +- Improved room listing (shows player count/limit, collision settings, password) +- Sorted room list by player count +- Fixed settings not saving when exiting game + +### 1.4.0 +- Overhauled the room system: + - Send room invites to players + - Added password, collision, player limit, and invite-only options + - Public room listing and invite options +- Introduced **user roles** with special badges for staff/supporters +- Added **editor compatibility** (non-collaborative level building) +- Added automatic server reconnection +- Added **credits** to the Globed menu +- Fixed unsynced clock and connection issues +- Added **Force Progress Bar** setting +- Redesigned main menus for better UI + +### 1.3.7 +- Added a mysterious button to the room menu +- Fixed interpolation issues with vsync +- Fixed restarting a level with the **Confirm Restart** feature + +### 1.3.6 +- Fixed crash on startup on Android + +### 1.3.5 +- Fixed crashes when opening other players' profiles in a level +- Fixed texture pack issues with zip files +- Fixed crash when setting the player's name on Mac + +### 1.3.4 +- Fixed player collision issues in the editor +- Fixed crash when opening player list +- Fixed crash when closing level browser on Android + +### 1.3.3 +- Speeded up asset preloading (particularly death effects) +- Added ability to hide specific players +- Fixed animation issues with platformer squish + +### 1.3.2 +- Improved loading times (up to **3-5 times faster**) on Windows +- Fixed rare crashes and asset preloading issues +- Added **player counts** to tower levels + +### 1.3.1 +- Fixed Android issues with room joining +- Fixed **portal gauntlet** progress resetting + +### 1.3.0 +- Added **Android (32/64-bit)** and **MacOS** support +- Redesigned settings menu with tabbed UI +- Added deafen notifications, voice chat improvements +- Fixed oice chat** issues on Mac and Android + +### 1.2.5 +- Fixed crash when browsing levels +- Fixed player count label issues + +### 1.2.4 +- Added name colors in player list +- Fixed player count label and display issues + +### 1.2.3 +- Added **proximity voice** option for non-platformer mode +- Fixed visual glitches and robot fire issues + +### 1.2.2 +- Added voice overlay to show active speakers +- Fixed recording issues when voice chat is disabled + +### 1.2.1 +- Refresh server list more often +- Fixed issues with in-game player list + +### 1.2.0 +- Fixed **deadlock** on packet limit test failure +- Added **Geode setting** to disable asset preloading + +### 1.1.2 +- Added player searching in player list +- Fixed lag and crashes related to voice chat + +### 1.1.1 +- Added pages to the online level list +- Fixed network issues related to keeping TCP connection alive + +### 1.1.0 +- **Networking protocol update** (TCP/UDP hybrid) +- Fixed several connection-related issues +- Added **account verification** + +### 1.0.5 +- Preloaded icons on the loading screen to improve loading speed + +## 1.0.4 +- Make the mod incompatible with More Level Tags (the issues were too hard to fix) +- Make deafening immediate (you will stop hearing others as soon as you press B) +- Fix crashes on old CPUs + +## 1.0.2 +- Use GitHub Actions for releases (hopefully no more crashes on old CPUs) +- Add a volume slider for voice chat +- Add a button that opens the Discord server +- Fixed a crash in the editor +- Fixed an incompatibility with More Level Tags, should no longer crash when opening a level From 1216da0e24188f5a4f667e38c7a767d08dea3f8b Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 18 Dec 2024 18:39:01 +0300 Subject: [PATCH 14/85] my bad --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a2af510a6..138bb8f60 100644 --- a/README.md +++ b/README.md @@ -39,10 +39,10 @@ and the rest of our awesome [contributors](https://github.com/GlobedGD/globed2/g **Special thanks**: -- [MathieuAR](user:3759035) - For providing us with server hosting -- [HJfod](user:104257) - For creating [our website](https://globed.dev) -- [alk1m123](user:11535118) - For collaborating on EditorCollab interoperability -- [Alphalaneous](user:1139015) - For creating the DeathLink mod and allowing us to implement their idea into Globed +- MathieuAR - For providing us with server hosting +- HJfod - For creating [our website](https://globed.dev) +- alk1m123 - For collaborating on EditorCollab interoperability +- Alphalaneous - For creating the DeathLink mod and allowing us to implement their idea into Globed - [Everyone from the Geode Team](https://github.com/orgs/geode-sdk/people) - For developing Geode - Server staff and supporters - For helping shape this mod into what it is today :) From 052c4c749aaa1e79a5f2ecae4e726ccddcb02bde Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 19 Dec 2024 13:23:12 +0300 Subject: [PATCH 15/85] update --- server/readme.md | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/server/readme.md b/server/readme.md index b82054cf4..50be60ed6 100644 --- a/server/readme.md +++ b/server/readme.md @@ -131,20 +131,20 @@ By default, the `central-conf.json` file is created in the current directory whe ```json { - "id": "mod", - "priority": 100, - "badge_icon": "role-mod.png", - "name_color": "#ff0000", - "chat_color": "#ff0000", - "notices": false, - "notices_to_everyone": false, - "kick": false, - "kick_everyone": false, - "mute": false, - "ban": false, - "edit_role": false, - "edit_featured_levels": false, - "admin": false + "id": "mod", // Required + "priority": 100, // Required, determines which roles can edit users with other roles + "badge_icon": "role-mod.png", // Optional, make sure it's a valid sprite + "name_color": "#ff0000", // Optional, name color + "chat_color": "#ff0000", // Optional, color of chat messages + "notices": false, // Optional, ability to send notices (popup messages) + "notices_to_everyone": false, // Optional, ability to send a notice to everyone on the server + "kick": false, // Optional, ability to kick users from the server + "kick_everyone": false, // Optional, ability to kick everyone from the server + "mute": false, // Optional, ability to mute/unmute + "ban": false, // Optional, ability to ban/unban & whitelist (on whitelist enabled servers) + "edit_role": false, // Optional, ability to change roles of a user + "edit_featured_levels": false, // Optional, ability to edit featured levels + "admin": false // Optional, implicitly enables all other permissions } ``` @@ -152,6 +152,8 @@ By default, the `central-conf.json` file is created in the current directory whe You can create color transitions for names by using a special format, e.g., setting `name_color` to `#ff0000 > 00ff00 > 0000ff` will make the name fade between red, green, and blue. +Keep in mind that there is a limit of 8 colors. + ### Rocket.toml Configuration When starting the server, a `Rocket.toml` file is generated, typically in the current working directory (or the directory specified by `ROCKET_CONFIG`). This file is used for configuring the HTTP port and database path, among other settings. Refer to [Rocket documentation](https://rocket.rs/guide/v0.5/configuration/#rocket-toml) for further configuration options. @@ -168,6 +170,14 @@ cargo build --release ## Extra Configuration -In release builds, the default log levels are set to `Info`, `Warn`, and `Error`. To change the log level, set the environment variable `GLOBED_LOG_LEVEL` for the central server or `GLOBED_GS_LOG_LEVEL` for the game server. Possible values include: `trace`, `debug`, `info`, `warn`, `error`, `none`. +In release builds, the default log levels are set to `Info`, `Warn`, and `Error`. To adjust the log level, set the environment variable `GLOBED_LOG_LEVEL` for the central server or `GLOBED_GS_LOG_LEVEL` for the game server. This variable defines the **minimum** log level, meaning that setting it to `Trace` will enable all log levels, from `Trace` up to `Error`. + +The possible log levels are: +- `Trace` (shows all log messages, including `Trace`, `Debug`, `Info`, `Warn`, and `Error`) +- `Debug` +- `Info` +- `Warn` +- `Error` +- `None` (disables all logs) To disable logging to a file, set `GLOBED_NO_FILE_LOG` to a nonzero value. From e1620926525c38a022a3ab9f2f5f6e53cd3b022a Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 19 Dec 2024 13:28:41 +0300 Subject: [PATCH 16/85] fix --- mod.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod.json b/mod.json index 2ff43a7a1..73f6f50f3 100644 --- a/mod.json +++ b/mod.json @@ -2,7 +2,7 @@ "id": "dankmeme.globed2", "name": "Globed", "developer": "dankmeme", - "geode": "4.1.0", + "geode": "4.1.1", "version": "v1.7.2", "gd": { "win": "2.2074", From 2b622833d41c541c8bb3107bf52975edd539d716 Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 19 Dec 2024 13:29:14 +0300 Subject: [PATCH 17/85] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 1627d5463..d08af9434 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 dank_meme +Copyright (c) 2024 dank_meme Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 50d183df7a781bbc71a5326fd84faa6eb2f5e633 Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 19 Dec 2024 16:35:25 +0300 Subject: [PATCH 18/85] reformat --- cmake/baked_resources_gen.cmake | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cmake/baked_resources_gen.cmake b/cmake/baked_resources_gen.cmake index 7304b3f55..f1353cb3e 100644 --- a/cmake/baked_resources_gen.cmake +++ b/cmake/baked_resources_gen.cmake @@ -1,11 +1,7 @@ -function (generate_baked_resources_header JSON_FILE HEADER_FILE) - # read the file +function(generate_baked_resources_header JSON_FILE HEADER_FILE) file(READ ${JSON_FILE} JSON_CONTENT) - - # check md5 string(MD5 JSON_HASH "${JSON_CONTENT}") - # do not regenerate the file unless the json was changed if (EXISTS "${HEADER_FILE}" AND EXISTS "${HEADER_FILE}.md5") file(READ "${HEADER_FILE}.md5" JSON_FS_HASH) @@ -26,14 +22,11 @@ function (generate_baked_resources_header JSON_FILE HEADER_FILE) string(APPEND HEADER_CONTENT "constexpr inline const char* stringbyhash(uint32_t hash) {\n") string(APPEND HEADER_CONTENT " switch (hash) {\n") - # fucking kill me string(REGEX MATCHALL "\"([^\"]+)\"[ \t]*:" JSON_KEYS ${JSON_OBJECT}) foreach(CKEY ${JSON_KEYS}) string(REGEX REPLACE "\"([^\"]+)\"[ \t]*:" "\\1" KEY ${CKEY}) - string(JSON VALUE GET ${JSON_OBJECT} ${KEY}) - string(APPEND HEADER_CONTENT " case util::crypto::adler32(\"${KEY}\"): return \"${VALUE}\";\n") endforeach() From 1cb60126e442473840fb869722f13940e2f76005 Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 19 Dec 2024 16:35:56 +0300 Subject: [PATCH 19/85] Update CMakeLists.txt --- CMakeLists.txt | 107 +++++++++---------------------------------------- 1 file changed, 20 insertions(+), 87 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0450943f..73b29a72b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,48 +1,41 @@ cmake_minimum_required(VERSION 3.21) + set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_VISIBILITY_PRESET hidden) -project(globed2 VERSION 1.0.1) +project(globed2 VERSION 1.0.0) -# set ios archs if (${CMAKE_SYSTEM_NAME} STREQUAL "iOS") - message(STATUS "building for ios") unset(CMAKE_OSX_ARCHITECTURES) set(CMAKE_OSX_ARCHITECTURES "arm64") set(CMAKE_OSX_DEPLOYMENT_TARGET "14.0") set(CMAKE_SYSTEM_NAME "iOS") else() - message(STATUS "building for mac") set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64") endif() option(GLOBED_OSS_BUILD "Open source build that does not require closed-source dependencies" OFF) option(GLOBED_NATIVE_ARCH "Native architecture build" OFF) -# on windows use precompiled, on other platforms compile libsodium if (WIN32) option(GLOBED_COMPILE_LIBS "Don't use precompiled libraries and compile manually" OFF) else() option(GLOBED_COMPILE_LIBS "Don't use precompiled libraries and compile manually" ON) endif() -# check if compiler is clang if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(GLOBED_IS_CLANG ON) else() set(GLOBED_IS_CLANG OFF) endif() -# check if it's clang-cl or clang if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU") set(GLOBED_IS_CLANG_CL OFF) else() set(GLOBED_IS_CLANG_CL ON) endif() - -# Check for debug build option(ENABLE_DEBUG "Debug mode" OFF) option(GLOBED_RELEASE "Release build" OFF) @@ -50,30 +43,14 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR "${CMAKE_BUILD_TYPE}asdf" STREQUAL "asd set(GLOBED_IS_DEBUG ON) endif() -# Debug/Release options if (GLOBED_IS_DEBUG) add_compile_definitions(GLOBED_DEBUG=1) add_compile_definitions(GEODE_DEBUG=1) add_compile_definitions(ASP_ENABLE_DEBUG=1) - - # # turn on asan - # if (GLOBED_IS_CLANG) - # if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/libs/stl_asan.lib") - # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address") - # set(GLOBED_LINK_TO_ASAN ON) - # endif() - - # # no omit frame pointer - # if (NOT GLOBED_IS_CLANG_CL) - # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer") - # endif() - # endif() elseif (GLOBED_RELEASE) - # Enable LTO in release (2.5x less binary size, costs only a few extra seconds of build time) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) endif() -# add thingies depending on the current system if (ANDROID) file(GLOB_RECURSE OS_SOURCES "src/platform/os/android/*.cpp" "src/platform/arch/arm/*.cpp") elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS") @@ -86,27 +63,25 @@ else() message(FATAL_ERROR "Unsupported operating system") endif() -# source files file(GLOB_RECURSE SOURCES - src/audio/*.cpp - src/crypto/*.cpp - src/data/*.cpp + src/audio/*.cpp + src/crypto/*.cpp + src/data/*.cpp src/globed/*.cpp - src/game/*.cpp - src/hooks/*.cpp - src/managers/*.cpp - src/net/*.cpp - src/ui/*.cpp - src/util/*.cpp - src/main.cpp + src/game/*.cpp + src/hooks/*.cpp + src/managers/*.cpp + src/net/*.cpp + src/ui/*.cpp + src/util/*.cpp + src/main.cpp ${OS_SOURCES} ) add_library(${PROJECT_NAME} SHARED ${SOURCES}) -# Windows - do stuff if (CMAKE_SYSTEM_NAME STREQUAL "Windows") - add_compile_definitions(WIN32_LEAN_AND_MEAN=1) # geode moment + add_compile_definitions(WIN32_LEAN_AND_MEAN=1) if (NOT MSVC) set(GLOBED_WINDOWS_CLANG ON) endif() @@ -116,7 +91,6 @@ if (GLOBED_RELEASE) target_compile_definitions(${PROJECT_NAME} PRIVATE GLOBED_RELEASE=1) endif() -# export some symbols target_compile_definitions(${PROJECT_NAME} PRIVATE GLOBED_EXPORTING) if (CMAKE_HOST_SYSTEM MATCHES "Linux" AND CMAKE_SYSTEM_NAME STREQUAL "Windows") @@ -131,29 +105,24 @@ endif() add_subdirectory($ENV{GEODE_SDK} ${CMAKE_CURRENT_BINARY_DIR}/geode) -# done so you can include root files with target_include_directories(${PROJECT_NAME} PRIVATE src/) target_include_directories(${PROJECT_NAME} PRIVATE libs/) -# our favorite libraries -CPMAddPackage("gh:dankmeme01/uibuilder#c30755a") +CPMAddPackage("gh:camila314/uibuilder#3d10e3d") CPMAddPackage( NAME Boost - VERSION 1.86.0 - URL https://github.com/boostorg/boost/releases/download/boost-1.86.0/boost-1.86.0-cmake.7z - URL_HASH SHA256=ee6e0793b5ec7d13e7181ec05d3b1aaa23615947295080e4b9930324488e078f - OPTIONS "BOOST_ENABLE_CMAKE ON" "BOOST_INCLUDE_LIBRARIES describe\\\;stacktrace\\\;thread" # escape with \\\; + VERSION 1.87.0 + URL https://github.com/boostorg/boost/releases/download/boost-1.87.0/boost-1.87.0-cmake.7z + URL_HASH SHA256=61d61a3f33283bab8f3736745a4e47c37141f07e413986cd05d1f942c69d529a + OPTIONS "BOOST_ENABLE_CMAKE ON" "BOOST_INCLUDE_LIBRARIES describe\\;stacktrace\\;thread" ) CPMAddPackage("gh:dankmeme01/asp2#2378a82") -# asp defines if (WIN32) if (GLOBED_IS_DEBUG) - # debug target_compile_definitions(asp PRIVATE _HAS_ITERATOR_DEBUGGING=0) endif() - # thingy target_compile_definitions(asp PRIVATE ASP_ENABLE_FORMAT=1) target_compile_definitions(${PROJECT_NAME} PRIVATE ASP_ENABLE_FORMAT=1) endif() @@ -165,30 +134,15 @@ include(cmake/baked_resources_gen.cmake) generate_baked_resources_header("${CMAKE_CURRENT_SOURCE_DIR}/embedded-resources.json" "${CMAKE_CURRENT_BINARY_DIR}/globed-codegen/embedded_resources.hpp") if (GLOBED_NATIVE_ARCH) - # Apply native architecture add_compile_options("-march=native") endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") target_compile_options(${PROJECT_NAME} PRIVATE "-Wno-deprecated-declarations") - # target_compile_options(${PROJECT_NAME} PRIVATE "-ftime-trace") - # target_compile_options(asp PRIVATE "-ftime-trace") - # if (WIN32) - # target_compile_options(${PROJECT_NAME} PRIVATE "-Wno-vla-cxx-extension") - # endif() endif() target_link_libraries(${PROJECT_NAME} UIBuilder Boost::describe Boost::thread asp) -# if (GLOBED_LINK_TO_ASAN) -# target_link_libraries( -# ${PROJECT_NAME} -# "${CMAKE_CURRENT_SOURCE_DIR}/libs/stl_asan.lib" -# "${CMAKE_CURRENT_SOURCE_DIR}/libs/clang_rt.asan_dynamic-x86_64.lib" -# "${CMAKE_CURRENT_SOURCE_DIR}/libs/clang_rt.asan_dynamic_runtime_thunk-x86_64.lib" -# ) -# endif() - if (GLOBED_IS_DEBUG) target_link_libraries(${PROJECT_NAME} Boost::stacktrace) endif() @@ -197,14 +151,12 @@ if (GLOBED_COMPILE_LIBS) CPMAddPackage("gh:dankmeme01/libsodium-cmake#226abba") CPMAddPackage("gh:xiph/opus#v1.5.2") - # disable some warnings if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") target_compile_options(sodium PRIVATE "-Wno-inaccessible-base" "-Wno-pointer-sign" "-Wno-user-defined-warnings") endif() target_link_libraries(${PROJECT_NAME} sodium opus) else() - # download headers (binaries based off of 1.0.20 too) CPMAddPackage( NAME sodium GIT_REPOSITORY "https://github.com/jedisct1/libsodium.git" @@ -229,40 +181,26 @@ else() set(SODIUM_VERSION_IN "${CMAKE_CURRENT_SOURCE_DIR}/libs/sodium/version.h") set(SODIUM_VERSION_OUT "${sodium_SOURCE_DIR}/src/libsodium/include/sodium/") - if (NOT EXISTS "${SODIUM_VERSION_OUT}/version.h") - message(STATUS "Copied version.h to ${SODIUM_VERSION_OUT}") file(COPY "${SODIUM_VERSION_IN}" DESTINATION "${SODIUM_VERSION_OUT}") - else() - file(READ "${SODIUM_VERSION_IN}" CONTENT_IN) - file(READ "${SODIUM_VERSION_OUT}/version.h" CONTENT_OUT) - - if (NOT "${CONTENT_IN}" STREQUAL "${CONTENT_OUT}") - message(STATUS "Copied version.h to ${SODIUM_VERSION_OUT}") - file(COPY "${SODIUM_VERSION_IN}" DESTINATION "${SODIUM_VERSION_OUT}") - endif() endif() - target_link_libraries(${PROJECT_NAME} sodium opus) + target_link_libraries(${PROJECT_NAME} sodium opus) endif() -# Windows - link to winsock and wmi if (WIN32) target_link_libraries(${PROJECT_NAME} ws2_32) endif() -# Apple - link to iokit if (APPLE) find_library(IOKIT_LIBRARY IOKit) target_link_libraries(${PROJECT_NAME} ${IOKIT_LIBRARY}) endif() -# link to libcurl - CPMAddPackage( NAME curl GIT_REPOSITORY "https://github.com/curl/curl.git" - GIT_TAG "curl-8_11_0" + GIT_TAG "curl-8.11.1_1" DOWNLOAD_ONLY YES ) @@ -282,7 +220,6 @@ endif() target_compile_definitions(${PROJECT_NAME} PRIVATE CURL_STATICLIB=1) -# we are kinda leeching off of geode but we can always snatch those libraries in the future if (WIN32) set_target_properties(curl PROPERTIES IMPORTED_LOCATION "$ENV{GEODE_SDK}/loader/include/link/${LIB_PLATFORM}/libcurl.lib") else() @@ -293,18 +230,14 @@ target_include_directories(${PROJECT_NAME} PRIVATE "${curl_SOURCE_DIR}/include") target_link_libraries(${PROJECT_NAME} curl) -# mac needs this for curl if (APPLE) target_link_libraries(${PROJECT_NAME} z) elseif (WIN32) - # windows needs this ig? target_link_libraries(${PROJECT_NAME} crypt32) elseif (ANDROID) target_link_libraries(${PROJECT_NAME} android) endif() - -# link to bb if (GLOBED_OSS_BUILD) message(STATUS "Building open-source version, not linking to bb") target_compile_definitions(${PROJECT_NAME} PRIVATE GLOBED_OSS_BUILD=1) From d78397135a77ebc0caac6731a8e9da635c686fc3 Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 19 Dec 2024 16:42:02 +0300 Subject: [PATCH 20/85] my bad --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73b29a72b..6b94ad7e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,7 +200,7 @@ endif() CPMAddPackage( NAME curl GIT_REPOSITORY "https://github.com/curl/curl.git" - GIT_TAG "curl-8.11.1_1" + GIT_TAG "curl-8_11_1" DOWNLOAD_ONLY YES ) From 82fc0a9c2a9b667720de1b240f51a4460463f634 Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 19 Dec 2024 17:18:28 +0300 Subject: [PATCH 21/85] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b94ad7e7..6e4be42d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ CPMAddPackage( VERSION 1.87.0 URL https://github.com/boostorg/boost/releases/download/boost-1.87.0/boost-1.87.0-cmake.7z URL_HASH SHA256=61d61a3f33283bab8f3736745a4e47c37141f07e413986cd05d1f942c69d529a - OPTIONS "BOOST_ENABLE_CMAKE ON" "BOOST_INCLUDE_LIBRARIES describe\\;stacktrace\\;thread" + OPTIONS "BOOST_ENABLE_CMAKE ON" "BOOST_INCLUDE_LIBRARIES describe\\\;stacktrace\\\;thread" ) CPMAddPackage("gh:dankmeme01/asp2#2378a82") From 0a448ce4e6b48099d16a866a08abc1f0668a8310 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:00:36 +0300 Subject: [PATCH 22/85] Update From a53304880224b7f6f189da0b2d095273f7bb31b3 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:01:12 +0300 Subject: [PATCH 23/85] im stupid --- llgvis/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llgvis/readme.md b/llgvis/readme.md index 8fa919712..768873e81 100644 --- a/llgvis/readme.md +++ b/llgvis/readme.md @@ -1,3 +1,3 @@ # llgvis -interpolation log visualiser \ No newline at end of file +Interpolation log visualiser From 1b7e4fb7c3f1181528fe59d8bf8cb3145c71a486 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:04:29 +0300 Subject: [PATCH 24/85] Update From e294acee0d1072b51e4d19d47e213b174d0d0f47 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:14:02 +0300 Subject: [PATCH 25/85] Update From c031e05e5fb15a758a52aec0c0696ec58e87f98d Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:14:44 +0300 Subject: [PATCH 26/85] Update From 3f3481772f2287dbf51e886ba9dcf78790b8fb49 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:17:48 +0300 Subject: [PATCH 27/85] Update From 859dd4d0755fb05b7ceec7a754720f1e8c62d332 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:18:19 +0300 Subject: [PATCH 28/85] Update From c33d97d775711145fe2550b5a13466ba5782da84 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:21:16 +0300 Subject: [PATCH 29/85] Update From 498be516af97d65ecb1d3359b43b9a1cbab7244d Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:42:08 +0300 Subject: [PATCH 30/85] yes --- src/platform/os/windows/misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/os/windows/misc.cpp b/src/platform/os/windows/misc.cpp index 22b8cec6e..6061c32c1 100644 --- a/src/platform/os/windows/misc.cpp +++ b/src/platform/os/windows/misc.cpp @@ -48,7 +48,7 @@ static std::string getMachineGuid() { return std::string(data, data + dataSize - 1); } -// thanks to Prevter - https://github.com/Prevter/BetterCrashlogs/blob/bf6ae0056cdfed6fc9ec3612387c1751d6807707/src/utils/hwinfo.cpp#L62 +// thanks to Prevter - https://github.com/Prevter/BetterCrashlogs/blob/main/src/utils/hwinfo.cpp#L60 static std::string getCPUName() { std::array integerBuffer = {}; constexpr size_t sizeofIntegerBuffer = sizeof(int) * integerBuffer.size(); From 231104cc50d3e3ba5d7e810bccde179cb54a3d75 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:43:04 +0300 Subject: [PATCH 31/85] why empty space --- src/platform/os/mac/misc.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/platform/os/mac/misc.cpp b/src/platform/os/mac/misc.cpp index c6419a5d8..e8e668726 100644 --- a/src/platform/os/mac/misc.cpp +++ b/src/platform/os/mac/misc.cpp @@ -9,7 +9,6 @@ using util::misc::UniqueIdent; static std::string getUuid() { - io_registry_entry_t ioRegistryRoot = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/"); CFStringRef uuidCf = (CFStringRef)IORegistryEntryCreateCFProperty(ioRegistryRoot, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0); IOObjectRelease(ioRegistryRoot); From 79fecfb1b27797175e81f10c0ca5f3c535ed03ab Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 20 Dec 2024 13:55:11 +0300 Subject: [PATCH 32/85] Update --- server/central/src/allowed_ranges.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/central/src/allowed_ranges.txt b/server/central/src/allowed_ranges.txt index 03e9c812c..44a54a67f 100644 --- a/server/central/src/allowed_ranges.txt +++ b/server/central/src/allowed_ranges.txt @@ -4,10 +4,10 @@ # In debug or with the "cloudflare_protection" option disabled this file has no impact on anything, no IP addresses will be blocked. # # Use hashtags for comments and separate ranges by newlines. Start with 'v4' or 'v6' depending if it's IPv4 or IPv6. -# NOTE: these are included in the executable at compile time. If you want to change anything here, you have to recompile the server. +# NOTE: These are included in the executable at compile time. If you want to change anything here, you have to recompile the server. -# List of cloudflare IP ranges (from https://www.cloudflare.com/ips/): -# Updated 2023-11-17 +# List of Cloudflare IP ranges (from https://www.cloudflare.com/ips/): +# Updated 2024-12-20 v4 103.21.244.0/22 v4 103.22.200.0/22 @@ -35,4 +35,4 @@ v6 2c0f:f248::/32 # Custom addresses -v4 127.0.0.0/8 \ No newline at end of file +v4 127.0.0.0/8 From 40488954adda475dfa9ad9ccc5f27c77bf8fc6be Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 15:06:50 +0300 Subject: [PATCH 33/85] Update --- server/central/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/central/Cargo.toml b/server/central/Cargo.toml index d79d4662e..fb1345583 100644 --- a/server/central/Cargo.toml +++ b/server/central/Cargo.toml @@ -12,7 +12,7 @@ digest = "0.11.0-pre.9" ipnet = "2.10.1" iprange = "0.6.7" serde = { version = "1.0.216", features = ["serde_derive"] } -serde_json = "1.0.133" +serde_json = "1.0.134" tokio = { version = "1.42.0", features = ["full"] } json_comments = "0.2.2" rocket = { version = "0.5.1", features = ["json"] } From 8b795ef44aa98fb3370d21fcee99fe64a4a62dec Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 15:07:46 +0300 Subject: [PATCH 34/85] Update --- server/derive/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/derive/Cargo.toml b/server/derive/Cargo.toml index 68a45441d..af3fbcc2e 100644 --- a/server/derive/Cargo.toml +++ b/server/derive/Cargo.toml @@ -10,4 +10,4 @@ proc-macro = true darling = "0.20.10" proc-macro2 = "1.0.92" quote = "1.0.37" -syn = { version = "2.0.90", features = ["full"] } +syn = { version = "2.0.91", features = ["full"] } From 7f84bfebd67d0d675253f875e49ae0debe5a2431 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 15:15:48 +0300 Subject: [PATCH 35/85] Update From 6d0f062e4efac71ee2cd598a82d2ed803d101b37 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 15:16:12 +0300 Subject: [PATCH 36/85] also rewrite --- server/esp/readme.md | 96 ++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 56 deletions(-) diff --git a/server/esp/readme.md b/server/esp/readme.md index fc7180635..d4f64d932 100644 --- a/server/esp/readme.md +++ b/server/esp/readme.md @@ -1,14 +1,12 @@ # esp -lightweight binary serialization library. derive macros for `Encodable`, `Decodable`, `StaticSize` and `DynamicSize` will be found in the `derive` crate, not here. +`esp` is a lightweight binary serialization library. It provides derive macros for `Encodable`, `Decodable`, `StaticSize`, and `DynamicSize` found in the `derive` crate, not here. -name meaning - **e**fficient **s**erialization **p**rotocol + a play on the stack pointer register on x86 since the crate also provides types like `FastByteBuffer` and `FastString` making heapless encoding easier. +The name stands for **e**fficient **s**erialization **p**rotocol, and is also a play on the x86 stack pointer register, as the crate includes types like `FastByteBuffer` and `FastString`, which make heapless encoding easier. ## Encodable and Decodable -it's just encoding structs to binary data. or the other way around. do i really need to say more - -though, one special feature is bitfield structs. they are done like this: +`esp` enables encoding structs to binary data and decoding them back. While this may sound simple, one special feature of the library is its support for **bitfield structs**. Bitfields can be defined as follows: ```rust #[derive(Encodable, Decodable, StaticSize)] @@ -25,83 +23,69 @@ assert!(Flags::ENCODED_SIZE == 2); // without `size = 2` would've been 1 byte, w ## StaticSize and DynamicSize -Short primer on those traits - - -`StaticSize` is a trait with a single constant integer, so there is zero runtime overhead and any usages can be inlined. However it is imprecise and only indicates the *maximum* permitted size, which means that after calling `buffer.write_value(val: &T) where T: StaticSize`, the amount of bytes written is equal to *or less than* `T::ENCODED_SIZE`. - -`DynamicSize` is a trait with a non-static method, which is used to calculate the precise encoded size. If the object hasn't been mutated between the two calls, there is a guarantee that the result of `val.encoded_size()` will be exactly the amount of bytes written with `buffer.write_value(&val)`. This precision, however, comes with a downside of a runtime calculation, as this will have to go through every struct member and check their sizes in order to calculate the exact size of the encoded data. +### `StaticSize` +`StaticSize` is a trait with a single constant integer, which introduces zero runtime overhead, and all usages can be inlined. However, it is imprecise, as it only indicates the *maximum* size allowed. Therefore, the bytes written by `buffer.write_value(val: &T) where T: StaticSize` will be less than or equal to `T::ENCODED_SIZE`. -It is encouraged that every type (except for packets) that implements `StaticSize` must also implement `DynamicSize`, or else it would not be possible to derive `DynamicSize` for a struct containing such types. For efficiency purposes, the crate provides `dynamic_size_as_static_impl!` macro which would automatically implement `DynamicSize` for a struct that implements `StaticSize`, and that implementation would just return the static size instead of doing any calculations. That is also available as a derive macro atribute `#[dynamic_size(as_static = true)]` +### `DynamicSize` +`DynamicSize` is a trait with a method used to calculate the precise encoded size. If the object hasn't been mutated, `val.encoded_size()` will return the exact amount of bytes written by `buffer.write_value(&val)`. However, calculating this involves runtime overhead, as the method must check the size of every struct member to calculate the precise encoded data size. -Implementer guide (only needed if you can't or don't want to derive): +### Implementing StaticSize and DynamicSize +For efficiency, it’s recommended that every type (except for packets) implementing `StaticSize` should also implement `DynamicSize`. The crate offers the `dynamic_size_as_static_impl!` macro to automatically implement `DynamicSize` for a type that implements `StaticSize`, which will return the static size instead of calculating it. -* If the size is known to be a constant N, implement both traits to return N. -* If the size is known to be from 0 to N (inclusive), and N is small enough that memory allocation overhead doesn't matter, implement `StaticSize` to be N, and implement `DynamicSize` to calculate and return the exact encoded size. -* If the size is too unpredictable (for example `Vec` which has unlimited size), only implement `DynamicSize`. +#### Implementation Guide: +- If the size is known to be a constant N, implement both `StaticSize` and `DynamicSize` to return N. +- If the size varies from 0 to N and memory overhead is minimal, implement `StaticSize` as N and `DynamicSize` to return the exact size. +- If the size is unpredictable (e.g., `Vec` with unlimited elements), only implement `DynamicSize`. -You should **not** use `StaticSize`/`ENCODED_SIZE` *at all* when implementing `DynamicSize`, except for types that have an *actual constant size* (like primitive integers). For example, do not implement `DynamicSize` for `Vec` with the implementation `self.len() * T::ENCODED_SIZE`. This is a bad idea, and while it may work properly for something like `Vec`, it will produce incorrect results for something like `Vec>`. The entire point of `DynamicSize` is to be *accurate*, whereas `StaticSize` is made to be *fast*. +**Important**: You should not use `StaticSize`/`ENCODED_SIZE` when implementing `DynamicSize` (except for types with a constant size like primitive integers). For example, avoid implementing `DynamicSize` for `Vec` using the formula `self.len() * T::ENCODED_SIZE`, as it will lead to incorrect results in certain cases (e.g., `Vec>`). -## Ready implementations +## Ready Implementations -`esp` provides the implementations of `Encodable`, `Decodable`, and optionally `StaticSize` and/or `DynamicSize` depending on the type, for all the following types: +`esp` provides implementations for `Encodable`, `Decodable`, and optionally `StaticSize` and/or `DynamicSize` for the following types: -* Primitive integers (`bool`, `u8`, `u16`, `u32`, `u64`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64`) -* `str` -* `String` -* `Option` -* `Result` -* `[T; N]` -* `[T]` -* `Vec` -* `HashMap` -* `Ipv4Addr` -* `SocketAddrV4` -* `(T1, T2)` +- Primitive integers: `bool`, `u8`, `u16`, `u32`, `u64`, `i8`, `i16`, `i32`, `i64`, `f32`, `f64` +- `str`, `String` +- `Option`, `Result` +- Arrays and slices: `[T; N]`, `[T]` +- `Vec` +- `HashMap` +- `Ipv4Addr`, `SocketAddrV4` +- Tuples: `(T1, T2)` -Variable-size types (strings, `Vec`, `HashMap`, etc.) are prefixed with a `esp::VarLength` (currently alias to `u16`) indicating the length. This means they cannot contain more than 65535 elements. +Variable-size types like `String`, `Vec`, and `HashMap` are prefixed with a `esp::VarLength` (currently an alias for `u16`), indicating the length. This means they can store no more than 65535 elements. -## New types +## New Types -`esp` also adds a few new types, which are optimized specifically for the purpose of encoding or decoding, but can also be used for other purposes. +`esp` introduces several types optimized for encoding/decoding, but they can also serve other purposes: ### FastString +`FastString` is a Small String Optimization (SSO) class that can store up to 63 characters inline, resorting to heap allocation only when larger storage is required. It can be easily converted to and from a `String` or `&str`. -`FastString` is an SSO string class that can store up to 63 characters inline, and will use heap allocation if bigger storage is required. It can be easily converted to and from a `String` or `&str` if needed. - -When encoded, the actual representation is no different from `String` or `&str`, so its main purpose is just avoiding heap allocation. - -### InlineString - -`InlineString` is an even simpler string class, that unlike `FastString` stores all the data inline - never does any heap allocation. +When encoded, `FastString` behaves identically to `String` or `&str`, but its main advantage is avoiding heap allocation when the string is small. -Do keep in mind that if you try to mutate the string and the size goes above `N`, the program will panic. To avoid that, use `extend_safe` or manually check the size and capacity of the string before mutating. +### InlineString +`InlineString` is a simpler string type that stores all the data inline, never using heap allocation. However, if the string exceeds the defined size (`N`), the program will panic. Use `extend_safe` or manually check the size and capacity before mutating the string to avoid panics. ### FastVec - -Similar to `InlineString`, `FastVec` is a class with similar API to `Vec`, except it uses no heap storage and can store up to `N` elements, at which point adding any more will cause the program to panic. Just like `InlineString`, it also has `safe_` APIs that instead return an error on failure. +`FastVec` is similar to `InlineString`, but it is a vector-like type that can hold up to `N` elements without allocating on the heap. Adding more than `N` elements causes a panic. It also includes safe APIs like `safe_` that return an error on failure. ### Either - -Essentially `Result` but with a less misleading name, indicating that both outcomes are a success. +`Either` is a type similar to `Result`, but it conveys the idea of two possible successful outcomes instead of one error and one success. ### FiniteF32, FiniteF64 - -Simple wrappers around `f32` and `f64` with the only difference being that they will return a `DecodeError` if the value is `nan` or `+inf`/`-inf` when decoding. +These are simple wrappers around `f32` and `f64` that return a `DecodeError` if the value is `NaN` or `±inf` during decoding. ### Bits - -Structure that holds a bitfield of flags. For example, `Bits<2>` and `u16` have the same size, but the former will never be byteswapped on a non-big-endian system, and also provides user-friendly APIs for managing bits. +`Bits` holds a bitfield of flags. For example, `Bits<2>` and `u16` occupy the same size, but the former ensures that the flags are never byte-swapped on non-big-endian systems and offers more user-friendly APIs for managing bits. ### Vec1L - -Simple wrapper around Vec that can hold up to 255 elements and the length is encoded as a single byte. +A wrapper around `Vec` that can hold up to 255 elements, with the length encoded as a single byte. ### RemainderBytes +This type must be placed at the end of a struct and will simply store any remaining data in the buffer. -Must be put at the end of a struct, the value will simply be the remaining data in the buffer. - -## Additional notes +## Additional Notes -The library wraps around `ByteBuffer` and `ByteReader` from the crate `bytebuffer` and extends them both with traits `ByteBufferExt`, `ByteBufferExtRead`, `ByteBufferExtWrite`. These have a lot of useful methods, but due to derive macros, you often don't have to manually use those. +The library extends `ByteBuffer` and `ByteReader` from the `bytebuffer` crate with the `ByteBufferExt`, `ByteBufferExtRead`, and `ByteBufferExtWrite` traits. These extensions provide useful methods, though the derive macros often eliminate the need to manually use them. -One notable addition is methods `ByteBufferExtWrite::append_self_checksum` and `ByteBufferExtRead::validate_self_checksum`. The former calculates an Adler-32 checksum of all the data in the buffer, encodes it as a 32-bit unsigned integer, and writes it at the current position of the buffer. The latter method decodes that checksum and verifies that the data in the buffer matches, otherwise raising a `DecodeError`. \ No newline at end of file +A key addition is the `ByteBufferExtWrite::append_self_checksum` and `ByteBufferExtRead::validate_self_checksum` methods. The first calculates an Adler-32 checksum of the buffer’s data, encodes it as a 32-bit unsigned integer, and writes it. The latter method validates the checksum during decoding and raises a `DecodeError` if the data doesn’t match the checksum. From 9e1efd6e55dca7ee6344275b356a9f137d2957e8 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 15:19:14 +0300 Subject: [PATCH 37/85] Update --- server/game/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/game/Cargo.toml b/server/game/Cargo.toml index 37b988d0e..f692195cf 100644 --- a/server/game/Cargo.toml +++ b/server/game/Cargo.toml @@ -12,7 +12,7 @@ alloca = "0.4.0" ctrlc = "3.4.5" rustc-hash = "2.1.0" serde = { version = "1.0.216", features = ["serde_derive"] } -serde_json = "1.0.133" +serde_json = "1.0.134" futures-util = "0.3.31" console-subscriber = { version = "0.4.1", features = ["parking_lot"] } From cfd9e08c265a018d23195b68c5c34d9e09e3a8fd Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 15:19:43 +0300 Subject: [PATCH 38/85] Update From 8c8fb9ee06c3e92fddba6e72d1067e5bd6e61f9d Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 15:22:01 +0300 Subject: [PATCH 39/85] Update --- server/shared/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/shared/Cargo.toml b/server/shared/Cargo.toml index ae60ac9a8..96f06517f 100644 --- a/server/shared/Cargo.toml +++ b/server/shared/Cargo.toml @@ -7,7 +7,7 @@ edition = "2024" esp = { path = "../esp" } globed-derive = { path = "../derive" } -anyhow = "1.0.94" +anyhow = "1.0.95" base64 = "0.22.1" colored = "2.2.0" crypto_box = { version = "0.9.1", features = ["std", "chacha20"] } @@ -23,5 +23,5 @@ sha2 = "0.11.0-pre.4" time = { version = "0.3.37", features = ["formatting"] } serde = { version = "1.0.216", features = ["derive"] } crypto_secretbox = { version = "0.1.1", features = ["chacha20"] } -serde_json = "1.0.133" +serde_json = "1.0.134" argon2 = "0.6.0-pre.1" From ecead5306d23db9dda5ff15e9b2f7d0f39595fae Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 15:53:03 +0300 Subject: [PATCH 40/85] Update From ddd259a014e000da400023c129ca99346b7ee233 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 15:58:05 +0300 Subject: [PATCH 41/85] rewrite --- assets/guides/launch-args.md | 37 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/assets/guides/launch-args.md b/assets/guides/launch-args.md index 138fee467..79a8f4d2c 100644 --- a/assets/guides/launch-args.md +++ b/assets/guides/launch-args.md @@ -1,28 +1,27 @@ -# Globed launch arguments +# Globed Launch Arguments -Globed has a few launch arguments that might be useful in troubleshooting certain issues or just debugging. To enable them, pass the options into either the command line when launching the executable (if invoking directly), in steam launch options section, or in Geode launcher settings (if on Android). +Globed has several launch arguments that can be useful for troubleshooting or debugging. To enable them, pass the options into either the command line when launching the executable (if invoking directly), in the Steam launch options section, or in the Geode launcher settings (if on Android). -Make sure to use the full format and prefix the option name with `globed-`, so if an option is called `skip-preload`, the full launch option is called `--geode:globed-skip-preload` +Make sure to use the full format and prefix the option name with `globed-`. For example, if an option is called `skip-preload`, the full launch option would be `--geode:globed-skip-preload`. -## Asset preloading +## Asset Preloading -`debug-preload` - enables printing of a ton of extra information during asset preloading, so that in case there's a crash or a texture corruption isuse, it can be debugged easier. - -`skip-preload` - forces asset preloading to be disabled, no matter the in-game settings. +- **`--geode:globed-debug-preload`**: Enables extra logging during asset preloading. This is helpful in diagnosing crashes or texture corruption issues. + +- **`--geode:globed-skip-preload`**: Forces asset preloading to be disabled, regardless of in-game settings. ## Troubleshooting -`skip-resource-check` - skips the resource check at the startup, which would cause globed to be unusable if a texture mismatch was detected (usually because of an outdated texture pack that modifies globed textures). - -`no-ssl-verification` - disables SSL certificate verification, useful if you can't connect to the server with an error similar to "SSL peer certificate or SSH remote key was not OK." - -`crt-fix` - unused in release builds, if you are a developer using Wine and experiencing hangs on launch, you may check `src/platform/os/windows/setup.cpp` for more information. - -## Debugging (more dev centered) - -`tracing` - enables some extra logging. - -`verbose-curl` - enables verbose curl logging (can help figure out problems with web requests) +- **`--geode:globed-skip-resource-check`**: Skips the resource check at startup. This can be helpful if there’s a texture mismatch, often caused by outdated texture packs that modify Globed textures. + +- **`--geode:globed-no-ssl-verification`**: Disables SSL certificate verification. This option is useful if you're unable to connect to the server with an error like "SSL peer certificate or SSH remote key was not OK." + +- **`--geode:globed-crt-fix`**: This is not used in release builds. However, if you are a developer using Wine and experiencing launch hangs, you may find more details in `src/platform/os/windows/setup.cpp`. -`fake-server-data` - emulates a more lively server, for example, even if the server has no players connected to it, with this option, there will be a lot of fake players on the player list. same with fake levels and rooms. **ONLY** works in debug builds (`-DGLOBED_DEBUG=ON` was set when building the mod) +## Debugging (Developer-Centered) +- **`--geode:globed-tracing`**: Enables additional logging to help with debugging. + +- **`--geode:globed-verbose-curl`**: Enables verbose curl logging, which can be helpful for diagnosing issues with web requests. + +- **`--geode:globed-fake-server-data`**: Simulates a more active server environment. Even if there are no players connected to the server, this option will populate the player list with fake players, and generate fake levels and rooms. **ONLY** works in debug builds (`-DGLOBED_DEBUG=ON` set during mod build). From dd0f6f91af3af9d754b395c4efad4867cafb33fb Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 16:16:54 +0300 Subject: [PATCH 42/85] Update build.rs --- server/central/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/central/build.rs b/server/central/build.rs index 25c393629..b999f9eb7 100644 --- a/server/central/build.rs +++ b/server/central/build.rs @@ -1,4 +1,4 @@ fn main() { - // trigger recompilation when a new migration is added + // Trigger recompilation when a new migration is added println!("cargo:rerun-if-changed=migrations"); } From 5a57276cba5a14fdb90f916a4f5841cf27d1073d Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 16:19:47 +0300 Subject: [PATCH 43/85] Update mod.json --- mod.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod.json b/mod.json index 73f6f50f3..ebc2fc244 100644 --- a/mod.json +++ b/mod.json @@ -28,7 +28,7 @@ ], "incompatibilities": [], "links": { - "homepage": "https://globed.dev", + "homepage": "https://globed.dev/", "source": "https://github.com/GlobedGD/globed2", "community": "https://discord.gg/d56q5Dkdm3" }, From 813faf94a2b0fa27324a9b7f95376e3840b577bf Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 16:31:54 +0300 Subject: [PATCH 44/85] Test --- .github/workflows/codeql.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..5767a6f47 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,49 @@ +name: CodeQL Analysis + +on: + push: + pull_request: + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + permissions: + security-events: write + packages: read + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: c-cpp + build-mode: autobuild + - language: python + build-mode: none + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + + - if: matrix.build-mode == 'manual' + shell: bash + run: | + echo 'If you are using a "manual" build mode for one or more of the' \ + 'languages you are analyzing, replace this with the commands to build' \ + 'your code, for example:' + echo ' make bootstrap' + echo ' make release' + exit 1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{ matrix.language }}" From c010ccc14a9263579629e6952d8b1ea8892f3618 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 16:34:41 +0300 Subject: [PATCH 45/85] Update codeql.yml --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5767a6f47..4936f21ea 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -19,7 +19,7 @@ jobs: matrix: include: - language: c-cpp - build-mode: autobuild + build-mode: none - language: python build-mode: none From d179568a6527a58b922146b1579637f285182440 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 23 Dec 2024 16:38:29 +0300 Subject: [PATCH 46/85] Delete .github/workflows/codeql.yml --- .github/workflows/codeql.yml | 49 ------------------------------------ 1 file changed, 49 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 4936f21ea..000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: CodeQL Analysis - -on: - push: - pull_request: - -jobs: - analyze: - name: Analyze (${{ matrix.language }}) - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - permissions: - security-events: write - packages: read - actions: read - contents: read - - strategy: - fail-fast: false - matrix: - include: - - language: c-cpp - build-mode: none - - language: python - build-mode: none - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - build-mode: ${{ matrix.build-mode }} - - - if: matrix.build-mode == 'manual' - shell: bash - run: | - echo 'If you are using a "manual" build mode for one or more of the' \ - 'languages you are analyzing, replace this with the commands to build' \ - 'your code, for example:' - echo ' make bootstrap' - echo ' make release' - exit 1 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{ matrix.language }}" From 3a15344fa6eb9d543e1506d7881cdc8a319cc9bb Mon Sep 17 00:00:00 2001 From: larzie Date: Tue, 24 Dec 2024 13:15:23 +0300 Subject: [PATCH 47/85] Yes --- libs/sodium/version.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libs/sodium/version.h b/libs/sodium/version.h index e07ae90d9..249d64e22 100644 --- a/libs/sodium/version.h +++ b/libs/sodium/version.h @@ -1,15 +1,12 @@ - -#ifndef sodium_version_H -#define sodium_version_H +#ifndef SODIUM_VERSION_H +#define SODIUM_VERSION_H #include "export.h" #define SODIUM_VERSION_STRING "1.0.20" - #define SODIUM_LIBRARY_VERSION_MAJOR 26 #define SODIUM_LIBRARY_VERSION_MINOR 2 - #ifdef __cplusplus extern "C" { #endif @@ -18,16 +15,16 @@ SODIUM_EXPORT const char *sodium_version_string(void); SODIUM_EXPORT -int sodium_library_version_major(void); +int sodium_library_version_major(void); SODIUM_EXPORT -int sodium_library_version_minor(void); +int sodium_library_version_minor(void); SODIUM_EXPORT -int sodium_library_minimal(void); +int sodium_library_minimal(void); #ifdef __cplusplus } #endif -#endif +#endif // SODIUM_VERSION_H From 9e7a8b9da8aebeeabd9decbf42ca78e2b5d5e778 Mon Sep 17 00:00:00 2001 From: larzie Date: Tue, 24 Dec 2024 13:25:46 +0300 Subject: [PATCH 48/85] Update From b819def04b20b6ddef6235a098cc43724d9851c1 Mon Sep 17 00:00:00 2001 From: larzie Date: Tue, 24 Dec 2024 13:28:09 +0300 Subject: [PATCH 49/85] Update From cf11225759d12a213c1874ddcb56f23892998243 Mon Sep 17 00:00:00 2001 From: larzie Date: Tue, 24 Dec 2024 13:28:48 +0300 Subject: [PATCH 50/85] Update From c97c5d989287c28183f33dc5be1fecfaf26560cd Mon Sep 17 00:00:00 2001 From: larzie Date: Tue, 24 Dec 2024 13:29:30 +0300 Subject: [PATCH 51/85] Update From 53f3c8e14087d2dd9e4f57e6dc2cb5f65cc69cd0 Mon Sep 17 00:00:00 2001 From: larzie Date: Tue, 24 Dec 2024 13:31:39 +0300 Subject: [PATCH 52/85] Update From 9bc785200461a68efb74d5d8301c90d8a2393078 Mon Sep 17 00:00:00 2001 From: larzie Date: Tue, 24 Dec 2024 13:32:13 +0300 Subject: [PATCH 53/85] Update From eea4fed14f0806a40285022e9542bff54947e675 Mon Sep 17 00:00:00 2001 From: larzie Date: Tue, 24 Dec 2024 13:34:19 +0300 Subject: [PATCH 54/85] Update From 1f66d84a32c2054cd16be38ef9a12cf301264df1 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 25 Dec 2024 13:30:09 +0300 Subject: [PATCH 55/85] Update Cargo.toml From 144eae05371eb61d5dd0c19b81ce315bf3985a61 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 25 Dec 2024 13:31:53 +0300 Subject: [PATCH 56/85] Update Cargo.toml From 86ed0e418f56aec5d5b4cb6491e03a3585019eab Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 25 Dec 2024 13:32:25 +0300 Subject: [PATCH 57/85] Update Cargo.toml From 6a2d92af3662e809c203473a2cde57a664b53ec9 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 25 Dec 2024 13:32:53 +0300 Subject: [PATCH 58/85] Update Cargo.toml From a02f0bcb43c3a7516153d600716465522775ccfb Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 25 Dec 2024 13:34:12 +0300 Subject: [PATCH 59/85] Update Cargo.toml From a6ed2489f6edac174afc9a9cc7b925f81248502d Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 25 Dec 2024 13:34:35 +0300 Subject: [PATCH 60/85] Update Cargo.toml From e84bc2069234259c2e4ffee891e1c22f0d0e5549 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 25 Dec 2024 13:36:31 +0300 Subject: [PATCH 61/85] Update Cargo.toml From 7e8df1ec504c64e3a35905430a30da0cbce1c4b1 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 25 Dec 2024 13:38:19 +0300 Subject: [PATCH 62/85] Reformat --- server/get_unique_users.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/server/get_unique_users.py b/server/get_unique_users.py index eb1421434..1f911a650 100644 --- a/server/get_unique_users.py +++ b/server/get_unique_users.py @@ -27,23 +27,15 @@ end_time = datetime.now() - timedelta(hours=shift_by_hours) start_time = end_time - timedelta(days=1) -filtered = [] -for e in entries: - if e[0] > start_time and e[0] < end_time: - filtered.append(e) +filtered = [e for e in entries if start_time < e[0] < end_time] print(f"Logins during the last 24 hours: {len(filtered)}") -filtered2 = set() -for e in filtered: - filtered2.add(e[1]) +unique_users = {e[1] for e in filtered} -print(f"Unique users: {len(filtered2)}") +print(f"Unique users: {len(unique_users)}") with open(".unique_users.txt", "w") as f: - unique_names = set() - for e in entries: - unique_names.add(e[1]) - - for name in sorted(list(unique_names)): + unique_names = {e[1] for e in entries} + for name in sorted(unique_names): f.write(name + "\n") From 9d3927381f79ff4f70b87d2328c95ca9bbebdbb3 Mon Sep 17 00:00:00 2001 From: larzie Date: Wed, 25 Dec 2024 13:39:12 +0300 Subject: [PATCH 63/85] :3 --- server/rustfmt.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/rustfmt.toml b/server/rustfmt.toml index 397483873..bc30bf42f 100644 --- a/server/rustfmt.toml +++ b/server/rustfmt.toml @@ -1 +1 @@ -max_width = 150 # menace to society +max_width = 150 From a8ebdcbdb704742a15af0a413cc3f439bdc0857c Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 26 Dec 2024 15:12:44 +0300 Subject: [PATCH 64/85] Update From 11e8f45ed18b0f09f1b5f70e053ea720d9d3cee3 Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 26 Dec 2024 15:13:04 +0300 Subject: [PATCH 65/85] Update Cargo.toml From 34147afc46e62c1af1a125319c1726461dd69e61 Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 26 Dec 2024 15:13:48 +0300 Subject: [PATCH 66/85] Update --- server/derive/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/derive/Cargo.toml b/server/derive/Cargo.toml index af3fbcc2e..0ce385289 100644 --- a/server/derive/Cargo.toml +++ b/server/derive/Cargo.toml @@ -9,5 +9,5 @@ proc-macro = true [dependencies] darling = "0.20.10" proc-macro2 = "1.0.92" -quote = "1.0.37" +quote = "1.0.38" syn = { version = "2.0.91", features = ["full"] } From 0d06cbe8c655026bb3c28afe8801f8b5592d9d7e Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 26 Dec 2024 15:14:03 +0300 Subject: [PATCH 67/85] add dot --- server/derive/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/derive/readme.md b/server/derive/readme.md index f61911f9f..e4e290e55 100644 --- a/server/derive/readme.md +++ b/server/derive/readme.md @@ -1,3 +1,3 @@ # globed-derive -Derive macros for traits `esp::Encodable`, `esp::Decodable`, `esp::StaticSize`, `esp::DynamicSize`, and `globed_game_server::data::Packet` +Derive macros for traits `esp::Encodable`, `esp::Decodable`, `esp::StaticSize`, `esp::DynamicSize`, and `globed_game_server::data::Packet`. From 6e82d96ecc28a36fe86c098c1836d8fd9584fc4d Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 26 Dec 2024 15:14:40 +0300 Subject: [PATCH 68/85] Update From 09376b3cbbb73e0b60570790400eee134baef5da Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 26 Dec 2024 15:16:34 +0300 Subject: [PATCH 69/85] Update Cargo.toml From 862e8c59dc064e2c4847d99dfe9516cbabc9e4d7 Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 26 Dec 2024 15:26:33 +0300 Subject: [PATCH 70/85] Update Cargo.toml From c12b91f7225c2f42111897109273cc9519f15941 Mon Sep 17 00:00:00 2001 From: larzie Date: Thu, 26 Dec 2024 15:29:26 +0300 Subject: [PATCH 71/85] Final commit ? From 4d9dc56ff13fe867c8f79ebd4b21602be6b747ee Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 27 Dec 2024 13:33:48 +0300 Subject: [PATCH 72/85] Update Cargo.toml From 9267a7f8bcb2f165792c428ed0cb40c07908ff50 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 27 Dec 2024 13:35:36 +0300 Subject: [PATCH 73/85] Update Cargo.toml From 17b8472bb4f620ab08d738bd1e41ae8ea0b8bab3 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 27 Dec 2024 13:36:09 +0300 Subject: [PATCH 74/85] Update Cargo.toml --- server/derive/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/derive/Cargo.toml b/server/derive/Cargo.toml index 0ce385289..d6e224ac1 100644 --- a/server/derive/Cargo.toml +++ b/server/derive/Cargo.toml @@ -10,4 +10,4 @@ proc-macro = true darling = "0.20.10" proc-macro2 = "1.0.92" quote = "1.0.38" -syn = { version = "2.0.91", features = ["full"] } +syn = { version = "2.0.92", features = ["full"] } From 14af14b0a0f2458940c1b563aee736ea47f2a5c3 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 27 Dec 2024 13:36:36 +0300 Subject: [PATCH 75/85] Update Cargo.toml From 06af8327dd01827788a10a59e8022a98ac602aca Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 27 Dec 2024 13:38:10 +0300 Subject: [PATCH 76/85] Update Cargo.toml From a468b2b468c8da1fc4073dd40de7d3381af1f664 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 27 Dec 2024 13:38:25 +0300 Subject: [PATCH 77/85] Update Cargo.toml From c4e94e5d8889bd792645a41e5d505d4313da7db6 Mon Sep 17 00:00:00 2001 From: larzie Date: Fri, 27 Dec 2024 15:44:58 +0300 Subject: [PATCH 78/85] update --- server/shared/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/shared/Cargo.toml b/server/shared/Cargo.toml index 96f06517f..658bf9fe9 100644 --- a/server/shared/Cargo.toml +++ b/server/shared/Cargo.toml @@ -16,7 +16,7 @@ log = "0.4.22" nohash-hasher = "0.2.0" parking_lot = "0.12.3" rand = "0.9.0-beta.1" -reqwest = { version = "0.12.9", default-features = false, features = [ +reqwest = { version = "0.12.10", default-features = false, features = [ "rustls-tls", ] } sha2 = "0.11.0-pre.4" From 3c93a60b27cdbde2e42e539fe960c4326dbaf1d0 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 30 Dec 2024 13:06:31 +0300 Subject: [PATCH 79/85] Update Cargo.toml From efdcaa074398abb4648df5e82b795b0e466edc84 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 30 Dec 2024 13:08:54 +0300 Subject: [PATCH 80/85] Update Cargo.toml --- server/central/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/central/Cargo.toml b/server/central/Cargo.toml index fb1345583..dd42bf0ab 100644 --- a/server/central/Cargo.toml +++ b/server/central/Cargo.toml @@ -11,7 +11,7 @@ blake2 = "0.11.0-pre.4" digest = "0.11.0-pre.9" ipnet = "2.10.1" iprange = "0.6.7" -serde = { version = "1.0.216", features = ["serde_derive"] } +serde = { version = "1.0.217", features = ["serde_derive"] } serde_json = "1.0.134" tokio = { version = "1.42.0", features = ["full"] } json_comments = "0.2.2" From ba513efac47e89803e6cda4696b4751c69652c45 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 30 Dec 2024 13:09:41 +0300 Subject: [PATCH 81/85] Update Cargo.toml --- server/derive/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/derive/Cargo.toml b/server/derive/Cargo.toml index d6e224ac1..2db909818 100644 --- a/server/derive/Cargo.toml +++ b/server/derive/Cargo.toml @@ -10,4 +10,4 @@ proc-macro = true darling = "0.20.10" proc-macro2 = "1.0.92" quote = "1.0.38" -syn = { version = "2.0.92", features = ["full"] } +syn = { version = "2.0.93", features = ["full"] } From ef2adeab8efa4ac08df871d2fc8d51ec6c1af3c3 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 30 Dec 2024 13:10:15 +0300 Subject: [PATCH 82/85] Update Cargo.toml From 8a0bba2c3f2f7ef5c024eea5ceb62a07749e554e Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 30 Dec 2024 13:11:42 +0300 Subject: [PATCH 83/85] Update Cargo.toml --- server/game/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/game/Cargo.toml b/server/game/Cargo.toml index f692195cf..d3249e97e 100644 --- a/server/game/Cargo.toml +++ b/server/game/Cargo.toml @@ -11,7 +11,7 @@ esp = { path = "../esp" } alloca = "0.4.0" ctrlc = "3.4.5" rustc-hash = "2.1.0" -serde = { version = "1.0.216", features = ["serde_derive"] } +serde = { version = "1.0.217", features = ["serde_derive"] } serde_json = "1.0.134" futures-util = "0.3.31" console-subscriber = { version = "0.4.1", features = ["parking_lot"] } From de80d2f9465ffe3c4c46c43f5f22e8b9f0048dad Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 30 Dec 2024 13:12:02 +0300 Subject: [PATCH 84/85] Update Cargo.toml From e1c0851b4af73ceb71ee43ded8f133fa045977e0 Mon Sep 17 00:00:00 2001 From: larzie Date: Mon, 30 Dec 2024 13:14:09 +0300 Subject: [PATCH 85/85] Update Cargo.toml --- server/shared/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/shared/Cargo.toml b/server/shared/Cargo.toml index 658bf9fe9..737b44282 100644 --- a/server/shared/Cargo.toml +++ b/server/shared/Cargo.toml @@ -16,12 +16,12 @@ log = "0.4.22" nohash-hasher = "0.2.0" parking_lot = "0.12.3" rand = "0.9.0-beta.1" -reqwest = { version = "0.12.10", default-features = false, features = [ +reqwest = { version = "0.12.11", default-features = false, features = [ "rustls-tls", ] } sha2 = "0.11.0-pre.4" time = { version = "0.3.37", features = ["formatting"] } -serde = { version = "1.0.216", features = ["derive"] } +serde = { version = "1.0.217", features = ["derive"] } crypto_secretbox = { version = "0.1.1", features = ["chacha20"] } serde_json = "1.0.134" argon2 = "0.6.0-pre.1"