Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchor Beta #4910

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

garrettjoecox
Copy link
Contributor

@garrettjoecox garrettjoecox commented Jan 19, 2025

anchor

Please read the known issues & TODO lists below before reporting any bugs or requesting any features.

This is a beta version, be prepared to encounter issues. The stable version can be found here. I am pushing this up now to encourage people to move off of the holiday build, as well as get some broader playtesting on the nightlies in preparation for the 9.0.0 release.

What is this?

Anchor is a co-op mode for Ship of Harkinian. It allows multiple people to play the game together, vanilla or randomizer, sharing inventory items and world flags.

Downloads

How To

  • All players should start at the file select screen
  • Open network tab, change scheme to "Anchor"
  • Agree upon a room ID across all players and click "Enable" (Use something unique, this is basically your password)
  • One person should configure the randomizer settings and generate a seed, then share the newly generated JSON spoiler file with other players
  • All players should load the same JSON spoiler file (drag it into SoH window), make sure seed icons match, then create a new file.
  • If using an existing save/seed ensure the player with the most progress loads the file first.
  • All other players should then load their files, and their save state will be synced with the main player's
  • After everyone has loaded in, verify on the network tab that it doesn’t warn about anyone being on a wrong version or seed

Known Issues:

  • Skipped checks on the tracker are periodically wiped/out of sync
  • Randomizer Settings menu out of sync with what's actually happening (Upstream Issue)
  • Occasionally when loading into a scene with many other players, Link's rendering can get messed up (his eyes or height)
  • If you encounter anything not listed here please report it in the Anchor thread in discord

TODO:

  • Add a combo box to allow other players to be hidden, or render as fairies to save network bandwidth
  • More team vs team interaction, ice traps, or other purchase-ables similar to Flee's fork.
  • Sync bean usage
  • Sync Adult Trade Item usage
  • Convert // #region SOH [Co-op] to VB hooks
  • Create a guide for hosting your own server on the new Go backend
  • Determine if SDL_net usage will conflict with SDL3 migration, and if that should block this from being merged.
  • Change default server to official HM64 hosted server (instead of my personal one)
  • Update discord bot to use the new backend, and add auto-restarting functionality in case of crash
### Build Artifacts - [soh-mac.zip](https://nightly.link/HarbourMasters/Shipwright/actions/artifacts/2537850286.zip) - [soh-windows.zip](https://nightly.link/HarbourMasters/Shipwright/actions/artifacts/2537855021.zip) - [soh-linux.zip](https://nightly.link/HarbourMasters/Shipwright/actions/artifacts/2537867925.zip)

Copy link
Contributor

@aMannus aMannus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to bring up the naming point, and also tagged all the vanilla code changes. Most of these will likely just become a VB_Should. Might help with the effort to bring them over later, just figured it'd be nice to have an indication of how many there are and a list where we can cross them off as they are changed.

Comment on lines +2 to +4

#include "Anchor.h"
#include <nlohmann/json.hpp>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've thrown up this ball on discord recently, but I'd like to put it out there for more public consideration. So far, this has always been called Anchor, which makes sense when you're trying to communicate it being separate from SoH itself. However, now that we're looking to upstream this, I'd personally really like if we rename everything currently called anchor to something more directly descriptive.

For example, my personal recommendation: Online Multiplayer.

I know a lot of people know the name Anchor by now, but I think there's going to be issues with people that download a normal SoH build and seeing "Anchor" in the network tab without having the description from the Anchor PR that people have now. Compare that to them seeing "Online Multiplayer", I don't think I have to explain people are going to understand what that means more quickly.

Just food for thought, I don't think I'll ever be in a position to force a change like this especially with Anchor's history, but I do think this is the right move.

Comment on lines +770 to +775
// #region SOH [Co-op]
if (Flags_GetCollectible(play, this->collectibleFlag)) {
Actor_Kill(&this->actor);
return;
}
// #endregion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook material

Comment on lines -214 to +216
if (this->collider.base.acFlags & AC_HIT) {
// #region SOH [Co-op]
if ((this->collider.base.acFlags & AC_HIT) || Flags_GetSwitch(play, this->dyna.actor.params & 0x3F)) {
// #endregion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook material

Comment on lines -271 to 274
if (this->collider.base.acFlags & AC_HIT) {
// #region SOH [Co-op]
if ((this->collider.base.acFlags & AC_HIT) || Flags_GetSwitch(play, this->switchFlag)) {
// #endregion
Flags_SetSwitch(play, this->switchFlag);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook material

Comment on lines -129 to +132
if ((this->collider.base.acFlags & AC_HIT) && !Player_InCsMode(play) &&
(player->meleeWeaponAnimation == 22 || player->meleeWeaponAnimation == 23)) {
// #region SOH [Co-op]
if (((this->collider.base.acFlags & AC_HIT) && !Player_InCsMode(play) &&
(player->meleeWeaponAnimation == 22 || player->meleeWeaponAnimation == 23)) || Flags_GetSwitch(play, this->switchFlag)) {
// #endregion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook material

Comment on lines +152 to +158
// #region SOH [Co-op]
if (GET_GS_FLAGS((thisx->params & 0x1F00) >> 8) & (thisx->params & 0xFF)) {
Actor_Kill(&this->actor);
return;
}
// #endregion

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook material

Comment on lines +901 to +907
// #region SOH [Co-op]
if (GET_GS_FLAGS((thisx->params & 0x1F00) >> 8) & (thisx->params & 0xFF)) {
Actor_Kill(&this->actor);
return;
}
// #endregion

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook material

Comment on lines +58 to +64
// #region SOH [Co-op]
if (Flags_GetCollectible(play, 0x1F)) {
Actor_Kill(&this->actor);
return;
}
// #endregion

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook material

Comment on lines +128 to +131
// #region SOH [Co-op]
if ((func_80033684(play, &this->actor) != NULL) ||
((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x40000040))) {
((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x40000040)) || Flags_GetSwitch(play, this->actor.params & 0x3F)) {
// #endregion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook material

Comment on lines -174 to +179
if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x40000040)) {
// #region SOH [Co-op]
if (((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x40000040)) || Flags_GetSwitch(play, this->actor.params & 0x3F)) {
this->collider.base.acFlags &= ~AC_HIT;
this->hitCount++;
if (this->hitCount < 2) {
if (this->hitCount < 2 && !Flags_GetSwitch(play, this->actor.params & 0x3F)) {
// #endregion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook material

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants