Moros1138 / PGEtinker

Interactively create an olcPixelGameEngine application from inside your browser!
https://www.pgetinker.com
37 stars 0 forks source link

Error when trying to run TEST_QuickGUI.cpp #119

Closed lcarlier closed 4 months ago

lcarlier commented 4 months ago

Describe the bug I'm trying to run the TEST_QuickGUI.cpp from OLC repo. https://github.com/OneLoneCoder/olcPixelGameEngine/blob/master/examples/TEST_QuickGUI.cpp

To Reproduce Steps to reproduce the behavior:

  1. Connect on pgetinker
  2. Copy raw file to editor
  3. Click run

Expected behavior Expected to see the output. But I see an error

Screenshots image

2 error seen in browser console

emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up. [srcdoc:4286:12](about:srcdoc)
    _emscripten_set_main_loop_timing about:srcdoc:4286
    _eglSwapInterval about:srcdoc:5618
    x about:srcdoc:7040
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:0
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:659005
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:610473
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:296304
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:355676
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:15941
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:68961
    x about:srcdoc:7072
    createExportWrapper about:srcdoc:859
    callMain about:srcdoc:7905
    doRun about:srcdoc:7955
    run about:srcdoc:7966
    (Async: setTimeout handler)
    run about:srcdoc:7962
    runCaller about:srcdoc:7890
    removeRunDependency about:srcdoc:793
    receiveInstance about:srcdoc:939
    receiveInstantiationResult about:srcdoc:957
    (Async: promise callback)
    instantiateArrayBuffer about:srcdoc:894
    instantiateAsync about:srcdoc:906
    createWasm about:srcdoc:976
    <anonymous> about:srcdoc:7458
Uncaught TypeError: GLctx is undefined
    _glCreateShader about:srcdoc:6446
    x about:srcdoc:7040
    x about:srcdoc:7072
    createExportWrapper about:srcdoc:859
    callMain about:srcdoc:7905
    doRun about:srcdoc:7955
    run about:srcdoc:7966
    setTimeout handler*run about:srcdoc:7962
    runCaller about:srcdoc:7890
    removeRunDependency about:srcdoc:793
    receiveInstance about:srcdoc:939
    receiveInstantiationResult about:srcdoc:957
    promise callback*instantiateArrayBuffer about:srcdoc:894
    instantiateAsync about:srcdoc:906
    createWasm about:srcdoc:976
    <anonymous> about:srcdoc:7458

Desktop (please complete the following information):

Smartphone (please complete the following information): NA

Additional context NA

lcarlier commented 4 months ago

I just noticed that none of the examples are working

Moros1138 commented 4 months ago

Unable to reproduce on latest stable Firefox, Chromium and Chrome on Manjaro Linux

see: https://pgetinker.com/s/Jv7ONT7wOdB

lcarlier commented 4 months ago

I had to restart my PC. I went through an upgrade and probably something wasn't right.

Moros1138 commented 4 months ago

glad it was something easy! Gonna close as finished :)

lcarlier commented 4 months ago

Must be the fasted bug resolution ever ;)

Moros1138 commented 4 months ago

I'll take it! If you don't mind my asking, what do you think so far?

lcarlier commented 4 months ago

It's a very cool project!

I was very intrigued because it looks exactly like compiler explorer (I'm a big fan of that project) but with the fact that you get the GUI.

I never used OLC engine before but I'm following Javidx on Youtube. I think this project is a massive help for him as we can now experiment his engine without the faf of cloning and installing his library. I will definitelly play with OLC now.

If I may I would suggest adding Cmake support like so: https://godbolt.org/z/xvr1revxo I can imagine people developping and sharing actual useful application (like in the Jam) via this platform.

Thanks for making this tool! Very useful!

Moros1138 commented 4 months ago

Matt Godbolt is a world treasure!! For the longest time Compiler Explorer was the yard stick by which I measured my progress and I use a few of the same libraries his Compiler Explorer uses (Golden Layout and Monaco Editor) to name the most obvious similarities.

Regarding "Projects". People have asked for multiple file/project style development, on the discord server. While I admit it might be cool it's also beyond the scope of PGEtinker's mission. PGEtinker is first and foremost a learning tool that can also be used to do quick prototyping and coding on the go.

It is my opinion that people wanting to develop a serious project should do so using serious tools, a proper IDE and compiler. My opinion about this might change, it depends on how many supporters ask for this feature.

That said, you mention jams. You can write a program using PGEtinker and under the Share menu is the option to download the entire PGE program as an HTML file. You can then host it on your own site, or upload it to your favorite jam platform (like itch.io)

You're very welcome and I'm glad you find it useful!