Free with Ads with Purchase to disable Ads option.

Get help using Construct 2

Post » Fri Dec 13, 2013 8:12 pm

Hello All,

Currently all versions of my game are for pay. I want to support free with Ads, and then disable them when they purchase the app. I don't want separate versions of the app because this instantly removes you from being eligible for promotions and being highlighted in certain marketplaces.

Currently my game is available on Windows 8, Google Play, Amazon and Tizen. It is currently going through the approval process for iTunes(iOS) and Windows Phone.

I need to find good way of doing this (hopefully across platforms).

For windows 8 I tried the Windows 8 Advertising plugin but it just gives me JavaScript errors and causes the app to fail certification. This would be ideal as it is a design time object that I can place in my layouts and then would be able to destroy it if "App Purchased" is true.

So next I am left with putting a div in the index.html of the app. This will work fine, except that I need to be able to disable the ads if they purchase my app. Has anyone found a good way to do this?

For iOS, Google Play and Amazon I have a Premium Ludei CocoonJS account, I just don't know the best way to display the ads if the app has not been purchased, and turn them off if it has. I have read through some of the tutorials and none seem to specifically go over this piece. Unless I missed something. So here is a summary of what I am looking for:

Step by Step on support ads and turning them off when the app is purchased:

1. Windows 8 - Free with Ads, Purchase to disable ads. (pubcenter is already setup). Plugin or Div method?
2. iOS, Google Play, Amazon - Use CocoonJS to display and disable ads when purchased...


Also, when the user sees ad's in the game, do you use interstitial (full screen) ads? If so what do you do to hide them so the user can continue to play if they do not want to click the ad? Display the ad via a timer?
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Fri Dec 13, 2013 8:36 pm

I'm doing this for my game that I'm about to release. The way I implemented it was through a global variable called ads_enabled. I'm also storing this in webstorage. By default it's 1 but when a user purchases the 'remove ads' product then I set this to 0.

Next I have logic that only displays ads (both banner and interstitial) if the ads_enabled flag is 1. If it's 0 (remove_ads has been purchased) then you don't need to display any ads. I noticed cocoon randomly displays banner ads sometimes even after you've hidden them so I added a little bit of logic to hide banner ads if they get shown when the ads_enabled flag is 0.

As for interstitial ads, I'm using Chartboost as my network. Every time an ad is shown, there's a 'X' button at the top right corner of the ad to dismiss it so you don't need to mess around with timers.

But one major problem I'm facing right now is with restoring purchases. The restore events don't seem to be working within C2 or cocoonjs. So if you're user buys remove_ads and then clears the cache or re-installs the game they be shown ads again :( I've posted this on Ludei's forums but no response yet.
B
19
S
6
G
2
Posts: 57
Reputation: 2,524

Post » Fri Dec 13, 2013 8:55 pm

@funkyos Instead of having an in app purchase called remove_ads, can't you just check to see if the app is purchased? Wouldn't that simplify it and not require a restore of purchases?
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Fri Dec 13, 2013 9:25 pm

[QUOTE=BluePhaze] @funkyos Instead of having an in app purchase called remove_ads, can't you just check to see if the app is purchased? Wouldn't that simplify it and not require a restore of purchases?[/QUOTE]

@BluePhaze I'm a little confused. Are you talking about having a paid app? In your original post you mentioned you didn't want to go that route.

But if you are referring to a paid app, in terms of cocoon, it doesn't have visibility to that purchase.
B
19
S
6
G
2
Posts: 57
Reputation: 2,524

Post » Fri Dec 13, 2013 10:23 pm

@funkyos Ah, ok. Windows lets you do a trial mode so even paid apps can have a free download. You then control what happens in trial mode vs full license. So I could show ads in trial mode, and remove them if the app has been purchased. Wasn't sure if google, etc... Had a similar option. Sounds like they don't. Though cocoonjs does have a has app, or purchased app check I believe. Sounds like the variable route with IAP is the way to go on ios and android.      
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Fri Dec 27, 2013 9:07 pm

Alright, so here is the update and the current strategy I am using going forward:

Windows 8 games: Use the windows 8 advertising plugin to display the ads in layouts and position them just like, you would a sprite. If the user purchases the game set a global variable that tracks if the game was purchased and disables the ads. This is currently working fine in my apps.

Windows Phone: Wait for @thehen updated Windows Phone 8 plugin to add advertising support.

All other platforms(Android/iOS): CocoonJS ad support via Admob/Mopub. Use the cocoonJS object (Until a better solution via crosswalk is implemented). Implement logic to check if the app has been purchased (or an IAP "App" has been purchased) and if so disable the ads.

Hoping this will work on Android, iOS, Amazon(Kindle), Nook.



Unless anyone has any better suggestions...
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Thu Feb 06, 2014 5:19 pm

@BluePhaze did you ever get restore purchases to work with CocoonJS?
B
63
S
12
G
6
Posts: 456
Reputation: 8,981

Post » Thu Feb 06, 2014 7:36 pm

@russpuppy I honestly haven't published the version that has that in it yet... Since I already published it as a paid game, I actually have to publish it as a separate app for the free version in order to not mess things up for those who have already paid for the current version. The other app stores don't have a trial version option like the MS store does. So if you don't go free with IAP to begin with on Google/Apple, it is hard to do so after the fact... but soon I will... I just hope it works. As a precaution I am going to store the state of the purchase as a variable and use the game save to store it so that it remembers of the IAP was purchased or not. But that still won't help for reinstalls on new devices, etc...
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Thu Feb 06, 2014 7:56 pm

[QUOTE=BluePhaze] @russpuppy I honestly haven't published the version that has that in it yet... Since I already published it as a paid game, I actually have to publish it as a separate app for the free version in order to not mess things up for those who have already paid for the current version. The other app stores don't have a trial version option like the MS store does. So if you don't go free with IAP to begin with on Google/Apple, it is hard to do so after the fact... but soon I will... I just hope it works. As a precaution I am going to store the state of the purchase as a variable and use the game save to store it so that it remembers of the IAP was purchased or not. But that still won't help for reinstalls on new devices, etc...[/QUOTE]

Thanks. I have had trouble with restoring in-app purchases (after re-installs) and am looking for someone who has a solution to this. So far I've only seen comments from people who haven't gotten it to work yet.
B
63
S
12
G
6
Posts: 456
Reputation: 8,981

Post » Thu Feb 06, 2014 10:02 pm

@russpuppy same here, I have yet to hear from anyone that has actually had it work yet. Have you gotten it to successfully test that an item has been purchased? I am kind of iffy on that as well since it seems like it would be a similar function.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Next

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 35 guests