Whenever I launch an sfx I experience a clear delay in sound playback. And it’s not a problem with the build version (launched from the editor); the same problem is also there in the build release.
The game still runs at 60 fps on my mac. It seems that from the script up to fmod a lag is generated. I have to say that the input also has a bit of lag in the build version (from the editor) but it seems to me that there is no lag with the input in the RELEASE version.
Finally, the EDITOR-BUILD version takes an incredibly long time to load the proxycollections (and this is also new in the latest versions). Up to 5 sec. But this delay is not there in the release version.
Let me say that I am slightly worried about this delay with audio…
If you download the editor and build your project it will use the engine version that was released with the editor. If you don’t want to use the editor then download bob.jar and build/bundle from the command line instead.
Exactly the same as in 1.2.182, but now I’m not sure if there is a delay? Our sound designer convinced me of this and probably my judgement is still skewed. I need to discuss this with him again (tomorrow).
Anyway, I found that some bouncing objects, animated via go.animate with EASING_OUTBOUNCE, are out of sync. I remember looking at the source code to see the actual math function (an array) used for the bouncing easing and I remember the sfx’s were in sync. I don’t know how to explain that it doesn’t work anymore. I need to resynchronize them.
The loading of Collectionproxy in the build launched from the editor.
The 1.2.180 does NOT have this problem. Loading the collection takes a small fraction of a second while with 1.2.182 it takes about 5 seconds for the most complex collection. So something has changed here. Once again I am referring to the debug build launched via the editor. The release versions have no problems in both 1.2.180 and 1.2.182.
Is it expected that 1.2.182 will take longer to load a collectionproxy?
Are you loading your banks with fmod.studio.load_bank_memory(resource.load()) from custom_resources? That’s an inefficient way of loading banks, as it’s completely synchroneous. It hangs your game (and collection loading) until the bank is fully loaded in memory, then passes over that memory to FMOD (which also involves one or two memcpy()s if I recall correctly).
This is fine in development (and would yield the loading slowdown you mentioned), but for production you should be putting your banks in bundled resources and using studio.load_bank_file() (see defold-fmod’s README for an example how to do that). This allows FMOD to stream the banks from the file system.
@dapetcu21 thanks!!! I am doing what you are suggesting, and since long time. I have to say I am not 100% sure I do it correctly but I am quite sure
Moreover the collection loading slowdown appeared with 1.2.182. The same project loads the collections instantly with 1.2.80. Also, I read the banks (just a couple of banks for the whole game) only at boot time, never again later.
It would be very helpful if it isn’t an entire game but just a single collection. Working with a big project takes a lot more time while debugging an issue.
@britzl I think it is hard to show the issue without having a big collection. And it is also very time consuming to try and isolate the involved collection (the main gameplay action) from the rest of the game logic. However, I will do my best with this and send you the resulting project via DM.