giongto35 / cloud-game

Web-based Cloud Gaming service for Retro Game
https://www.youtube.com/watch?v=GUBrJGAxZZg
Apache License 2.0
2.31k stars 347 forks source link

Web rtc will disconnect when play game after some minutes #465

Closed guozanhua closed 1 month ago

guozanhua commented 2 months ago

After experiencing the game for a period of time, WebRTC will disconnect and F5 needs to refresh the page to continue the game. Can we capture the WebRTC disconnection event and automatically refresh the page

sergystepanov commented 2 months ago

That shouldn't be happening. Could you provide a bit more information? Do you run games locally or remotely? Which cores and games are you using, and how long does it take before a disconnect occurs?

guozanhua commented 2 months ago

I used the ppsspp core,you can download from below link and used below options in config.yaml

    psp:
      lib: ppsspp_libretro
      roms: [ "iso" ]
      folder: psp
      isGlAllowed: true
      vfr: true
      usesLibCo: true
      hacks:
        - skip_hw_context_destroy
      options:
        #            "ppsspp_software_rendering": enabled
        #            ppsspp_backend: auto
        #            "ppsspp_internal_resolution": 480x272
        ppsspp_analog_is_circular: disabled
        ppsspp_auto_frameskip: disabled
        ppsspp_backend: auto
        ppsspp_cache_iso: disabled
        ppsspp_change_mac_address01: 0
        ppsspp_change_mac_address02: 4
        ppsspp_change_mac_address03: 3
        ppsspp_change_mac_address04: d
        ppsspp_change_mac_address05: 3
        ppsspp_change_mac_address06: 2
        ppsspp_change_mac_address07: 7
        ppsspp_change_mac_address08: 7
        ppsspp_change_mac_address09: 6
        ppsspp_change_mac_address10: a
        ppsspp_change_mac_address11: b
        ppsspp_change_mac_address12: d
        ppsspp_change_pro_ad_hoc_server_address: socom.cc
        ppsspp_cheats: disabled
        ppsspp_cpu_core: JIT
        ppsspp_cropto16x9: enabled
        ppsspp_detect_vsync_swap_interval: disabled
        ppsspp_disable_range_culling: disabled
        ppsspp_enable_builtin_pro_ad_hoc_server: disabled
        ppsspp_enable_upnp: disabled
        ppsspp_enable_wlan: disabled
        ppsspp_fast_memory: enabled
        ppsspp_force_lag_sync: disabled
        ppsspp_forced_first_connect: disabled
        ppsspp_frame_duplication: enabled
        ppsspp_frameskip: disabled
        ppsspp_frameskiptype: Number of frames
        ppsspp_gpu_hardware_transform: enabled
        ppsspp_hardware_tesselation: disabled
        ppsspp_ignore_bad_memory_access: enabled
        ppsspp_inflight_frames: Up to 2
        ppsspp_internal_resolution: 480x272
        ppsspp_io_timing_method: Fast
        ppsspp_language: English
        ppsspp_lazy_texture_caching: enabled
        ppsspp_locked_cpu_speed: disabled
        ppsspp_lower_resolution_for_effects: disabled
        ppsspp_memstick_inserted: enabled
        ppsspp_minimum_timeout: 0
        ppsspp_port_offset: 0
        ppsspp_pro_ad_hoc_server_address01: 0
        ppsspp_pro_ad_hoc_server_address02: 0
        ppsspp_pro_ad_hoc_server_address03: 0
        ppsspp_pro_ad_hoc_server_address04: 0
        ppsspp_pro_ad_hoc_server_address05: 0
        ppsspp_pro_ad_hoc_server_address06: 0
        ppsspp_pro_ad_hoc_server_address07: 0
        ppsspp_pro_ad_hoc_server_address08: 0
        ppsspp_pro_ad_hoc_server_address09: 0
        ppsspp_pro_ad_hoc_server_address10: 0
        ppsspp_pro_ad_hoc_server_address11: 0
        ppsspp_pro_ad_hoc_server_address12: 0
        ppsspp_psp_model: psp_2000_3000
        ppsspp_skip_buffer_effects: disabled
        ppsspp_skip_gpu_readbacks: disabled
        ppsspp_smart_2d_texture_filtering: disabled
        ppsspp_software_rendering: disabled
        ppsspp_software_skinning: enabled
        ppsspp_spline_quality: High
        ppsspp_texture_anisotropic_filtering: 16x
        ppsspp_texture_deposterize: disabled
        ppsspp_texture_filtering: Auto
        ppsspp_texture_replacement: disabled
        ppsspp_texture_scaling_level: disabled
        ppsspp_texture_scaling_type: xbrz
        ppsspp_texture_shader: disabled
        ppsspp_upnp_use_original_port: enabled
        ppsspp_vertex_cache: disabled
        ppsspp_wlan_channel: Auto

========================================== play remote service for some times, the rtc will disconnect,need F5 refressh to continue game

sergystepanov commented 2 months ago

@guozanhua, so only when playing on a remote server? By remote I mean a server in the Internet.

sergystepanov commented 2 months ago

@guozanhua, I added Shin Megami Persona 3 to cloudretro.io, you can try it. I can't reproduce your issue both locally and remotely. (only found that it can't save psp states for some reason [added new skip_same_thread_save hack as a workaround] :/)

guozanhua commented 2 months ago

@guozanhua, so only when playing on a remote server? By remote I mean a server in the Internet.

Yes, By remote server in the internet。We upgraded the server configuration and will observe for a period of time to see if there are any issues. I will provide feedback

sergystepanov commented 2 months ago

@guozanhua, so only when playing on a remote server? By remote I mean a server in the Internet.

Yes, By remote server in the internet。We upgraded the server configuration and will observe for a period of time to see if there are any issues. I will provide feedback

Sure. Btw, cloudretro.io is powered by the cheapest DigitalOcean VPS (USA, droplet: 1 core, 1 GB) in terms of comparison with your server.