Web port
Hi,
first of all, great game! :)
I try to port the game in the browser. But I am running into an issue using an OpenGL translation library https://github.com/ptitSeb/gl4es/issues/472
Basically, those alpha blended wall brown structures (which are destroyable with the first weapon upgrade) are not visible at all.
Perhaps there are some "special" OpenGL functions used which are not supported by gl4es?
Have a nice week midzer
Thanks for the interest! It would be fun to see the game get ported.
Azimuth's graphics rendering is written in old-timey immediate-mode OpenGL, and uses some deprecated features that, to the best of my knowledge, aren't supported by GLES. In particular, the brown destructible girder-like walls are drawn using GL_QUADS, but I don't believe that's a supported draw mode in GLES, so perhaps the translation library can't handle it.
If glBegin(GL_QUADS) isn't supported, then porting may well require rewriting a bunch of the rendering code to draw those game objects with e.g. separate GL_TRIANGLE_STRIPS instead, which would be a fair bit of work to rewrite and test. I don't know whether or not there's an easier solution.
Thanks for the reply @mdsteele
When linking azimuth with legacy GL emulation https://emscripten.org/docs/porting/multimedia_and_graphics/OpenGL-support.html#emulation-of-older-desktop-opengl-api-features there are undefined symbols like glGenLists, glNewList, glEndList and glVertex2d.
So, I have to rely on gl4es for now and investigate how solve this (minor) graphical issue described in first post.
Finally, I got it working:
https://midzer.de/wasm/azimuth/
Thanks again for your detailed explanation @mdsteele
Relevat GL_QUADS -> GL_TRIANGLE_STRIPS changes in https://github.com/midzer/azimuth/tree/replaceQuads
Emscripten relevant changes in https://github.com/midzer/azimuth/tree/emscripten
P.S.: Some walls still appear to be invisible, after you got the Charge beam.
This is so cool! I gave it a quick try, playing through the first boss. Really neat to be able to play the game in a browser.
A few notes while I'm thinking of them:
- I see what you mean about the invisible walls. I believe those ones are drawn via
GL_QUAD_STRIP. Changing that toGL_TRIANGLE_STRIPmight fix it, not sure. - There were a few other graphics (like the player ship and the save stations) that didn't look 100% right; I'm guessing that's a consequence of turning
GL_QUADSintoGL_TRIANGLE_STRIPwith no other code changes. Probably fixable case-by-case, but that would be more work. - On my machine at least, the game was dropping frames in a couple of rooms (the Charge Gun room and the first boss room, I think?). Not sure how to address that; maybe legacy GL emulation is just slow.
- My saved game didn't seem to persist when reloading the page; is it expected to? If not, perhaps that could be hooked up to
localStoragesomehow.
@midzer, is there a chance that the port will be up again? https://midzer.de/wasm/azimuth/ Sounds amazing.
@zapalagrzegorz Link works for me.
I needed time to recover from my embarrassment. I just didn't realise that I was supposed to click on 'Load'. Is there any perspective to save the state into browser memory? @midzer