[SOLVED] App bundle behavior different than editor behavior

Hi!

Are there special considerations when bundling an app that I am not aware of? I have my app working fine when I run from the editor but it doesn’t when running its associated bundle.

More specifically, the splash screen works the same and then my level 1 collection loads fine. But then when I use the mouse and click onto the play area, tiles are not spawn and displayed as they are with the editor build. The tile factory is in the main collection as it will be reused for all levels.

I am using the latest 1.9.2 version of defold on Windows 10.

Thanks!

Do you have errors when you run it from terminal?
Also this might be a reverse hash lookup problem. If you are relying on the reverse hash lookups it might be the cause.

1 Like

So no error on the terminal.

What do you mean reverse hash lookup? Looking up a value in a table using a hash as a key? I am doing this yes. Could that be the problem? Aren’t hashes just numbers? If not, why can’t we unhash?

Thanks for the quick feedback!

Release builds will not do reverse lookups of hash values when calling tostring(). What this means in practice is that a tostring() for a value of type url or hash will return its numeric representation and not the original string ('hash: [/camera_001]' vs 'hash: [11844936738040519888 (unknown)]')

1 Like

Ok so not sure I understand. I am not reverse engineering a hash explicitly, e.g. calling tostring on it and expecting to read back my string pre-hashed. So unless this happens implicitly when using hashes as keys in tables, I am clueless as to why my app would not work.

Ok so silly me should read the manual… I must include my JSON file (where I store important data to retrieve my sprite images) as well as obviously the dictionary for my game in a “common” folder and add this folder to the bundled resources in project options. Will try that!

So I chose to package the resources as custom resources instead. It works on my machine.

Next time I’ll try to RTFM !!!

1 Like