I built the apk file for my game, added the file to my phone, and when I play the game I run into glitches I’ve never ran into on simulator. The glitches are always different, sometimes it crashes the app sometimes it freezes it just for a few seconds, sometimes some of my images don’t load. It makes me very frustrated, because there was nothing buggy or wrong on the simulator. If I would to upload the same apk file to the android store, would It act the same and still be buggy, or will it behave normal like on the simulator? Also, how do I fix this?
The number 1 cause of “It works on the simulator but not the device” is file name case sensitivity. Device’s are case sensitive. OS-X and Windows are not. So if you try to load a file:
local img = display.newImage(“Bubba.png”)
and the file is “bubba.png”
it will work in the sim, but not on device. There are other things too like your computer having gigs of memory and your device probably having 1gb or less. The simulator can work with bigger textures and allow apps to access more memory. Somethings like native.* things, gameNetwork, facebook, etc. only work on devices or partially work on the simulator and code you right might be interacting with them differently than you would be in the simulator.
Rob
So the same way the file acts on my device it will act on the app store?
There are always exceptions, but yes, that should be the case. If you build with a debugging profile/keystore there is included debug code that you won’t have in the release build, so there is some wiggle room there for it to be a little different. There are also risks that your customers will have devices that don’t meet the standards of the devices you tested on. They could be on a poor performing device, low memory device, not have a 3rd party app installed that your app depends on, etc. that could cause your app to behave differently.
Rob
The number 1 cause of “It works on the simulator but not the device” is file name case sensitivity. Device’s are case sensitive. OS-X and Windows are not. So if you try to load a file:
local img = display.newImage(“Bubba.png”)
and the file is “bubba.png”
it will work in the sim, but not on device. There are other things too like your computer having gigs of memory and your device probably having 1gb or less. The simulator can work with bigger textures and allow apps to access more memory. Somethings like native.* things, gameNetwork, facebook, etc. only work on devices or partially work on the simulator and code you right might be interacting with them differently than you would be in the simulator.
Rob
So the same way the file acts on my device it will act on the app store?
There are always exceptions, but yes, that should be the case. If you build with a debugging profile/keystore there is included debug code that you won’t have in the release build, so there is some wiggle room there for it to be a little different. There are also risks that your customers will have devices that don’t meet the standards of the devices you tested on. They could be on a poor performing device, low memory device, not have a 3rd party app installed that your app depends on, etc. that could cause your app to behave differently.
Rob