Webassembly lost exceptions and regex troubles

Lost exceptions

An interesting feature of Emscripten, when starting a game loop through emscripten_set_main_loop, remember that exception handling must be re-added via try catch directly in the loop method, as runtime loses the try catch block from the outside.
The easiest way is to display the error text using the browser using javascript alert:


            catch (const std::exception &exc)
            {
                const char *errorText = exc.what();
                cout << "Exception: " << errorText << "; Stop execution" << endl;

                EM_ASM_(
                {
                    var errorText = UTF8ToString($0);
                    alert(errorText);

                }, errorText);

                abort();

Too complicated regexp

The regex implementation in std may throw an error_complexity exception if it finds the regex too complex. This happens in the current emscripten implementation, so I suggest you implement tests for parsing through regular intervals, or use third-party regex implementations.

0

Death Mask Dev Diary 1

The development of the game Death-Mask is in full swing, the logo of the Flame Steel Engine game engine has been added, the initial map selection screen for islands (green, red, black, white) has been added textures for walls, ceiling, maze floor, increased the size of the playing area.


Map of Red Zone City

Next, we plan to add 3D models for the environment, instead of Doom-style sprites, add models for weapons, boxes, enemies, friends. In the gameplay, it is planned to add currency, stores, the ability to buy parts of the game map indicating interesting places with loot, and the possible finding of the “Death Mask”. I also want to add the ability to hire companions for traveling through the cyber-labyrinth. Follow the news.

0