Commit graph

207 commits

Author SHA1 Message Date
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
CraftyBoss
05a94fa30b
Merge pull request #72 from Istador/pr-ban-info
notify players that they are banned or kicked from the server
2024-10-26 13:52:25 -07:00
CraftyBoss
cb60601c2a
Merge branch 'dev' into pr-ban-info 2024-10-25 19:14:12 -07:00
CraftyBoss
56c5adc094
Merge pull request #68 from Istador/pr-new-players-list
New Hide & Seek Players List
2024-10-25 18:54:55 -07:00
CraftyBoss
6493ef8d35
Merge pull request #67 from Istador/pr-main-mod-menu
Replace the action guide with the SMOO Mod Menu
2024-10-25 18:52:21 -07:00
CraftyBoss
9c0f187cf9
Merge pull request #66 from Istador/pr-debug-menu
Improve and simplify the debug menu
2024-10-25 18:50:40 -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
0a18f616e5
fix: add a reconnect failure delay
There are TCP timeouts, but in situations where it fails instantly there would otherwise be no delay.
(E.g. firewall rejection, or when in flight mode.)
2024-10-17 14:40:21 +02:00
Robin C. Ladiges
9130b2d16e
notify players that they are banned or kicked from the server 2024-10-08 19:38:32 +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
82cc6ffe91
[debug menu] remove: debug puppet page 2024-10-07 22:47:27 +02:00
Robin C. Ladiges
7cd46d2f29
[debug menu] change: toggle BGM also when the debug menu is open
Also:
- remove unused `L + Right` and `L + Up` controls for debug puppets
2024-10-07 22:47:27 +02:00
Robin C. Ladiges
56350afa04
[debug menu] change: only change the selected player when the players page is open 2024-10-07 22:47:27 +02:00
Robin C. Ladiges
efce9392a1
[debug menu] change: only change the selected page when the debug menu is open 2024-10-07 22:47:26 +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
1aa579595b
fix: Dockerfile warnings
2 warnings found (use --debug to expand):
- FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)
- JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals (line 13)
2024-10-07 21:39:19 +02:00
Robin C. Ladiges
ddd2ee241d
fix: check Ryujinx default profile only on emulators 2024-07-09 09:01:08 +02:00
Robin C. Ladiges
abebfbaa81
gitignore temporary build file 2024-10-21 14:58:29 +02:00
Robin C. Ladiges
9318a9607c
[workflows] update version releases 2024-10-17 21:04:27 +02:00
Robin C. Ladiges
060c3f9def
[mod menu] change: make it obvious that changing the server or port requires a restart
Also: call it `server address` instead of `server IP`, because domains work too.
2024-06-26 09:17:27 +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
d107354db9
[debug menu] new: page to show controls 2024-06-26 09:11:42 +02:00
Robin C. Ladiges
326ccb33af
[debug menu] new: title for debug puppet page 2024-06-26 09:11:42 +02:00
Robin C. Ladiges
d8c89abdbb
[debug menu] change: improve animation & cappy page
- title
- code indentation
- X Y Z alignment for position and rotation
2024-06-26 09:11:41 +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
c0bb939a92
[debug menu] change: simplify player page
- Show `Yes` and `No` instead of `True` and `False`
- Remove `Is in Capture`
- Always show `Capture`
- Combine `Animation Index` and `Packet Animation` into one `Animation` line
- Rename `Puppet0` to `Empty Slot 1`
- Don't mention puppets
2024-06-26 09:11:41 +02:00
Robin C. Ladiges
ec41ee067e
[debug menu] new: show pagination for players 2024-06-26 09:11:41 +02:00
Robin C. Ladiges
7e9e356714
[debug menu] change: show pagination controls and pages amount 2024-06-26 09:11:41 +02:00
Robin C. Ladiges
90a34e8f87
[debug menu] new: show mod version
fallback to git info if not builded for a specific version
2024-06-26 09:11:41 +02:00
Robin C. Ladiges
ef9b629e3a
[debug menu] change: move main status to the top and simplify it 2024-06-26 09:11:40 +02:00
Robin C. Ladiges
7e698838cf
[debug menu] change: send & recv queue on one line 2024-06-26 09:11:40 +02:00
Robin C. Ladiges
43c55f062d
[debug menu] change: client & gamemode heaps on one line
- Show how much is used instead of how much is free.
- Double precision, because of observable inaccuracies otherwise.
- Divide by 1024 instead of by 1000 to display KiB instead of KB.
- Show only one fractional digit.
- (The max is exactly 320 KiB, so need to show a fractional digit for it.)
2024-06-26 09:11:38 +02:00
CraftyBoss
b2d444b2b9
Merge pull request #65 from Istador/pr-gravity-toggle
don't close the H&S menu after toggling the gravity button
2024-06-25 16:15:10 -07:00
CraftyBoss
481b352f08
Merge pull request #64 from Istador/pr-emu-builds
Update workflow action versions and improve `docker-build.sh` for emulator builds
2024-06-25 16:13:01 -07:00
CraftyBoss
80467b06ff
Merge pull request #63 from Istador/pr-memory-leak
fix: memory leak if send queue is full
2024-06-25 16:12:33 -07:00
Amethyst-szs
d600412e73
new hide & seek players list
Cherry picked this from the original commit and did the romfs change for all languages (not just for `USen`).

