Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
0
Members

Mobile performance and Ads, IAP Integration

A topic by DEAD LOOK created Oct 25, 2016 Views: 1,103 Replies: 6
Viewing posts 1 to 6

Hello guys,

I was a backer for Superpowers when it was first announced and always liked the idea of using Superpowers for my projects.

The only thing that kept me from using it commercially was the mobile support.

As the title suggests, I am worried about 2 things:

- Mobile performance. Does anyone know how 2d or 3d games perform on iOS and Android?

- Ads and IAP. I recently found this. They are plugins for many ad services and iap's for html5. Do you think they could work with Superpowers?

Thank you :)

(+2)

Ok, i could talk from my experience with Android:

Performance: This is not actually related with superpowers (not directly) but technologies used to generate an apk from a web app are not great when you have a slow device, that's a fact. if your users have android 5.1 they probably wont notice a bad performance since that webview works good with webgl, if they have android 5.0 or lower, you should use crosswalk to build the apk and you should know that devices with less than 1gb ram wont have the best experience (again, this is not related with superpowers itself its more related with technologies used for building the apk)

Ads and IAP: I used several cordova plugins for ads and they work as should, but to write the code you should be conscious of the situation: Superpowers won't have access to you cordova plugin code, so you have to write a code 'executable' without breaking code if it fails, and defined once the game have build from superpowers. example:

I normally use a variable with a check before use it:

declare let window;
let ads = window.adProvider;
if(ads != null) {
  // Call your ad showing function (or whatever you need.)
}

Then build the game, and when making the code cordova-specific:

window.adProvider = YOUR_CORDOVA_PLUGIN_VARIABLE;

Now, if you havent work with cordova before. What i do is defining a variable when the event 'onDeviceReady' is called (which is before the superpowers game start to load) that way, when my game start 'window.adProvider' is already defined with some plugin variable (you should see the docs of the plugin you are using for better understanding of how to apply it here).

As a final thought this is a game i am developing where i use Superpowers, you could download it and see performance by yourself (is a work in progress, so if you have any bug, let me know).

Thank you very much for your detailed answer. I am not really comfortable with Superpowers coding, I am still researching on game engines. But this is really useful as I know this engine has all the features that I might need.

Do you know if these plugins are useful: http://atomic-plugins.com or do you recommend going with cordova plugins?

Also, do you use XDK or something else for wrapping?

Thanks

(+1)

I haven't used those atomic, but considering they're just cordova plugins made by ludei, should work without a problem. (Useful or not depends on the game, there're several plugins on cordova's world that does the same thing).

I'm using XDK right now, but you have to be clear that all solutions (as far as i know) rely on Cordova to make the end apk. XDK upload your files to the server and use a 'fork' of Cordova to make the apk, Crosswalk CLI (wich is also part of intel) use Cordova at the end with a modified webview, Cocoon (a solution of ludei) use their webview+ (in a similar way crosswalk does) with Cordova. So at the end Cordova is your god here, its limits are need to be considered. (and this is valid for any webapp turned into 'native' app)

As a recomendation, use XDK until you need more control over final build, then use Cordova CLI and make the apk by yourself, once you have all the libraries and stuff needed, the build process will not chage much, maybe faster because Cordova CLI not need internet.

I Also check other engines before ending with Superpowers, but for me there's no better 'multiplatform' choice. HTML5 is growing to be a real solution on multiplatform and in the near future, it will benefit Superpowers. If you want to try other engines look for libgdx (Java based), since is really solid and well documented. (I wouldn't look for Unity cause i think its really overloading for most of games)

Wow, thank you again for that :)

Do you know if there is any documentation on how to integrate the plugins? Also, does everything apply for iOS as well?

All what i said before should apply to IOS (I can't guarantee it cause i haven't tested).

About how to integrate plugin depends on what you mean:

  • Write a plugin for Superpowers: here (a little outdated).
  • Add atomic plugins: here (Using Cordova CLI).
  • Add a plugin using XDK: here
If what you mean is if there is a tutorial on how to write the code to make the plugin works besides the plugin docs, don't think so, at least to me is a mix between experience and playing around until everything works.

Thank you very much! I will probably go with the 2nd or 3rd option :)