Commit graph

71 commits

Author SHA1 Message Date
Amethyst-szs
7fa8c659e1
new: custom boot screen before main menu
- Show "SMOO made by CraftyBoss" for about 5 seconds
- Then show "Freeze-Tag & Sardines made by Amethyst-szs" for about 5 seconds.
- This does only overlay the game starting normally and does not slow down the process additionally.

---

Changes compared to the original cherry-picked version:
- Put all into the speedboot namespace instead of only a few things.
- Don't load into the game, but stay in the main menu
  - (Because of issues with new save files)
- Added text: "Made by CraftyBoss"
- Added text: "& Sardines"
- Speed up transition animation between the two screens
  - (Because it is now shown for a shorter total time)

Instead of directly (speed)booting into the game like in the original cherry-picked commit, this stays in the main menu.
The original behavior can be restored by setting `speedbootAutoload` to `true` inside `BootHooks.cpp`.

This is to prevent issues with new empty save files.
They normally don't get to the main menu but to an extra menu that now is invisible behind the custom boot screen.
The game doesn't load automatically then but the player needs to blindly navigate the invisible menu to start the game.
Till Cap Kingdom is fully loaded only the custom boot screen is visible (e.g. during the first cutscene video).

(cherry picked from commit c1eac0852eb839560dbc2ccafe373176c9911684)

Co-authored-by: Robin C. Ladiges <rcl.git@blackpinguin.de>
2024-10-27 00:44:02 +02:00
Amethyst-szs
6af21f1b8f
new: Freeze-Tag game mode
Similar to Hide & Seek with two teams: chasers (seekers) and runners (hiders).

The chasers try to catch all runners in a given round time.
When all runners are catched the chasers win and the round ends immediately (wipe out).
When the round time runs out, the runners win the round.

Instead of joining the chasers runners are frozen when touching a chaser or dying.
(Frozen at the last safe position when falling off the map.)
In the frozen state they can spectate other players.
Frozen runners are unfrozen when they are touched by other runners.

Players gain points instead of accumulating time based on their performance:
- Chasers receive points by catching runners or if they freeze themselves.
- Runners receive points over time by not being frozen or by unfreezing other runners.
- The team that wins gets extra points.

A round is limited to the current stage, so checkpoint warps and stage changes are disabled.

To be able to start a new round (with R + Up) a player first needs to become a "host".
The host status can be activated in the freeze-tag config menu.

---

Changes compared to the original cherry-picked version:
- fix: try to not mix legacy update types between freeze-tag and other game modes
  - (see GameModeInf.h)
- fix: change the player we spectate if they disconnect even if they aren't at the end of the list
- fix: don't add players to an already started round (they missed the round start)
- fix: don't start rounds w/ survival events when the round length decreases
- fix: a round can end w/ wipeout if there is only one runner (cancelled for legacy clients)
- fix: don't score a rescue event after a wipeout
- fix: cancel the round when deactivating freeze-tag
- change: combined freeze-tag config menu buttons to single toggle buttons
- change: not closing the freeze-tag config menu after changing an option
- change: split host mode & round length into two distinct options
- change: possibility to always change settings in the FT config menu
- change: send gamemode NONE when Freeze-Tag is selected but not active
- change: improved distance calculations in squared distance space
- change: short invulnerability at round start
- add: toggle options to control mario/cappy collision/bounciness
- add: show freeze-tag specific controls in the debug menu
  - depending on the current state: host, frozen, debug mode
- add: can only start a round with at least one runner and one chaser
- add: automatically cancel a round after 5s if there are not enough chasers/runners
- add: show who manually started/cancelled a round
- add: UI for players in other game modes outside of rounds
- remove: custom boot screen, because it directly loads into the game
  - not seeing the main menu is an issue for empty save files
  - this is added again separately w/ the next commit