All players are shown now with an icon indicating their gamemode role.

I also changed the approach on how to change the font.
Instead of changing existing characters I added completely new characters to the font (in all languages).
That way the game icons don't appear unintended elsewhere in the game.
It's also possible to do it for all languages now (`%`, &`, and `©` aren't available in all languages).

Sadly I couldn't get UTF-32 characters to work (e.g. to use unicode codes for emojis that fit the icon).
So I had to limit myself to UTF-16 and chose the private use area of unicode:
- 0xE000 for a penguin icon (why not? :D)
- 0xE001 for the hider icon (formerly `%`)
- 0xE002 for the seeker icon (formerly `&`)
- 0xE003 for the sardine icon (formerly `©`)
- 0xE004 for the sardines can icon (formerly `@`)

I included the sardines icons already, because in the future I might create separate PRs to get these gamemodes into the main mod.

The font changes are inside `romfs/LocalizedData/${lang}/LayoutData/FontData.szs`.

The update in the `romfs/LayoutData/HideAndSeekIcon.szs` changes the title for the players list from `Teammates` to `Players`.
It also adds a shadow to the font of the list to increase readability.

f8eef7fb97
2a0d0e7724

(cherry picked from commit f8eef7fb97)
(cherry picked from commit 2a0d0e7724)

Co-authored-by: Robin C. Ladiges <rcl.git@blackpinguin.de>
2024-06-01 22:42:59 +02:00
Amethyst-szs
e15e8f60e9
[main menu][pause menu] replace the action guide with the SMOO Mod Menu
Cherry picked this aspect from the original commit and did the romfs change for all languages (not only for `USen`).

a9b2c87aa0

(cherry picked from commit a9b2c87aa0)

Co-authored-by: Robin C. Ladiges <rcl.git@blackpinguin.de>
2024-05-31 23:50:36 +02:00
Robin C. Ladiges
9cdcf68b46
[docker-build.sh] new: clean up build artifacts when switching to/from emulator builds 2024-05-29 13:52:21 +02:00
Robin C. Ladiges
92d7b4e368
[docker-build.sh] new: create file structure for emulator builds 2024-05-29 13:52:21 +02:00
Robin C. Ladiges
29703c7894
[docker-build.sh] fail on errors 2024-05-29 13:52:21 +02:00
Robin C. Ladiges
e291ccd98c
[workflows] update: action versions 2024-05-29 13:49:31 +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