Skip to content

WASM/Emscripten port (SuperTux in the browser) #1696

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

Merged
merged 21 commits into from
May 8, 2021
Merged

Conversation

Semphriss
Copy link
Member

@Semphriss Semphriss commented Mar 9, 2021

Screenshot from 2021-03-08 22-31-12

TODO's & FIXME's

Known issues

User experience:

  • Crash (Segmentation fault) whenever playing a level
  • No audio
    • Now the audio is there, but whenever a sound stop playing, OpenAL crashes (see this issue)
  • Extreme lag
  • Refreshing makes the game twice as laggy (probably in link with the memory leaks)
  • No data is saved when closing the tab/browser or when refreshing
  • Add-ons are disabled, but appear as they can't download anything. (If I could compile cURL with OpenSSL for Emscripten...)

Code quality:

  • Very poor-quality changes
    • Fix the comments in the CMakeLists.txt file
    • Find a way to not have to put the OpenAL headers from Emscripten in the repo (locate then in the Emscripted SDK)
    • Repair that poor ScreenManager who's probably agonizing at the moment
  • Memory leaks in the main function
  • Poor memory lifetime management
  • HTML template is the default Emscripten template

Potential additions

  • Content integration
  • Hide the "Quit" button, which doesn't make much sense on the browser (will also be useful for mobile ports)
  • A method to save levels to disk and load levels from disk
  • A method to save preferences, progress, possibly saved levels and others in the user's browser (localStorage) Not cookies please, they have a size limit and they're sent with each request, nor very good for efficiency, privacy and speed
  • A warning before the game launches to tell the users that the web version is laggy and unstable and doesn't save data reliably, and to prefer using the native version instead

@Semphriss Semphriss marked this pull request as draft March 9, 2021 03:38
@Semphriss Semphriss force-pushed the wasm branch 2 times, most recently from a0b478d to ed1d925 Compare March 9, 2021 04:12
@Semphriss Semphriss force-pushed the wasm branch 3 times, most recently from 5bf0516 to 430f5da Compare March 29, 2021 23:17
Semphris added 12 commits March 30, 2021 10:29
FIXED: Now audio plays
FIXME: Whenever a sound stops playing (like the music stopping when entering a worldmap, or, on the main manu, when SuperTux jumps and the jump sound finished playing), OpenAL crashes the game with 'TypeError: src.audioQueue is undefined', see emscripten-core/emscripten#13797
FIXED: OpenAL no longer crashes the game (dirty fix)
- The game now uses a custom HTML template
- The game now follows the size of the screen (changeable in the option menu)
- Adapted CI to use the custom template
…removed a now-untrue line at launch (WASM)
FIXME: Does not compile; unique pointers require the appropriate #includes.
@Semphriss Semphriss marked this pull request as ready for review April 18, 2021 04:12
@Grumbel Grumbel merged commit b54220f into SuperTux:master May 8, 2021
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