(cherry picked from commit 782d0bd0831348c5ae327d50d0ab98f16f6111e3)
(cherry picked from commit 6525060e108a604636bd8f952ce1910a8050ee9a)
(cherry picked from commit 918f61fbfd619d781d88dc74878d392c48cfa480)
(cherry picked from commit db8331b158d3277388dcb8d0df2da43d78988c7d)
(cherry picked from commit 991aadb0f22ed0c745c218fdaae6ec43bb243e15)
(cherry picked from commit fe17cff52b4241418b37cd30ac3fa0af40d3b9f6)
(cherry picked from commit c5d6d428c6b25a5cdb0ff76c474b584a65b4bc60)
(cherry picked from commit b00088f08fa489b35c439987780bff718bb21417)
(cherry picked from commit 42c89927db611c662d9c01ff00c0e657e999e583)
(cherry picked from commit 4818a24d12caa2af64ca6378a5a5f33b53c0b59a)
(cherry picked from commit d707f2cf7dbeeb96602f9e45fa431fdd0ed476c3)
(cherry picked from commit c1791080f1aa3ef2e49bee7703cc4b365d122922)
(cherry picked from commit 96aff7dd7167d8244acef7884fa3503d4c3f868a)
(cherry picked from commit 1d774cc6ad884de571148ca77d212b55140699a5)
(cherry picked from commit bafca58e3906a6cd1046d7e7aed9512ab648c95d)
(cherry picked from commit 5cd4319c20417f317f75338ad61222fd7bee3ec7)
(cherry picked from commit a1575998c0835180a795a2a909a0b2c0942902d5)
(cherry picked from commit a14e813da77c2d6d4c4b6f82fd52d22c4a9ffb55)
(cherry picked from commit 1cd6c1f9443621ca0cd85fb277763cf5a6f10244)
(cherry picked from commit 7e5f16a3b8b4696c934a4acf3ccc544ac93af9ca)
(cherry picked from commit d022dde1de568b50e36ec809ff37d8ef42c81afa)
(cherry picked from commit c09456bd1d6efa8ba2471c507654bedbbe062b0d)
(cherry picked from commit 0fb6413ec91bbf679e9f8cea1aa512159101fa46)
(cherry picked from commit dcac5dfe120177df0cfe7bf9a6ef1bfac5d67afc)
(cherry picked from commit 6a412903aa34cd8fd740e0f898c75f2e01fe39c8)
(cherry picked from commit 794b06c50a004dd258344592a4521f5d9a85db60)
(cherry picked from commit e76e669074a671130ef453402033c65fdd004066)
(cherry picked from commit bfc14c15bb4ad5a517783c13d8f61a7cb5c40d4f)
(cherry picked from commit d888e3b71b519b214a693df92ced9fe5ce05101b)
(cherry picked from commit 8db6e28cf42499e95f2924c22acb026926c09be5)
(cherry picked from commit 784d9e6de300d13f761a4f3b21e1ec803f762b72)
(cherry picked from commit 43ee8bfecf5abb090aa98089730e79e93713ebfd)
(cherry picked from commit ab78a812fd18781655ccf38e803f619ea427d1ac)
(cherry picked from commit d2d37d0879a4e4959862d9dbc2256456c45df7cf)
(cherry picked from commit 8cb299bbaeb3c35498558a23f2a5c4925b87e7d7)
(cherry picked from commit d3622c7c53077da0858e617d13d51588ba529164)
(cherry picked from commit e46f73576380569c200fad5248f88cc845c3ee3b)
(cherry picked from commit 8364cd18bc9acd4ffa554c8cc4df9e5c9432ff0c)
(cherry picked from commit e383c7700eb68345773eafbed3fd1cd86cfb37f2)
(cherry picked from commit 32895eaa17d8f58f8f838f143ec204eb39b69509)
(cherry picked from commit dd9a98c02f4b8761d30d1bbb5a6604324ee721df)
(cherry picked from commit 63937fa7c5e316859e0a57188a803dbf57fcb202)
(cherry picked from commit eac79954958a591a0deb244d9b564f9c01a7fe41)
(cherry picked from commit f46e6a1e426a4c14708ee48f91348294877e7f8e)
(cherry picked from commit 8b15d09d2f093e7c9960f4395bf54478122e0273)
(cherry picked from commit b56e0b5bcb2cde4f0723252ee6f00b55af47e6b2)

