Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Paul Gene Thompson
    @PaulGene
    Also NME wont go full screen on Android devices with in-screen cameras... think it's something to do with new safe insert API's / cutout settings
    Paul Gene Thompson
    @PaulGene
    I'll look into it
    Paul Gene Thompson
    @PaulGene
    I still cant fix the sound crash :(
    Is there only 1 sound engine option on iOS ?
    anyone out there
    Hugh Sanderson
    @hughsando
    Looks like a pretty innocuous call. Must be the sourceId - possibly closed already? Or perhaps some other buffer-overwrite thing that has stomped on memory.
    ios has the "AvPlayer" sound, which I thought was the default.
    I notice "getLeft" and "getRight" protect the get call with "if (sourceId)..." in case the sound has been stopped. Maybe this is all that is needed.
    Hugh Sanderson
    @hughsando
    Probably "setPosition" and "bool playing()" too, just to be paranoid.
    looks like "avplayer" is default for mp3 - I assume you have non-mp3 files?
    Paul Gene Thompson
    @PaulGene
    Hi thanks Hugh, funny thing is I switched from mp3's to wav's because it was crashing!
    I did loads of tests back then and it was solid with wavs + openal , I think something weird is going on and a native extension is causing some mischief
    But, it sounds like it could be a good idea to put those null checks in anyway
    Hugh Sanderson
    @hughsando
    What wold be handy is a way to make it crash. like spamming a whole bunch of start-stops in a loop or starting 50 sounds at the same time, or something that your app is doing other than just play tracks start-to-finish or maybe doing something like removing the track in its own on-finish callback.
    Also, forced garbage collections at odd times, like right after a sound start started or stopped or removed.
    If the sourceId is null, logging when it is made null (failed to load, force stopped, app lost focus, ad started etc) would be handy.
    If it is an external library, the main candidate would be starting or stopping the sound from the non-main thread. It might be worth putting some kind of runtime check in.
    Paul Gene Thompson
    @PaulGene
    It looks like audio changes made to NME Host v6.1.5 from v 6.1.4 are where my crash problems came in
    There are lots of audio changes in sound.h / audio.h / IosSound.mm / OpanALSound.cpp / Sound.cpp / Sound.hx
    But I can't find any pull requests or commits on github related to the changes!
    So I've just rolled back for now and everything is ok
    Yes you are right on a making a sound test sample to help find these problems, its something on my to-do list
    I need to get one more Renegade Racing content update out next month and then hopefully I can commit some time to NME
    Hugh Sanderson
    @hughsando
    Ok, it's good to know where to look.
    Hugh Sanderson
    @hughsando
    The the sound changes were to allow multiple "suspends" to be put on the sound. For example, if the app goes inactive, then the sound should stop. If the developer wants to show an ad, the sound should also stop. But then say the ad finishes and the sound resumes - but maybe the app is still inactive, so it actually should not resume. haxenme/nme@fb8bde8
    The total effect might be that the sound is suspended longer than it used to be and then a sound might "finish" while it is also suspended and this is causing a logic error. I'm just guessing here. There might also be a bug somewhere.
    Paul Gene Thompson
    @PaulGene
    Ah the AppLovin commit, I ignored that thinking it wouldn't be related to sound :D
    Really I need to find out exactly what is causing the crashes in avplayer (mp3s) and the latest changes, as soon as this Renegade Racing update is out I'll be on it...
    Hugh Sanderson
    @hughsando
    The latest version of Nme has an experimental metal backend for iOS and mac. You can try it with <haxedef name="nme_metal" /> in your projects.
    The downside is that you can't use WebGL Api with this backend. The upside is that the BunnyMark runs literally 10x faster on my laptop, although on older iOS hardware, I could not really see any difference. I consider the laptop difference more a statement of how bad the mac opengl support is, rather than how good metal is. Or maybe opengl is somehow not using the main GPU.
    Anyhow, let me know if you see any visual artefacts.
    Paul Gene Thompson
    @PaulGene
    :o cant believe you got that working already
    I'll test it out tonight
    Paul Gene Thompson
    @PaulGene
    Just building now, Renegade Racing should be great for stress testing this
    I will run a few devices in autoplay mode
    Hugh Sanderson
    @hughsando
    Nme had already separated the hardware geometry/calculations from the actual rendering, so it was less then 1000 lines of code for metal. Makes me think a specific directX driver may be worthwhile - again, without the webgl Api.
    Carlos Madrazo
    @madrazo
    @hughsando we have a DirectX11 (XB1) target from 2017 openfl-legacy. Would be useful instead of Angle? Nowadays I think there is a chance for getting permission to releasing it
    Paul Gene Thompson
    @PaulGene
    @hughsando I'm getting a black screen on an iPhone 6s
    Cant see any error messages
    The game seems to be running fine, just a black screen
    On an iPad 4 I'm getting:

    20-10-22 09:47:15.017673-0700 RenegadeRacing[898:142850] Metal GPU Frame Capture Enabled
    2020-10-22 09:47:15.018621-0700 RenegadeRacing[898:142850] Metal API Validation Enabled
    2020-10-22 09:47:15.722752-0700 RenegadeRacing[898:142850] [CAMetalLayer nextDrawable] returning nil because device is nil.
    2020-10-22 09:47:18.235385-0700 RenegadeRacing[898:142850] * Terminating app due to uncaught exception 'Failed to compile shaders', reason: '(null)'

    * First throw call stack:

    (0x1c0b7b3d 0x1b33f067 0x1c0b7a85 0x88666f 0x8854b5 0x861b6f 0x92a3bd 0x92e5c7 0x92e5c7 0x937571 0x93bd41 0x24cd53 0x4aa8cd 0x2d19cd 0x4ab3b1 0x4ab747 0x775193 0x771b87 0x93b7b9 0x936f8b 0x7e651b 0x7e63f9 0x1977e93 0x1ee4a9f1 0x1ee4a839 0x1e2ef1bf 0x1c308a7f 0x1c060c19 0x1c07465f 0x1c073ebd 0x1c071eab 0x1bfc51af 0x1bfc4fd1 0x1d76fb41 0x21347a53 0x7e931b 0x93acc5 0x2d1671 0x441b3f 0x20b6ad 0x75c19d 0x79968b 0xbc66b 0x1b7b24eb)

    Paul Gene Thompson
    @PaulGene
    Not sure directx is worth the effort, OpenGL is working fine on Windows and I cant see Microsoft banning it any time soon
    Hugh Sanderson
    @hughsando
    Looks like it is not creating the context. This should be happening in setupStageLayer from UIStageView template. Do you override this template? Do you see "setupStageLayer" in a debug layer. I wonder if it is to do with how it is launched. I will try some other apps/devices.
    Hugh Sanderson
    @hughsando
    OpenGL being a bit flakey is the main reason for the Angle library. I think recent nvidia/amd cards work ok, but some embedded systems really (did) benefit from DX over Opengl., not sure what the state of that is now. I guess xbox/windows apps too.
    Is anyone using WebGL stuff in anger? I have been thinking about doing some 3D and wondering if anyone has any ideas or suggestions here.
    Paul Gene Thompson
    @PaulGene
    I'm not overriding UIStageView
    codeservice
    @codeservice
    3D works well for me on NME with classic OpenGL, I am running Away3D without many problems on it. What I am thinking, if so many developers familiar with OpenGL, maybe its resonable to keep supporting OpenGL shaders and provide coverters for different systems. Theoretically Anger should do that, but I didnt really try this yet. Shaders is key for 3D and custom graphics efects, it will be great to have unified standart here
    Hugh Sanderson
    @hughsando
    Yes, I think Kha and maybe Heaps have a solution here. My understanding is that they use a slightly different language that compiles to opengl/metal/vulcan/dx as required. It might be possible to steal a library, or do something like a "KhaView" or "HeapsView" like the current "OpenGLView" and insert it into the 2D scene graph. Or, as you say, use some of the Angle libraries.
    codeservice
    @codeservice
    Also, whats interesting, Away3D using AGAL. NME converting it to OpenGL shaders. Probably Adoby made AGAL as unified standart language for shaders, same idea to have something universal