After bundling an html5 application in production mode, some of my game objects don’t show up. If bundle html5 straight up - it’s fine, if I bundle it as an application in dev mode, it runs and shows everything, but it’s really slow.
I’ve tried with and without rendercam. Anyone have any tips?
Check that you don’t have multiple components such as sprites on the same z value. Components with the same z value may be drawn in a different order between debug and release builds.
I have checked the console and it doesn’t show anything.
I think the issue is with a factory - I have tried various z positions and it doesn’t seem to help - when I put in the component that the factory is generating, the component shows just fine. The components generated from the factory aren’t showing.
You have a function in level_maker.script which parses the string representation of a hash, for example [/collection0/foobar] to get the value within brackets: /collection0/foobar.
This will not work in release builds as we do not store the hash to string lookups in a release build. The hash will be just a number when converted to a string and your code breaks down as it fails to get a meaningful value back. You need to work around this and not rely on the reverse hash lookup.
PS I also noticed that a lot of your functions are global. It does not seem to be causing any problems at the moment but it can open up for nasty and hard to figure out bugs if two scripts or Lua modules define the same global function.
Instead of trying to loop through every element and setting it up that way, I just made the element post a message back to it’s parent. This works much better. Thank you for the last time! haha.