Co-authored-by: Robin C. Ladiges <rcl.git@blackpinguin.de>
2024-10-27 00:44:02 +02:00
Amethyst-szs
0c9d6b2159
new: Sardines game mode
Very similar to Hide & Seek but a bit different.

Hiders (single sardine) and seekers (sardines pack) are kind of inverted.
The seekers (isIt = true) are hiding, and the hiders (isIt = false) try to find them.
The timer counts up for the seekers and not for the hiders.

Only one player can change from hider to seeker via the button combination.
Other hiders need to touch a seeker to become a seeker themselves.

A hider that dies doesn't join the seekers, but when a seeker dies they become a hider.

A round ends when all hiders have joined the seekers as usual.

The sardines game mode has three toggable options:
- Gravity: as in H&S mode
- Tether: Binds the seekers (sardines pack) together, by adding a force when moving apart
- Tether Snapping: Change from seeker to hider when too far away from other seekers

---

Changes compared to the original cherry-picked version:
- fix: gravity camera in Sardines mode doesn't crash the game anymore
- fix: logic for the big sardines icon (and timer control) isn't wrongly inverted
  - (this was only an issue in the `freeze-tag` branch when unpausing)
- change: combined sardine config menu buttons to single toggle buttons
- change: not closing the sardines config menu after changing an option
- change: send gamemode NONE when Sardines is selected but not active
- change: improved distance calculations in squared distance space
- change: possibility to always change settings in the Sardines config menu
- add: toggle options to control mario/cappy collision/bounciness
- add: show sardines specific controls in the debug menu
- remove: new players list (moved to PR CraftyBoss/SuperMarioOdysseyOnline#68)
- remove: unlock costume doors (moved to PR CraftyBoss/SuperMarioOdysseyOnline#69)

(cherry picked from commit a9b2c87aa0)
(cherry picked from commit 1955d76bfc)
(cherry picked from commit f8eef7fb97)
(cherry picked from commit 2a0d0e7724)
(cherry picked from commit 918f61fbfd619d781d88dc74878d392c48cfa480)
(cherry picked from commit 96aff7dd7167d8244acef7884fa3503d4c3f868a)
(cherry picked from commit 0fb6413ec91bbf679e9f8cea1aa512159101fa46)
(cherry picked from commit ab78a812fd18781655ccf38e803f619ea427d1ac)

Co-authored-by: Robin C. Ladiges <rcl.git@blackpinguin.de>
2024-10-27 00:38:05 +02:00
Amethyst-szs
69d6a732c7
refac: abstracting game mode
- change: general game mode management more abstract and less H&S oriented
- change: split 8bit updateType into 4bit game mode and 4bit update type.
- change: don't process packets from other game modes (legacy mode for backwards compatibility)
- change: cache game mode of other players in puppet, resend GameModeInf on detected game mode change
- change: send gamemode NONE when H&S is selected but not active
- change: improved distance calculations in squared distance space
- change: change from hider to seeker when dead even if there are no other players
- fix: add hours to the minutes for the H&S GameModeInf packet
- fix: set milliseconds and hours when receiving time from server
- fix: keep the new time from the server for longer than a single frame
- fix: reset H&S icon after receiving a new state from the server
- refac: move code to generate PlayerList into own abstract LayoutPlayerList class.
- refac: to_string() method for GameTime to simplify code in the Game Mode Icon class.
- refac: rename TagInf packet to GameModeInf packet
- refac: remove param from `SocketClient::tryGetPacket()` (unused)
- refac: move all H&S specific files into the same directory (out of layouts)
- refac: move GameModeTimer.cpp from source/server/hns/ to source/server/gamemode/
- refac: clean up some unused, duplicate or complicated imports
- [mod menu] change: use the game mode name in the options & menu title
- [mod menu] change: select the next game mode in the game mode select menu
- [mod menu] change: possibility to always change the gravity setting in the H&S config menu
- [mod menu] add: toggle options to control mario/cappy collision/bounciness

(cherry picked from commit a9b2c87aa0)
(cherry picked from commit 918f61fbfd619d781d88dc74878d392c48cfa480)
(cherry picked from commit 96aff7dd7167d8244acef7884fa3503d4c3f868a)
(cherry picked from commit 0fb6413ec91bbf679e9f8cea1aa512159101fa46)
(cherry picked from commit ab78a812fd18781655ccf38e803f619ea427d1ac)

Co-authored-by: Robin C. Ladiges <rcl.git@blackpinguin.de>
2024-10-27 00:38:05 +02:00
Robin C. Ladiges
ba43f98bc6
refac: non-whitespace 2024-10-27 00:38:04 +02:00
Robin C. Ladiges
adc914d521
refac: whitespace 2024-10-27 00:37:57 +02:00
CraftyBoss
9655101978
Merge pull request #73 from Istador/pr-small-fixes
Small fixes
2024-10-26 13:54:58 -07:00
Robin C. Ladiges
d3dcc7e510
fix: don't crash when changing the language (only when offline)
This change only makes it work when in offline/airplane mode.
When connected to a server it still crashes.
Likely due to a different part of the code.

Thanks to https://github.com/piplup55 for pointing out to me that this worked in old versions.
I then tested a few older builds and found out that it started to not work with version `v1.1.0`.
Using `git bisect` I was able to find out that commit 34691affb0 introduced the issue.
2024-10-21 06:54:17 +02:00
Robin C. Ladiges
8797d58c94
[mod menu] new: tell the user to restart the game after changing the server 2024-10-07 22:47:27 +02:00
Robin C. Ladiges
b51f49a002
refac: non-whitespace 2024-10-07 22:47:22 +02:00
Robin C. Ladiges
b88b4679cf
refac: whitespace 2024-10-07 22:47:17 +02:00
Robin C. Ladiges
65582aafea
[mod menu] new: option to hide server in debug menu
- Client.hpp: add bool variable and methods
- hooks.cpp: save/load value from common.bin
- main.cpp: change
- StageSceneStateServerConfig: add button to the mod menu to toggle it
2024-06-26 09:17:23 +02:00
Robin C. Ladiges
e1bd6d8785
[debug menu] new/change: show server & port & connected players on first line
The socket needs its own copy of the IP, otherwise it wrongly changes the displayed server after changing it in the mod menu.
2024-06-26 09:11:42 +02:00
Robin C. Ladiges
eb4dcb5c2e
[debug menu] new: show own player info on first players page 2024-06-26 09:11:41 +02:00
Robin C. Ladiges
94c6e74400
[h&s menu] change: don't close after toggling the gravity button 2024-05-29 13:48:33 +02:00
Robin C. Ladiges
6bc98f79ac
[h&s menu] refac: only one buffer 2024-05-29 13:48:28 +02:00
Robin C. Ladiges
59337d6f38
[mod menu] refac: activateInput and deactivateInput 2024-05-29 13:47:30 +02:00
Jack Garrard
8acb8700bf
Merge branch 'dev' into udp-client 2023-09-02 13:35:38 -07:00
Jack Garrard
7064122902
Merge branch 'dev' into packet-acceptance 2023-09-02 12:58:53 -07:00
Jack Garrard
8d94cf7856
Merge pull request #54 from Istador/resend-packets
fix: `TagInf` and `CaptureInf` synchronization issues
2023-08-25 18:51:28 -07:00
Robin C. Ladiges
45cd4442c8
recycle the reconnect error to warn about the default Ryujinx profile ID 2023-07-08 20:45:53 +02:00
Robin C. Ladiges
c736878df1
Toggle H&S Gravity with real toggle functionality 2023-07-08 04:31:56 +02:00
Robin C. Ladiges
366ad5e888
remove reconnect button 2023-07-07 23:46:11 +02:00
Robin C. Ladiges
2bef6f796e
fix: resend CaptureInf packet on reconnect and for new players 2023-06-24 02:42:54 +02:00
Robin C. Ladiges
4835692672
fix: resend TagInf packet on reconnect and for new players 2023-06-24 01:27:14 +02:00
Robin C. Ladiges
36f9343f83 don't send empty GameInf and CostumeInf packets and resend them on reconnect
Resend because: on server restarts the server will lose the stage and costume information.

If only one client is connected to the server, the packets currently aren't resent, so the server doesn't know in which stage the client is and what
costume it wears
(which I'd like to display on the website).

With more then one client connected it already works, because when another client joins the server, the client will send both packets.
2022-12-16 13:19:54 -06:00
Jack Garrard
76d61a8067 Success and receive spelling 2022-10-29 18:21:58 -07:00
Jack Garrard
477f1c9e7d Add a poll time to wait properly 2022-10-29 18:12:53 -07:00
Jack Garrard
7e128679ab Split apart tcp and udp recv functions 2022-10-29 17:37:30 -07:00
Jack Garrard
1fc3a78943 Shutdown send/recv threads before socket reinit 2022-10-29 17:17:38 -07:00
Jack Garrard
04fc8cb309 Increased max packet size again 2022-10-27 03:22:01 -07:00
Jack Garrard
efef24fbbe Fix variable names again 2022-10-27 02:09:59 -07:00
Jack Garrard
3e5c0c89e5 Merge branch 'packet-acceptance' into udp-client 2022-10-27 01:03:39 -07:00
Jack Garrard
64b56c32da Add race protection to message queues 2022-10-27 01:02:32 -07:00
Jack Garrard
e6871da878 Readd missing variable 2022-10-27 00:27:29 -07:00
Jack Garrard
28c7f92453 Refactor member variable names 2022-10-27 00:25:37 -07:00
Jack Garrard
4a5a10f910 Convert receive buffer to be on heap 2022-10-26 03:33:42 -07:00
Jack Garrard
ed83827cc1 Add udp status to debug menu 2022-10-23 18:37:08 -07:00
Jack Garrard
694c9e73d6 Allow for a udp handshake 2022-10-23 16:37:47 -07:00
Jack Garrard
d666707e24 Merge branch 'packet-acceptance' into udp-client 2022-10-21 12:37:57 -07:00
Jack Garrard
1fd02147b6 Add a flag to only send udp if client has received udp packets 2022-10-21 12:27:01 -07:00
Jack Garrard
009755ceba Add pollfd to socket.h 2022-09-05 03:26:14 -07:00
Jack Garrard
66c8bb9e1b Closer to working 2022-09-05 03:19:33 -07:00
CraftyBoss
d4eabffff1 executor table re-impl, shine sync changes, send/recv netcode refactored 2022-09-04 02:23:02 -07:00
Jack Garrard
19c6d800bd More changes while testing 2022-09-03 01:57:57 -07:00
Jack Garrard
1204e27adb Attempt at full udp client 2022-08-30 15:18:44 -07:00
Sanae
b3a30b09f7 Remove a check which blocks players from being updated
Oops! teehee SmileW
2022-08-10 16:10:16 -06:00
CraftyBoss
d3b1935899
Merge pull request #20 from Istador/dns
on invalid IPv4 addresses, assume it's a hostname and do a DNS lookup
2022-08-10 15:00:35 -07:00
CraftyBoss
550b82fc1f Merge branch 'main' of https://github.com/Sanae6/SuperMarioOdysseyOnline into Sanae6-main 2022-08-10 14:40:16 -07:00
CraftyBoss
8f4fac417f change recieve logs, update headers, fix bound bowl crash 2022-08-10 14:11:52 -07:00