Hey everyone so I'm trying to get my game out for testing to family/friends and need to deploy to android. I successfully followed this guide:
http://giderosmobile.com/DevCenter/index.php/Deployment#Android_deploymentThe game deploys successfully and crashes on my phone which I knew it would do.
I've been using gideros for over a year, but through LUA Glider 1.9 and now 2.0 (gideros studios is nice to get started but needed a better IDE).
Everything runs fine in Lua Glider (I believe this is because Glider generates its own project file). However when .gproj files are generated in LUA glider(and Gideros Studios), they show incomplete paths and my game states that there are missing files in gideros studios and subsequently crashes due to this. It does this also when deploying to device.
I realize that in Gideros studios you need to manually add and remove files/folders because it does not update automatically when you modify the project files/folders directly.
So without having to manually adjust the .gproj files and fix it all in Gideros Studios(not to mention every time I change something in Glider) just to get a deployed game out. Is there an alternative way or plugin to do this? I'd appreciate any help. Thanks!
Comments
If I manually started a new project and added in each file and folder paths and dependencies, everything would work properly but that is too much just to get a build out for testing.
It might not work only with absolute paths, when you move the project. So don't move the project from where you run it in Glider, go to Gideros Studio an navigate to the same gproj file which Glider uses, so all paths would be in same places.
So I believe I found and fixed the problem(For virtual player and direct play to device ONLY) but heres something funny:
So at first I just basically opened my project with GliderGenerated.gproj. It ran perfectly fine on the Virtual GiderosPlayer via desktop. However, anytime I ran it directly to device or deployed it to device, it would crash with the same path error.
Then I finally looked into the gproj file and have always noticed(not sure if this was Glider or Gideros Studio that did this in the past) how most of the file paths used / but some of them used \. I never questioned this as the virtual player always ran it fine..
Simply changing the \ to / fixed the problem. Now the game runs fine on device and Im assuming it will deploy to device and run the same.
Im curious if this is a bug with Gideros or Glider gproj generation? If so, how does it run fine still in desktop player?
Thanks for your guys help and input.
EDIT UPDATE:
So everything works fine until I want to deploy it. When deployed to device, it crashes in the exact same spot as it did before.
So most probably Glider generates OS specific paths, or something like that
About deployment to device, if you are talking about android, there are some differences in the file system, so
1) make sure paths start with file name or directory for android:
Wrong: Texture.new("./images/image.png")
Right: Texture.new("images/image.png")
2) file names are case sensitive, so if you have file named image.PNG, then calling it
Wrong: Texture.new("images/image.png")
Right: Texture.new("images/image.PNG")
Hope that helps
Is there a way to debug this when in Eclipse to see the exact error (even though I suspect it to be the same)? Similar to the debug console in Gideros Studios etc. The only way I did this before was debugging through desktop player or launching directly to device.
To open the .apk file just change the .apk to a .rar/.zip etc. in your bin folder.
I have one closing question. To make this process easier since Im now using the one-click deployment and not eclipse.. How could I debug the game when its on the phone? Logcat seems to just tell me what im clicking on yet it doesnt throw any errors when it crashes.
Thanks again for the help, SO happy to finally get over this hurdle.