Additional levels by IAPP?

I am not there yet, but I would like to make my game free and provide additional levels by IAPP.

How would I do that in Corona?

Let say, I have 50 levels in .lua
I want to build my game with 10 levels downloadable for free and all the other levels as IAPP.

What would I need to do in my code, so the additional levels are playable after purchase.

And mainly, what do I do with the lua files level11 - level50 ?

I am absolutely confused with this.
Is there any documentation or walkthrough for Corona, how to do this?

I think the easiest way to handle this is have all 50 level included in your app.

Have levels 11-50 only accessible through unlocking internally. Have your iAPP purchases perform those unlocks.

That would make the whole game available for pirates, wouldn't it?

I think they would be able to change that line of code and play all the levels, because they are all in the game already.

I don't care for pirates really, because I believe, there are enough people, who would buy the levels anyway and pirates wouldn't buy it even if there were the ultimate protection, but why to make it easy if it is not necessary? :-)

But still... even if I want to go that road, how to do that?

I am confused, what I have to publish as an inapp purchase on iTunes Connect?

EDIT:

Oh, now I see, I don't have to upload actual files as an inapp purchase to iTunes, just if the store tells me that the purchase was made, I switch a boolean (for example) and allow to access the levels, or update the count of the ingame currency or something like that.

Is this right?

But then the piracy thing is still valid...

Hunnenkoenig said:

Oh, now I see, I don't have to upload actual files as an inapp purchase to iTunes, just if the store tells me that the purchase was made, I switch a boolean (for example) and allow to access the levels, or update the count of the ingame currency or something like that.

Is this right?

Yes, exactly!

And hopefully your game gets popular enough that pirates want to steal it!

Thanks Firemaple for confirming it.

Normally I don't care for pirates, but to this seems to be a pretty cheap solution in general :-P

Ok, I know, it doesn't matter if they pirate a paid app as a whole or a free app with paid content, but Apple could do something about it.

I think, the only solution is to make your ingame purchases through your own server as a download after the purchase has been made.

Anyway...

Your compiled source is safe. Its converted to binary. Someone would be hard pressed to tamper with anything there.

The vulnerability is the save file you will need to store in order to remind your app that a purchase has already been made. This same vulnerability exists if you decide you have your levels downloaded, because they will reside outside of your compiled code in the same location of previously mentioned save file.

Protecting against this vulnerability can be as simple as encrypting the save file. However, you would need to deal with the Apple paperwork for including encryption in your app.

Another method could be to create a hash against the save file and check it on your apps launch. If the hash doesn't match, chances are its been hacked, reset the file. Some of us are still waiting on a definitive answer as to whether or not this method will require the encryption hassle with Apple.

I understand!
This explains a lot!

Thanks!

I am still a little bit confused about this topic and there are still many questions:

Case A
Assumed I want to offer some in-game equipment (better weapons etc.) to be purchased by the user. How could this technically be done? How can the user buy (and unlock) item XYZ in my app?

Case B
If I have my "premium" levels already built-in (but locked) and want to unlock them after an In-App-Purchase, how does my app know that the purchase has been made?

Case C
If I want to provide levels as an external file (XML, for example) to provide new levels (for users that paid for) on a monthly base, how could this be done (how to download those files, where to store them on the device)? And how could I check if the downloader has paid for this service?

Creating a PHP server script wouldn't be a problem for me (I'd also share it with the community then) but at the moment I don't have a clear overview how this all works in detail.

I think it would be more clear if there would be any in-depths articles, guides, code samples or how-to's regarding unlocking (or adding) content via IAP :-(

As far as I understand, you build everything into your app.

You make some settings, like "if purchased = 1, then loadlevel2"
If you know, what I mean.

For server side download you can read the Apple documentation, I think. I believe it's linked in the Corona documentation under Inapp Purchase.

The process would be the same, I think: "if purchase (subscription) = 1, then contact server and download fileX"

If you contact a server, you have to warn the user that the app needs internet connection though.

I didn't study the inapp purchase api very deeply yet, but I think, you have to state your inapp purchases in your code (and on iTunes Connect of course) and taken from the above posts, the appstore sends you just a message, if the money was paid or not.

Everything else is in your hand.

Thanks Hunnenkoenig,

but what if I'd prefer to host some additional level files (XML) on my server? How and where (on the device) are they downloaded to so that my app can access them (what path)?

Questions over questions... :-( This whole topic is still quite obscure to me.

The biggest advantage of the "external files" solution is that you don't have to build everything into your game at once and you are able to add levels afterwards just by providing new XML files on the server (for paid customers). There would be no need to build a new app every time.

views:2221 update:2011/10/10 21:27:38
corona forums © 2003-2011