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

The new TetaNES Web feels choppy compared to the previous version #241

Closed
sn-o-w opened this issue May 20, 2024 · 4 comments
Closed

The new TetaNES Web feels choppy compared to the previous version #241

sn-o-w opened this issue May 20, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@sn-o-w
Copy link

sn-o-w commented May 20, 2024

Hi there,

I want to report another issue: https://youtu.be/FxgjxAllZts

Look at the above video.

In the first ~38 secs you can see the current TetaNES web version. Afterwards, you can see another TetaNES web instance, but based on an older version (the same version you had on your website before).

Super Mario Bros seems much smoother on the previous TetaNES web version. I loaded the same NES file in both instances.

I went full turbo, pressing X continuously in both instances of TetaNES.

I created my own small instance of TetaNES just for a sole purpose - to play Super Mario Bros and to have small buttons like "Mute/Unmute" and "Pause/Unpause" and to be extremely easy to use for everyone + the webpage is in Romanian.

@github-actions github-actions bot added the needs-triage Requires label and response. label May 20, 2024
@lukexor
Copy link
Owner

lukexor commented May 20, 2024

Thanks for reporting. Depending on your hardware, the previous version could certainly be smoother as it was a very thin wrapper of JS around the core emulation. It also didn't have any features enabled except basic controls and sound. It required a completely separate code path and build script. It also really suffered on older machines with audio dropouts constantly, hence changing the default to be muted.

The current version certainly needs some more fine tuning and I'm planning to explore wasm threads as a way to offload the emulation to web workers and prevent any GC pauses from causing frame drops. However, the gains with the new architecture are huge and there have been a number of core performance improvements in the emulation itself - however it has incurred extra overhead to run through Winit/wgpu whereas before it was simply blitting the frame to the canvas.

Same code path for desktop and for web, simpler build, and most of the same features with more coming as soon as I can add file storage support for things like save states:

  • UI menus and configuration
  • Custom keybinds
  • Gamepad support
  • Video Filters
  • NTSC and PAL emulation
  • Run Ahead
  • 4 player
  • Zapper Gun (with mouse)
  • Game Genie Codes
  • Speed Changes
  • Rewind

I'll leave this open for now as I continue to work on smoothing things out.

@lukexor lukexor added enhancement New feature or request and removed needs-triage Requires label and response. labels May 20, 2024
@lukexor
Copy link
Owner

lukexor commented May 28, 2024

This was fixed in e257575 which was unintentionally blocking on a mutex lock for requesting redraw.

@lukexor lukexor closed this as completed May 28, 2024
@sn-o-w
Copy link
Author

sn-o-w commented May 29, 2024

This was fixed in e257575 which was unintentionally blocking on a mutex lock for requesting redraw.

Maybe you should release v0.10.1 or v0.11.0 since there are many improvements, especially for the web version. 😊

@lukexor
Copy link
Owner

lukexor commented May 29, 2024

Maybe you should release v0.10.1 or v0.11.0 since there are many improvements, especially for the web version. 😊

working on it! I think I've finally narrowed down the major issue with Firefox, though it's still not as smooth as other browsers.

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

No branches or pull requests

2 participants