Skip to content

Refactor Easy Netplay scripts.#1891

Open
XK9274 wants to merge 32 commits intomainfrom
consolidate-netplay-scripts
Open

Refactor Easy Netplay scripts.#1891
XK9274 wants to merge 32 commits intomainfrom
consolidate-netplay-scripts

Conversation

@XK9274
Copy link
Member

@XK9274 XK9274 commented Jan 21, 2026

Sizeable refactor to the easy netplay scripts, some small behavioural changes.. Mostly structural to make it easier to maintain.
I've tested the scripts w/ Pokemon Red, Blue (GB/GBC scripts) and FireRed / LeafGrean (GB/GBA scripts), Balloon kid (Standard EN Scripts)
A few disconnects across many tests, likely due to the network card as unreproducable and entirely random (Which happened in previous EN versions anyway)
Not tested on Mini Flip as i don't have the devices.

  • Added new files easy-netplay_common.sh and easy-netplay_signalling.sh, consolidated duplicate helpers into easy-netplay_common.sh and easy-netplay_signalling.sh.
  • Standardized tunables and moved sleep/delay/size constants to a single Tunables section in *common.sh.
  • Ensured client confirm panels are gated until the host starts the game (host_ready sentinel).
  • Cleaned up comments above functions to match actual behavior.
  • Reduced duplicated string processing by centralizing name stripping helpers.
  • Added shared env setup file to remove duplicated top-of-file env blocks.
  • Centralized cleanup via a shared helper and added per-file removal logging.
  • Added file-state logging around save backup/return to aid debugging and trace transfer paths.
  • Added network reachability waits before transfers and tweaked hotspot IP acquisition fallback windows.
  • Dropped unused stop flag cleanup in the GBA client startup path.
  • Skip FTP warmup delay after the first successful HEAD check to reduce repeated sync pauses.

Shared helpers moved into easy-netplay_common.sh

  • build_infoPanel_and_log
  • checksize_func
  • checksum_func
  • enable_flag / disable_flag / flag_enabled
  • is_running
  • restore_ftp
  • udhcpc_control
  • url_encode
  • strip_game_name shared ROM name cleanup
  • format_game_name label/prefix-aware naming
  • wifi_disabled
  • read_cookie optional verbose
  • start_ftp optional preflight check_stop message
  • check_ftp_local
  • ensure_ftp_head
  • check_wifi parameterized
  • sync_file shared FTP download/verify logic
  • create_cookie_info cookie writer with size-gated checksums
  • remove_files rm -f with per-file echo
  • netplay_cleanup shared cleanup pipeline
  • log_file_state quick existence/size/hash logging

Shared helpers moved into easy-netplay_signalling.sh

  • notify_peer supports notify_peer or notify_peer
  • check_stop supports message arg
  • notify_stop
  • ready_up
  • wait_for_client
  • wait_for_client_network
  • wait_for_host updated user-facing copy

Shared env setup moved into easy-netplay_env.sh

  • sysdir, miyoodir
  • LD_LIBRARY_PATH exported
  • hostip and peer_ip defaults exported

XK9274 added 30 commits January 17, 2026 21:13
…ll never recover even after 3 attempts. change attempts to 3, change interval to 0.5
…st & we'll never recover even after 3 attempts. change attempts to 3, change interval to 0.5"

This reverts commit d848402.
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.

1 participant