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 game does not properly fall back if textures don't load #840

Closed
5 tasks done
doktorocelot opened this issue Dec 7, 2021 · 3 comments
Closed
5 tasks done

The game does not properly fall back if textures don't load #840

doktorocelot opened this issue Dec 7, 2021 · 3 comments
Labels
bug Something is not working properly feat: ui Affected feature: UI never-stale Cannot go stale

Comments

@doktorocelot
Copy link

Checklist

  • I've checked both open and recently closed issues to ensure this issue is not already reported.
  • I am using the newest version of TETR.IO.
  • I am using a supported browser or the Desktop Client.
  • I am not using anything that modifies game code (e.g. TETR.IO PLUS).
  • I am certain this is a bug, not a feature request.

OS and Version

Windows 10 Pro 10.0.19041

Browser and version

Chrome 96.0.4664.45

Describe the bug/issue

If the game cannot load image texture files, (for example, the skin texture), the game fails continue the code execution. While this isn't 100% necessary, gracefully falling back upon the textures' failing to load might be a good consideration.

Reproducing

Start a game without the skin file being present; you can reproduce this manually by forcibly blocking the file in Chrome dev tools.

Expected behavior

If the game cannot load the image file for something, have an emergency fallback that does not cause the JavaScript to throw and stop execution. For example, if the skin does not load, continue to play the game but with flat colors. If the ghost fails to load, use a faded version of the piece or don't show anything at all. Additionally, the game may automatically send a report for debugging.

Screenshots

image showing the tetrio board without the proper skins and black active piece

Console logs

image

Additional context

Truthfully, this shouldn't be an issue unless something catastrophic happened with the web server. However, as the game may transition to including many skins as indicated by #359, it is probably a good idea to have this set up (additionally trying the default skin first, then the emergency fallback) so the game does not hang just because the server failed to retrive a skin of another player, which isn't neccesary to continue code execution.

@doktorocelot doktorocelot added the bug Something is not working properly label Dec 7, 2021
@ZaptorZap
Copy link
Member

ZaptorZap commented Dec 7, 2021

I've seen this happen rather often with players' averagely bad internet many times over the course of 6.1's existence, and I swear some have played sprints to completion with this "flat skin" before it loaded(likely because it simply timed out). It's a bit late here now and I can't find any footage they took, but I was still interested to see it for myself. Here's a video:

bad-fallback.mp4

The behavior in this video reminds me of similar behavior when you set invalid maps, actually. Holding with a map defined "b" piece will cause the same results. You mentioned other players' skins failing to load, so I had to see if the issue persisted in QUICK PLAY considering this is where the fallback is intended to be used, in player thumbnails.

bad-QP-fallback.mp4

Probably somewhat of an expected result, though, it works fine if you don't focus on anyone. I suspect in a real situation where multiple skins are used, of course assuming this bug isn't fixed until then, the "SHOW DUELS SIDE BY SIDE" option, in tandem with the "ALWAYS SIMPLIFY MULTIPLAYER THUMBNAILS" option, should be a workaround-fix altogether.

(What if, after this+the active piece being darkened out was fixed, this was a legitimate skin option though? I quite fancy the color choice used here since it works so well with the bloom, and I know everyone just cannot get enough of their Jstris solid color fix. I imagine there's somewhat of a performance aspect to this "skin" too.)

@ZaptorZap
Copy link
Member

I've got a small update from osk a while back (01/17/2022 UTC)

theres 2 different issues here
① active piece is rendered black while it should be lighter ver of piececolor
② piece flash isnt baked yet so it crashes

(piece flash is baked dynamically to adapt for semitransparent skins)

So it turns out we were blindsided by our graphics options, since it seems the only people who bothered to double check on this issue were the ones with ULTRA graphics selected. This explains why I recall it not effecting other users, since it seems like everyone else is on a Chromebook with MINIMAL graphics nowadays....here's a video of what that would look like, by the way:

works.in.minimal.mp4

So yeah, not entirely fixed but not entirely broken. This also works on LOW graphics, but it fails to render starting at MEDIUM and higher.(I legitimately thought piece flash was still limited to HIGH and higher. Guess the effect's gotten cheaper since, since you can't even use a slider to turn it off on these graphics options anymore. That's fine by me though)

@ZaptorZap ZaptorZap added feat: ui Affected feature: UI never-stale Cannot go stale labels Apr 8, 2022
@o5k
Copy link
Member

o5k commented May 22, 2022

Fixed in next patch.

@o5k o5k closed this as completed May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working properly feat: ui Affected feature: UI never-stale Cannot go stale
Projects
None yet
Development

No branches or pull requests

3 participants