Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Updating an app without submitting a new apk
Started by QuizMaster Jan 02 2016 10:37 AM

- - - - -
16 replies to this topic
update app

Best Answer Alex@Panc , 02 January 2016 - 11:04 AM

Regarding your second scenario: Lua files which were used to build your app can't be updated without directly modifying them and uploading a new version of your app. I of course can't speak to your app structure or what you evaluate as a minor bug, but if the bug relates to something in your *.lua file tree, then you'd be out of luck there. This is for several reasons, the most important of which being security.

 

However, to expand on your first scenario, there are several forum threads that discuss how one can deliver an app that pulls down assets (graphic or otherwise), so as to keep the original app download size small, and optimize asset use in such cases as you refer to above:

 

 

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

QuizMaster

[GLOBAL: userInfoPane.html]
QuizMaster
  • Contributor

  • 235 posts
  • Corona SDK

Happy New Year everyone!

 

I'm looking for advice on the best way to update an app on the fly.

 

Let me explain.

 

I want to change one of the graphics in the game or add another level so when a person already has my game on their device it will check the database on my website to see if there is something new to add.

 

Or if a person has my game and finds a minor bug I can fix the bug, upload the fixed module to my server, update the database to tell the game there is new content to download.

 

Are there tutorials on this subject, can anyone point me in the right direction please?



[TOPIC: post.html]
#2

Alex@Panc

[GLOBAL: userInfoPane.html]
Alex@Panc
  • Corona Geek

  • 1,733 posts
  • Corona SDK

  Best Answer

Regarding your second scenario: Lua files which were used to build your app can't be updated without directly modifying them and uploading a new version of your app. I of course can't speak to your app structure or what you evaluate as a minor bug, but if the bug relates to something in your *.lua file tree, then you'd be out of luck there. This is for several reasons, the most important of which being security.

 

However, to expand on your first scenario, there are several forum threads that discuss how one can deliver an app that pulls down assets (graphic or otherwise), so as to keep the original app download size small, and optimize asset use in such cases as you refer to above:

 



[TOPIC: post.html]
#3

QuizMaster

[GLOBAL: userInfoPane.html]
QuizMaster
  • Contributor

  • 235 posts
  • Corona SDK

Thanks for the info Alex.



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,622 posts
  • Enterprise

Depending on how you do your levels, you can add them later like you want. But you just can't include any code. So how does this work you might ask?

 

You can download a JSON or XML file (JSON works much better with Lua) where the JSON file contains the content of a Lua table. You can include things in it like the name of the background, how many enemies to generate, information to create a map, etc. Your existing un-updated Lua code needs to be able to read the JSON data in, decode it so that it becomes a Lua table and then your code processes the lua table and generates the level. You can then download resources like sounds and graphics if necessary.

 

But if your level needs unique programming that was not in the original version, then an app update will be required.

 

Rob



[TOPIC: post.html]
#5

QuizMaster

[GLOBAL: userInfoPane.html]
QuizMaster
  • Contributor

  • 235 posts
  • Corona SDK

Yes!

 

Right now, one part of my game has 13 different types of puzzle, each puzzle has between 20 and 60 variations.

I've put all the assets for each puzzle in it's own folder, graphics and text files with data that tells the puzzle module what to do.

The module for each puzzle is in the resource directory obviously.

 

I would like to expand my existing puzzles and make more variations of each one after the game is in the stores.

The way I would imagine doing this is moving the assets folders to the documents directory.

In my main.lua check for an internet connection, download (an asset) text file, save it to a puzzle folder (now in docs directory).

 

Are you saying I can add more puzzles? Because that's what I want to do.

 

Can you explain or show me about decoding a json file into a lua table table and how you would go about processing that lua table to generate a level please Rob. I can't think of a way of doing that.



[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,622 posts
  • Enterprise

What is your text file now? You don't need json if you already have a defined format for defining the level.



[TOPIC: post.html]
#7

QuizMaster

[GLOBAL: userInfoPane.html]
QuizMaster
  • Contributor

  • 235 posts
  • Corona SDK

Hi Rob

 

Just simple text files that contain coordinates for positioning graphics, number of puzzles etc, this what one typically looks like..

 

052056057058060061068069070071074075077086089091093100102104105107108109116117118119120123135137138139140141148149150151153157164167169170171172173181182183185187196197199200201203204205
205
52
164
60
4
1
1

 

That text file creates a maze, places treasure in the maze and sets the starting position and exit.

 

I just read them in using string sub and so on.

I have text files for paths that enemies take, text files for solutions to puzzles and so on.

 

I can easily add more puzzles for some of them by just making a text file like the one above but some puzzles will need different graphics to go with the text files, like the walls in a marble game for example, although thinking about it now I could do that with only a text file too.



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,622 posts
  • Enterprise

It sounds like you're doing what you need to do.  None of the suggestions about using JSON will really help you.

 

Rob



[TOPIC: post.html]
#9

QuizMaster

[GLOBAL: userInfoPane.html]
QuizMaster
  • Contributor

  • 235 posts
  • Corona SDK

Thanks Rob.



[TOPIC: post.html]
#10

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,473 posts
  • Corona SDK

Hi,

 

It sounds like you have a web backend already, but something like Coronium (now a CoronaLabs project) can handle what you're asking in a very simple way. The additional ability to use Cloud Lua can also present ways to change your app logic without resubmitting. This is of course based on your app structure/architecture and reliance on network connectivity.

 

http://coronium.io

 

Cheers,

Chris



[TOPIC: post.html]
#11

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 614 posts
  • Corona SDK

So Coronium is joining Coronalabs... was this announced already?

That is excellent news! 



[TOPIC: post.html]
#12

QuizMaster

[GLOBAL: userInfoPane.html]
QuizMaster
  • Contributor

  • 235 posts
  • Corona SDK

I see that Coronium has it announced on their website, I would really like to know if this is going to be available any time soon because I was thinking of implementing these features into my now finished game.



[TOPIC: post.html]
#13

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,622 posts
  • Enterprise

Well we can't give any dates. We are very happy to have @develephant on board. His Coronium project is very well done. I'm not sure how much we can reveal at the moment. @develphant can speak to his task list on this.

 

But this will be awesome!

 

Rob



[TOPIC: post.html]
#14

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,473 posts
  • Corona SDK

Thanks for the vote of confidence! :)

 

We are working very quickly to release the next version. The current version will stay available until that time if you are looking for an immediate solution.

 

Stay tuned.

 

Cheers,

Chris



[TOPIC: post.html]
#15

QuizMaster

[GLOBAL: userInfoPane.html]
QuizMaster
  • Contributor

  • 235 posts
  • Corona SDK

Just when I think Corona couldn't get any more awesome, this comes along!!!

 

I'm willing to hold off releasing my game for this, if it's weeks and not months that is.



[TOPIC: post.html]
#16

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,473 posts
  • Corona SDK

Hi QuizMaster,

 

I wish I could tell you more, but it will be announced through the official channels soon. :)

 

Cheers,

Chris



[TOPIC: post.html]
#17

ojnab

[GLOBAL: userInfoPane.html]
ojnab
  • Contributor

  • 614 posts
  • Corona SDK

I agree with Rob that Coronium project is so user friendly and well done that I often have wondered why coronalabs didn't pick it up.

It is great news that it is now officially supported. Congrats to all of us :)




[topic_controls]
[/topic_controls]